python3Packages.pytest: fix tests

This commit is contained in:
Jonathan Ringer 2021-03-24 13:27:31 -07:00 committed by Frederik Rietdijk
parent 5869be5103
commit 43769c051c

View file

@ -56,9 +56,12 @@ buildPythonPackage rec {
'';
# Ignored file https://github.com/pytest-dev/pytest/pull/5605#issuecomment-522243929
# test_missing_required_plugins will emit deprecation warning which is treated as error
checkPhase = ''
runHook preCheck
$out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" --ignore=testing/test_junitxml.py
$out/bin/py.test -x testing/ \
--ignore=testing/test_junitxml.py \
-k "not test_collect_pyargs_with_testpaths and not test_missing_required_plugins"
# tests leave behind unreproducible pytest binaries in the output directory, remove:
find $out/lib -name "*-pytest-${version}.pyc" -delete