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

Tests break with pytest 7.2.0 #59

Closed
FriedrichFroebel opened this issue Oct 26, 2022 · 0 comments · Fixed by #60
Closed

Tests break with pytest 7.2.0 #59

FriedrichFroebel opened this issue Oct 26, 2022 · 0 comments · Fixed by #60

Comments

@FriedrichFroebel
Copy link
Contributor

CI builds started breaking today due to pytest 7.2.0 removing the py.test import support. At the time of writing this, the changelog on the website does not yet include this new release, but GitHub already provides the corresponding data. The offending change is pytest-dev/pytest#10396.

Errors appear like this:

______________________ ERROR collecting tests/test_xml.py ______________________
ImportError while importing test module '/home/runner/work/gamera-4/gamera-4/tests/test_xml.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_xml.py:1: in <module>
    import py.test
E   ModuleNotFoundError: No module named 'py.test'; 'py' is not a package

The solution is to simply replace the imports and usages of py.test with pytest. I will open a corresponding PR when I find some more time in the next days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant