diff --git a/pkgs/development/python-modules/flaky/default.nix b/pkgs/development/python-modules/flaky/default.nix index 65efea30db6c..43b3288f94b9 100644 --- a/pkgs/development/python-modules/flaky/default.nix +++ b/pkgs/development/python-modules/flaky/default.nix @@ -2,27 +2,29 @@ , buildPythonPackage , fetchPypi , mock -, nose , pytest }: buildPythonPackage rec { pname = "flaky"; version = "3.7.0"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "3ad100780721a1911f57a165809b7ea265a7863305acb66708220820caf8aa0d"; + hash = "sha256-OtEAeAchoZEfV6FlgJt+omWnhjMFrLZnCCIIIMr4qg0="; }; - nativeCheckInputs = [ mock nose pytest ]; + nativeCheckInputs = [ + mock + pytest + ]; checkPhase = '' # based on tox.ini pytest -k 'example and not options' --doctest-modules test/test_pytest/ pytest -k 'example and not options' test/test_pytest/ pytest -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py - nosetests --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py pytest --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py ''; diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix index b3f93e03f283..bfa2ca0dc87e 100644 --- a/pkgs/development/python-modules/hypothesis/default.nix +++ b/pkgs/development/python-modules/hypothesis/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, isPyPy , fetchFromGitHub , attrs , exceptiongroup @@ -13,6 +14,7 @@ , sphinx-rtd-theme , sphinx-hoverxref , sphinx-codeautolink +, tzdata # Used to break internal dependency loop. , enableDocumentation ? true }: @@ -65,6 +67,8 @@ buildPythonPackage rec { pexpect pytest-xdist pytestCheckHook + ] ++ lib.optionals (isPyPy) [ + tzdata ]; inherit doCheck; diff --git a/pkgs/development/python-modules/nose/default.nix b/pkgs/development/python-modules/nose/default.nix index c4a52a0e114b..bb6f6decc1a5 100644 --- a/pkgs/development/python-modules/nose/default.nix +++ b/pkgs/development/python-modules/nose/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { --replace "from setuptools.command.build_py import Mixin2to3" "from distutils.util import Mixin2to3" ''; - preBuild = lib.optionalString (isPy3k && (!isPyPy)) '' + preBuild = lib.optionalString (isPy3k) '' ${python.pythonForBuild}/bin/2to3 -wn nose functional_tests unit_tests ''; @@ -41,6 +41,7 @@ buildPythonPackage rec { ''; meta = with lib; { + broken = isPyPy; # missing 2to3 conversion utility description = "A unittest-based testing framework for python that makes writing and running tests easier"; homepage = "https://nose.readthedocs.io/"; license = licenses.lgpl3; diff --git a/pkgs/development/python-modules/virtualenv/default.nix b/pkgs/development/python-modules/virtualenv/default.nix index 30e3fc43d63f..28100b8c55e7 100644 --- a/pkgs/development/python-modules/virtualenv/default.nix +++ b/pkgs/development/python-modules/virtualenv/default.nix @@ -1,8 +1,8 @@ { lib -, stdenv , buildPythonPackage , pythonOlder , isPy27 +, isPyPy , cython , distlib , fetchPypi @@ -12,7 +12,6 @@ , hatchling , importlib-metadata , importlib-resources -, pathlib2 , platformdirs , pytest-freezegun , pytest-mock @@ -76,6 +75,13 @@ buildPythonPackage rec { "test_seed_link_via_app_data" # Permission Error "test_bad_exe_py_info_no_raise" + ] ++ lib.optionals (isPyPy) [ + # encoding problems + "test_bash" + # permission error + "test_can_build_c_extensions" + # fails to detect pypy version + "test_discover_ok" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/yapf/default.nix b/pkgs/development/python-modules/yapf/default.nix index 80b84b73ff97..f5cba78a2026 100644 --- a/pkgs/development/python-modules/yapf/default.nix +++ b/pkgs/development/python-modules/yapf/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, isPyPy , nose }: @@ -13,6 +14,9 @@ buildPythonPackage rec { hash = "sha256-o/UIXTfvfj4ATEup+bPkDFT/GQHNER8FFFrjE6fGfRs="; }; + # nose is unavailable on pypy + doCheck = !isPyPy; + nativeCheckInputs = [ nose ];