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

pytest 8.2.2 fails assertion #12440

Closed
3 of 4 tasks
marcoep opened this issue Jun 8, 2024 · 2 comments
Closed
3 of 4 tasks

pytest 8.2.2 fails assertion #12440

marcoep opened this issue Jun 8, 2024 · 2 comments

Comments

@marcoep
Copy link

marcoep commented Jun 8, 2024

Discovered while testing LabExT with pytest 8.2.2. We do integration testing of a TKinter GUI as part of our CI. A particularly long test fails with an assertion error when using pytest=8.2.2 instead of an older version. The assertion error is raised possibly because of the change in #12368. I can't reproduce the error locally on my windows machine, however when pinning pytest's version to <8.2.2, this assertion is not triggered and our CI succeeds.

Console output from the CI run here: bug_reports.txt, error triggered is:

  self = <TestCaseFunction test_mainwindow_repeated_IL_sweep>
      def runtest(self) -> None:
          from _pytest.debugging import maybe_wrap_pytest_function_for_tracing
      
          testcase = self.instance
  >       assert testcase is not None
  E       AssertionError
  .tox/py310-mwint/lib/python3.10/site-packages/_pytest/unittest.py:319: AssertionError

Python env (tox outputs the pip freeze, not pip list):

Babel==2.14.0
bidict==0.23.1
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
collision==1.2.2
colorama==0.4.6
contourpy==1.2.0
cycler==0.12.1
exceptiongroup==1.2.1
fonttools==4.49.0
ghp-import==2.1.0
griffe==0.42.0
h5py==3.10.0
idna==3.6
importlib_metadata==7.0.2
importlib_resources==6.1.3
iniconfig==2.0.0
Jinja2==3.1.3
kiwisolver==1.4.5
LabExT_pkg @ file:///home/runner/work/LabExT/LabExT/.tox/.tmp/package/4/labext_pkg-2.3.0.tar.gz#sha256=adab0666260601cb92a80e42cfc5a4b5c35c944d75742b8252b5b7fff29eba39
Markdown==3.5.2
MarkupSafe==2.1.5
matplotlib==3.8.3
mergedeep==1.3.4
mkdocs==1.5.3
mkdocs-autorefs==1.0.1
mkdocs-material==9.5.13
mkdocs-material-extensions==1.3.1
mkdocstrings==0.24.1
mkdocstrings-python==1.8.0
numpy==1.26.4
packaging==24.0
paginate==0.5.6
pandas==2.2.1
parameterized==0.9.0
pathspec==0.12.1
pillow==10.2.0
pip==24.0
platformdirs==4.2.0
pluggy==1.5.0
Pygments==2.17.2
pymdown-extensions==10.7.1
pyparsing==3.1.2
pyserial==3.5
pytest==8.2.2
pytest-rerunfailures==14.0
pytest-xv

We're using: Python 3.10.14, pytest-8.2.2, pluggy-1.5.0 and pytest plugins rerunfailures-14.0, xvfb-3.0.0. OS is whatever GitHub CI installs on 'ubuntu-latest'.

  • a detailed description of the bug or problem you are having
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible
@bluetech
Copy link
Member

bluetech commented Jun 8, 2024

Thanks for the report, we have fixed this issue yesterday and it will be included in the next release.

@hugobarthelemy
Copy link

Thanks for the report @marcoep . We have the same issue.
Do you know @bluetech when it's release please?
Thanks for your help on this great project!

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

No branches or pull requests

3 participants