From 7267c7bade711df09556a000dee06c69db1ee953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 23 Jan 2021 16:04:39 +0100 Subject: [PATCH 1/3] pythonPackages:pytest-forked: run tests Also update inputs to match setup.py and add dotlambda to maintainers. --- .../python-modules/pytest-forked/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pytest-forked/default.nix b/pkgs/development/python-modules/pytest-forked/default.nix index 89200f519e7..855e1fb470c 100644 --- a/pkgs/development/python-modules/pytest-forked/default.nix +++ b/pkgs/development/python-modules/pytest-forked/default.nix @@ -2,7 +2,9 @@ , buildPythonPackage , fetchPypi , setuptools_scm +, py , pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -14,19 +16,16 @@ buildPythonPackage rec { sha256 = "6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca"; }; - buildInputs = [ pytest setuptools_scm ]; + nativeBuildInputs = [ setuptools_scm ]; - # Do not function - doCheck = false; + propagatedBuildInputs = [ py pytest ]; - checkPhase = '' - py.test testing - ''; + checkInputs = [ pytestCheckHook ]; meta = { description = "Run tests in isolated forked subprocesses"; homepage = "https://github.com/pytest-dev/pytest-forked"; license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; }; - } From 3d19493fa572ce2c140f6bc27e6e4734b4525ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 23 Jan 2021 16:00:51 +0100 Subject: [PATCH 2/3] python3Packages.pytest_xdist: 2.1.0 -> 2.2.0 Also update inputs to match setup.py. --- .../python-modules/pytest-xdist/default.nix | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/pytest-xdist/default.nix b/pkgs/development/python-modules/pytest-xdist/default.nix index 30e43c17c91..94feb102994 100644 --- a/pkgs/development/python-modules/pytest-xdist/default.nix +++ b/pkgs/development/python-modules/pytest-xdist/default.nix @@ -1,28 +1,39 @@ -{ lib, fetchPypi, buildPythonPackage, execnet, pytest_6 -, setuptools_scm, pytest-forked, filelock, psutil, six, isPy3k }: +{ lib +, buildPythonPackage +, fetchPypi +, isPy27 +, setuptools_scm +, pytestCheckHook +, filelock +, execnet +, pytest +, pytest-forked +, psutil +}: buildPythonPackage rec { pname = "pytest-xdist"; - version = "2.1.0"; - disabled = !isPy3k; + version = "2.2.0"; + disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2"; + sha256 = "1d8edbb1a45e8e1f8e44b1260583107fc23f8bc8da6d18cb331ff61d41258ecf"; }; - nativeBuildInputs = [ setuptools_scm pytest_6 ]; - checkInputs = [ pytest_6 filelock ]; - propagatedBuildInputs = [ execnet pytest-forked psutil six ]; + nativeBuildInputs = [ setuptools_scm ]; + checkInputs = [ pytestCheckHook filelock ]; + propagatedBuildInputs = [ execnet pytest pytest-forked psutil ]; - # pytest6 doesn't allow for new lines - # capture_deprecated not compatible with latest pytest6 - checkPhase = '' - # Excluded tests access file system - export HOME=$TMPDIR - pytest -n $NIX_BUILD_CORES \ - -k "not (distribution_rsyncdirs_example or rsync or warning_captured_deprecated_in_pytest_6)" - ''; + # access file system + disabledTests = [ + "test_distribution_rsyncdirs_example" + "test_rsync_popen_with_path" + "test_popen_rsync_subdir" + "test_rsync_report" + "test_init_rsync_roots" + "test_rsyncignore" + ]; meta = with lib; { description = "py.test xdist plugin for distributed testing and loop-on-failing modes"; From 2aafd59a1b9ca00ebd72deb71dfa3880a3a0b630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 29 Jan 2021 17:16:28 +0100 Subject: [PATCH 3/3] python3Packages.psautohint: use pytest_6 We prefer using a single version of pytest within pythonPackages. --- pkgs/development/python-modules/psautohint/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/psautohint/default.nix b/pkgs/development/python-modules/psautohint/default.nix index 68d15133670..4e9f07e2ccb 100644 --- a/pkgs/development/python-modules/psautohint/default.nix +++ b/pkgs/development/python-modules/psautohint/default.nix @@ -2,7 +2,7 @@ , fonttools , lxml, fs # for fonttools extras , setuptools_scm -, pytestCheckHook, pytest_5, pytestcov, pytest_xdist +, pytestCheckHook, pytestcov, pytest_xdist }: buildPythonPackage rec { @@ -30,14 +30,14 @@ buildPythonPackage rec { propagatedBuildInputs = [ fonttools lxml fs ]; checkInputs = [ - # Override pytestCheckHook to use pytest v5, because some tests fail on pytest >= v6 - # https://github.com/adobe-type-tools/psautohint/issues/284#issuecomment-742800965 - # Override might be able to be removed in future, check package dependency pins (coverage.yml) - (pytestCheckHook.override{ pytest = pytest_5; }) + pytestCheckHook pytestcov pytest_xdist ]; disabledTests = [ + # Test that fails on pytest >= v6 + # https://github.com/adobe-type-tools/psautohint/issues/284#issuecomment-742800965 + "test_hashmap_old_version" # Slow tests, reduces test time from ~5 mins to ~30s "test_mmufo" "test_flex_ufo"