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

FAILED tests/cover/test_unittest.py::test_subTest_no_self[err*] - ValueError: Invalid suffix 'tests.py' with pytest-6.2.1 #2716

Closed
mgorny opened this issue Dec 25, 2020 · 1 comment · Fixed by #2718
Labels
tests/build/CI about testing or deployment *of* Hypothesis

Comments

@mgorny
Copy link
Contributor

mgorny commented Dec 25, 2020

With pytest-6.2.1, the following tests start failing:

==================================================================== FAILURES =====================================================================
___________________________________________________________ test_subTest_no_self[err0] ____________________________________________________________
[gw2] linux -- Python 3.9.1 /usr/bin/python3.9
Traceback (most recent call last):
  File "/tmp/portage/dev-python/hypothesis-5.43.4/work/hypothesis-hypothesis-python-5.43.4/hypothesis-python-python3_9/tests/cover/test_unittest.py", line 75, in test_subTest_no_self
    fname = testdir.makefile("tests.py", SUBTEST_SUITE)
  File "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 1547, in makefile
    return py.path.local(str(self._pytester.makefile(ext, *args, **kwargs)))
  File "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 788, in makefile
    return self._makefile(ext, args, kwargs)
  File "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 756, in _makefile
    p = self.path.joinpath(basename).with_suffix(ext)
  File "/usr/lib/python3.9/pathlib.py", line 889, in with_suffix
    raise ValueError("Invalid suffix %r" % (suffix))
ValueError: Invalid suffix 'tests.py'
___________________________________________________________ test_subTest_no_self[err1] ____________________________________________________________
[gw2] linux -- Python 3.9.1 /usr/bin/python3.9
Traceback (most recent call last):
  File "/tmp/portage/dev-python/hypothesis-5.43.4/work/hypothesis-hypothesis-python-5.43.4/hypothesis-python-python3_9/tests/cover/test_unittest.py", line 75, in test_subTest_no_self
    fname = testdir.makefile("tests.py", SUBTEST_SUITE)
  File "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 1547, in makefile
    return py.path.local(str(self._pytester.makefile(ext, *args, **kwargs)))
  File "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 788, in makefile
    return self._makefile(ext, args, kwargs)
  File "/usr/lib/python3.9/site-packages/_pytest/pytester.py", line 756, in _makefile
    p = self.path.joinpath(basename).with_suffix(ext)
  File "/usr/lib/python3.9/pathlib.py", line 889, in with_suffix
    raise ValueError("Invalid suffix %r" % (suffix))
ValueError: Invalid suffix 'tests.py'
@Zac-HD Zac-HD added the tests/build/CI about testing or deployment *of* Hypothesis label Dec 26, 2020
@Zac-HD
Copy link
Member

Zac-HD commented Dec 26, 2020

This is actually an upstream regression, pytest-dev/pytest#8192, but we'll patch it anyway. Thanks for reporting 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests/build/CI about testing or deployment *of* Hypothesis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants