diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index b15120937f7a..197d66daa0ba 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -10,7 +10,7 @@ , six , isPyPy , cffi -, pytest +, pytestCheckHook , pytest-subtests , pretend , libiconv @@ -61,24 +61,20 @@ buildPythonPackage rec { hypothesis iso8601 pretend - pytest + pytestCheckHook pytest-subtests pytz ]; - pytestFlags = lib.concatStringsSep " " ([ + pytestFlagsArray = [ "--disable-pytest-warnings" - ] ++ - lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ - # aarch64-darwin forbids W+X memory, but this tests depends on it: - # * https://cffi.readthedocs.io/en/latest/using.html#callbacks - "--ignore=tests/hazmat/backends/test_openssl_memleak.py" - ] - ); + ]; - checkPhase = '' - py.test ${pytestFlags} tests - ''; + disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + # aarch64-darwin forbids W+X memory, but this tests depends on it: + # * https://cffi.readthedocs.io/en/latest/using.html#callbacks + "--ignore=tests/hazmat/backends/test_openssl_memleak.py" + ]; meta = with lib; { description = "A package which provides cryptographic recipes and primitives";