Skip to content

Fixture not found in 8.0 that is found in 7.4.4 #11884

Open
@larsoner

Description

@larsoner

In this run:

https://github.com/openmeeg/openmeeg/actions/runs/7700673043/job/20985097864?pr=631#step:6:8200

You can see the 3.7 wheel work during testing (which uses 7.4.4), but fail in 3.8 testing (which uses 8.0.0). If I use pytest --fixtures $TEST_PATH the fixture is there:

  ---------------- fixtures defined from openmeeg.tests.conftest ----------------
  data_path [session scope] -- ..\venv-test\lib\site-packages\openmeeg\tests\conftest.py:15
      no docstring available
  
  run_some_parallel [session scope] -- ..\venv-test\lib\site-packages\openmeeg\tests\conftest.py:27
      Run some stuff in parallel.

But when I run the tests with pytest --tb=short -ra -m 'not slow' -vv $TEST_PATH I get for all tests:

  ============================= test session starts =============================
  platform win32 -- Python 3.8.10, pytest-8.0.0, pluggy-1.4.0 -- C:\Users\runneradmin\AppData\Local\Temp\cibw-run-32upad1x\cp38-win_amd64\venv-test\Scripts\python.exe
  cachedir: .pytest_cache
  rootdir: C:\Users\runneradmin\AppData\Local\Temp\cibw-run-32upad1x\cp38-win_amd64
  collecting ... collected 13 items / 2 deselected / 11 selected
  
  ..\venv-test\Lib\site-packages\openmeeg\tests\test_doc.py::test_doc <- venv-test\lib\site-packages\openmeeg\tests\test_doc.py ERROR [  9%]

...

  =================================== ERRORS ====================================
  _________________________ ERROR at setup of test_doc __________________________
  file C:\Users\runneradmin\AppData\Local\Temp\cibw-run-32upad1x\cp38-win_amd64\venv-test\lib\site-packages\openmeeg\tests\test_doc.py, line 6
    def test_doc():
  E       fixture 'run_some_parallel' not found
  >       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
  >       use 'pytest --fixtures [testpath]' for help on them.

Notably, this only happens on the Windows cibuildwheel run -- the Linux one in that same GHA is green. So the issue seems isolated to 8.0.0 on Windows. Nonetheless I am a bit mystified at why pytest --fixtures seems to see a different set of fixtures compared to 7.4.4 🤷

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

Not sure how to make this one mimimal but I could put some time into this on my Windows VM at some point if it's not clear enough what's going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: windowswindows platform-specific problemtopic: fixturesanything involving fixtures directly or indirectlytype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions