python39Packages.cryptography: switch to pytestCheckHook

This commit is contained in:
Sandro Jäckel
2022-03-23 06:44:15 +01:00
parent ece9e8200f
commit de6171a441
@@ -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";