@@ -1,30 +1,27 @@
1−{ stdenv, fetchPypi, buildPythonPackage, execnet, pytest
1+{ stdenv, fetchPypi, buildPythonPackage, execnet, pytest_6
22, setuptools_scm, pytest-forked, filelock, psutil, six, isPy3k }:
33
44buildPythonPackage rec {
55 pname = "pytest-xdist";
66 version = "2.1.0";
7+ disabled = !isPy3k;
78
89 src = fetchPypi {
910 inherit pname version;
10− sha256 = "82d938f1a24186520e2d9d3a64ef7d9ac7ecdf1a0659e095d18e596b8cbd0672";
11+ sha256 = "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2";
1112 };
1213
13− nativeBuildInputs = [ setuptools_scm pytest ];
14− checkInputs = [ pytest filelock ];
14+ nativeBuildInputs = [ setuptools_scm pytest_6 ];
15+ checkInputs = [ pytest_6 filelock ];
1516 propagatedBuildInputs = [ execnet pytest-forked psutil six ];
1617
17− # Encountered a memory leak
18− # https://github.com/pytest-dev/pytest-xdist/issues/462
19− doCheck = !isPy3k;
20−
18+ # pytest6 doesn't allow for new lines
19+ # capture_deprecated not compatible with latest pytest6
2120 checkPhase = ''
2221 # Excluded tests access file system
23− py.test testing -k "not test_distribution_rsyncdirs_example \
24− and not test_rsync_popen_with_path \
25− and not test_popen_rsync_subdir \
26− and not test_init_rsync_roots \
27− and not test_rsyncignore"
22+ export HOME=$TMPDIR
23+ pytest -n $NIX_BUILD_CORES \
24+ -k "not (distribution_rsyncdirs_example or rsync or warning_captured_deprecated_in_pytest_6)"
2825 '';
2926
3027 meta = with stdenv.lib; {