pythonPackages.Pyro4: fix tests

This commit is contained in:
Jonathan Ringer 2019-10-27 07:07:39 -07:00 committed by Jon
parent 11f9145fb0
commit 3ba8ce13dd

View File

@ -8,8 +8,8 @@
, cloudpickle , cloudpickle
, msgpack , msgpack
, isPy27 , isPy27
, isPy33
, selectors34 , selectors34
, pytest
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -23,7 +23,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
serpent serpent
] ++ lib.optionals (isPy27 || isPy33) [ selectors34 ]; ] ++ lib.optionals isPy27 [ selectors34 ];
buildInputs = [ buildInputs = [
dill dill
@ -31,8 +31,15 @@ buildPythonPackage rec {
msgpack msgpack
]; ];
checkInputs = [ pytest ];
# add testsupport.py to PATH
# ignore network related tests, which fail in sandbox
checkPhase = '' checkPhase = ''
${python.interpreter} setup.py test PYTHONPATH=tests/PyroTests:$PYTHONPATH
pytest -k 'not StartNSfunc \
and not Broadcast \
and not GetIP' \
--ignore=tests/PyroTests/test_naming.py
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {