pytest: fix dependencies, refactor

This commit is contained in:
Jonathan Ringer 2020-08-16 12:42:02 -07:00
parent a563ed4270
commit 8e9060711a
No known key found for this signature in database
GPG Key ID: 5C841D3CFDFEC4E0

View File

@ -3,6 +3,7 @@
, attrs
, funcsigs
, hypothesis
, iniconfig
, mock
, more-itertools
, packaging
@ -14,6 +15,7 @@
, setuptools
, setuptools_scm
, six
, toml
, wcwidth
, writeText
}:
@ -24,11 +26,6 @@ buildPythonPackage rec {
disabled = !isPy3k;
preCheck = ''
# don't test bash builtins
rm testing/test_argcomplete.py
'';
src = fetchPypi {
inherit pname version;
sha256 = "85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4";
@ -36,11 +33,27 @@ buildPythonPackage rec {
checkInputs = [ hypothesis pygments ];
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites wcwidth packaging ]
++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
propagatedBuildInputs = [
atomicwrites
attrs
iniconfig
more-itertools
packaging
pluggy
py
setuptools
six
toml
wcwidth
] ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
preCheck = ''
# don't test bash builtins
rm testing/test_argcomplete.py
'';
# Ignored file https://github.com/pytest-dev/pytest/pull/5605#issuecomment-522243929
checkPhase = ''
runHook preCheck