Merge pull request #72091 from xwvvvvwx/reproducible-pytest4

python3Packages.pytest4: deterministic bytecode
This commit is contained in:
Domen Kožar 2020-04-22 14:05:09 +02:00 committed by GitHub
commit a63762ace8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,11 +6,6 @@ buildPythonPackage rec {
version = "4.6.8";
pname = "pytest";
preCheck = ''
# don't test bash builtins
rm testing/test_argcomplete.py
'';
src = fetchPypi {
inherit pname version;
sha256 = "6192875be8af57b694b7c4904e909680102befcb99e610ef3d9f786952f795aa";
@ -25,7 +20,14 @@ buildPythonPackage rec {
doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
checkPhase = ''
runHook preCheck
$out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths"
# don't test bash builtins
rm testing/test_argcomplete.py
# determinism - this test writes non deterministic bytecode
rm -rf testing/test_assertrewrite.py
PYTHONDONTWRITEBYTECODE=1 $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths"
runHook postCheck
'';