Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip mypy test on platforms using importlib_resources #258

Merged
merged 1 commit into from
Apr 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions sros2/test/test_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,13 @@
@pytest.mark.mypy
@pytest.mark.linter
def test_mypy():
try:
import importlib.resources as _ # noqa: F401
except ModuleNotFoundError:
# The importlib_resources package is a backport of the importlib.resources module
# from Python 3.9. The 'policy' module of this project first tries to import from
# importlib.resources, then falls back to the backport package.
# There is a bug in mypy that manifests when this try/except import pattern is
# used: https://github.com/python/mypy/issues/1153
pytest.skip('This platform does not support mypy checking of importlib properly')
assert main(argv=[]) == 0, 'Found errors'