Ignore a specific six-related import warning on Python 3.10 in tests.

Review Request #11930 — Created Jan. 12, 2022 and submitted

Information

Djblets
release-2.x

Reviewers

The version of six in all versions of Django can trigger the following
ImportWarning on Python 3.10:

_SixMetaPathImporter.find_spec() not found; falling back to
find_module()

This wasn't an issue with the old test runner, but is being hit in
pytest, causing tests to fail.

The simplest solution, unfortunately, is just to filter this out in
assertWarns. This implements that filter, fixing those tests.

Unit tests pass on all supported versions of Python.

Summary ID
Ignore a specific six-related import warning on Python 3.10 in tests.
The version of `six` in all versions of Django can trigger the following `ImportWarning` on Python 3.10: _SixMetaPathImporter.find_spec() not found; falling back to find_module() This wasn't an issue with the old test runner, but is being hit in `pytest`, causing tests to fail. The simplest solution, unfortunately, is just to filter this out in `assertWarns`. This implements that filter, fixing those tests.
cbf3902ae86bf4f1c95df8c1101950f8b2ac1e29
Description From Last Updated

W605 invalid escape sequence '\)'

reviewbotreviewbot

W605 invalid escape sequence '\('

reviewbotreviewbot

W605 invalid escape sequence '\('

reviewbotreviewbot

W605 invalid escape sequence '\)'

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.x (f7017bb)