diff options
author | Drew Risinger <drewrisinger@users.noreply.github.com> | 2020-12-09 11:04:17 -0500 |
---|---|---|
committer | Drew Risinger <drewrisinger@users.noreply.github.com> | 2020-12-10 17:56:36 -0500 |
commit | c2c9fcc89648bc33c7568db7b4a5364cbc7b8146 (patch) | |
tree | c1515e71176fa5d99572a965e8d9f6a57c85b4f3 /pkgs/development/python-modules/psautohint | |
parent | 1183f62e9fece62fb5ccd50b9183b97869c4adf4 (diff) |
python3Packages.psautohint: disable slow tests
* Reduces test time from ~5 mins to ~30 seconds. * Also converts to pytestCheckHook for better test control. * Makes fetchFromGitHub variables match convention. * remove pytest-randomly. pytest-randomly will randomize test order & reset random seeds between tests. We don't want the random test ordering for reproducible builds, so we remove it. * Fixes flaky test "test_hashmap_old_version" by pinning pytest to v5, corresponding to upstream issue: https://github.com/adobe-type-tools/psautohint/issues/284#issuecomment-742800965 py3.psautohint: use pytest5
Diffstat (limited to 'pkgs/development/python-modules/psautohint')
-rw-r--r-- | pkgs/development/python-modules/psautohint/default.nix | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/psautohint/default.nix b/pkgs/development/python-modules/psautohint/default.nix index fb9237c893448..61828ddff0097 100644 --- a/pkgs/development/python-modules/psautohint/default.nix +++ b/pkgs/development/python-modules/psautohint/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, fetchFromGitHub, pythonOlder , fonttools, lxml, fs , setuptools_scm -, pytest, pytestcov, pytest_xdist, pytest-randomly +, pytestCheckHook, pytest_5, pytestcov, pytest_xdist }: buildPythonPackage rec { @@ -11,10 +11,10 @@ buildPythonPackage rec { disabled = pythonOlder "3.6"; src = fetchFromGitHub { - owner = "adobe-type-tools"; - repo = pname; + owner = "adobe-type-tools"; + repo = pname; + rev = "v${version}"; sha256 = "1s2l54gzn11y07zaggprwif7r3ia244qijjhkbvjdx4jsgc5df8n"; - rev = "v${version}"; fetchSubmodules = true; # data dir for tests }; @@ -28,8 +28,24 @@ buildPythonPackage rec { propagatedBuildInputs = [ fonttools lxml fs ]; - checkInputs = [ pytest pytestcov pytest_xdist pytest-randomly ]; - checkPhase = "pytest tests"; + 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; }) + pytestcov + pytest_xdist + ]; + disabledTests = [ + # Slow tests, reduces test time from ~5 mins to ~30s + "test_mmufo" + "test_flex_ufo" + "test_ufo" + "test_flex_otf" + "test_multi_outpath" + "test_mmhint" + "test_otf" + ]; meta = with lib; { description = "Script to normalize the XML and other data inside of a UFO"; |