Merge pull request #107825 from raboof/pytest-remove-unreproducible-test-artifacts-from-output

python3Packages.pytest: remove unreproducible test artifacts from output
This commit is contained in:
Florian Klink 2020-12-29 00:19:19 +01:00 committed by GitHub
commit d14d417e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,12 @@ buildPythonPackage rec {
checkPhase = ''
runHook preCheck
$out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" --ignore=testing/test_junitxml.py
# tests leave behind unreproducible pytest binaries in the output directory, remove:
find $out/lib -name "*-pytest-${version}.pyc" -delete
# specifically testing/test_assertion.py and testing/test_assertrewrite.py leave behind those:
find $out/lib -name "*opt-2.pyc" -delete
runHook postCheck
'';