Pytest configuration needs review #3393
Labels
I: No breaking change
Previously written code will work as before, no one should note anything changing (aside the fix)
S: Normal
Handle this with default priority
T: Maintenance
Work to keep up the quality of the code and documentation.
When running
make installcheck
on NEST on my computer (and some others), pytest issues warnings aboutPytestUnknownMarkWarning:Unknown pytest.mark.skipif_missing_threads - is this a typo?
even though this marker is defined innest-simulator/testsuite/pytests/conftest.py
Lines 82 to 89 in c201d67
I can also reproduce this warning by running a test directly from its install location, e.g.
If, on the other hand, I run the same test from the source code directory
I do not get the warning. I confirmed with
diff
that the twotestsuite
directories are identical except for entirely unrelated files such asREADME.md
.The interesting difference is that the source directory contains
pyproject.toml
at the top level, which provides som pytest initialiasation:nest-simulator/pyproject.toml
Lines 1 to 8 in c201d67
Indeed, copying
pyproject.toml
into the installed testsuite directory makes the warning disappear.It seems wrong to my to install
pyproject.toml
into the installed testsuite directory just to avoid this warning. I also noticed thatconftest.py
contains code to insert one marker into the configuration:nest-simulator/testsuite/pytests/conftest.py
Lines 54 to 59 in c201d67
So I wonder if the material in the toml file should be moved to
conftest.py
or if one should find some other solution?Test execution and skipping appears to work in spite of the warning, so I labeled this maintenance, not a bug.
The text was updated successfully, but these errors were encountered: