python311Packages.pytest7CheckHook: init

and migrate existing overrides.
This commit is contained in:
Martin Weinelt 2024-03-24 20:53:29 +01:00
parent 7f09da0f22
commit 5680f319fd
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
21 changed files with 40 additions and 55 deletions

View File

@ -55,7 +55,7 @@ python3.pkgs.buildPythonApplication rec {
pytest-freezer
pytest-mock
pytest-regressions
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
];
doCheck = true;

View File

@ -3,8 +3,7 @@
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, setuptools
, numpy
, packaging
@ -47,7 +46,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
evaluate
parameterized
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
transformers
];
preCheck = ''

View File

@ -21,8 +21,7 @@
, freezegun
, gunicorn
, pytest-mock
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, python-on-whales
, re-assert
, trustme
@ -83,7 +82,7 @@ buildPythonPackage rec {
freezegun
gunicorn
pytest-mock
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
python-on-whales
re-assert
] ++ lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) [

View File

@ -11,8 +11,7 @@
, boto3
, psutil
, pydantic
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pytest-cases
, pytest-cov
, pytest-xdist
@ -66,7 +65,7 @@ buildPythonPackage rec {
google-cloud-storage
psutil
pydantic
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
pytest-cases
pytest-cov
pytest-xdist

View File

@ -17,8 +17,7 @@
, mujson
, orjson
, pytest-asyncio
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pyyaml
, rapidjson
, requests
@ -61,7 +60,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
# https://github.com/falconry/falcon/blob/master/requirements/tests
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
pyyaml
requests
rapidjson

View File

@ -5,8 +5,7 @@
, fetchFromGitHub
, lz4
, msgpack
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pythonOlder
, setuptools
, setuptools-scm
@ -52,7 +51,7 @@ buildPythonPackage rec {
};
nativeCheckInputs = [
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [

View File

@ -21,8 +21,7 @@
, xattr
, skia-pathops
, uharfbuzz
, pytestCheckHook
, pytest_7
, pytest7CheckHook
}:
buildPythonPackage rec {
@ -65,7 +64,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
# test suite fails with pytest>=8.0.1
# https://github.com/fonttools/fonttools/issues/3458
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
] ++ lib.concatLists (lib.attrVals ([
"woff"
# "interpolatable" is not included because it only contains 2 tests at the time of writing but adds 270 extra dependencies

View File

@ -5,8 +5,7 @@
, async-timeout
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pythonAtLeast
, pythonOlder
, pytest-aiohttp
@ -50,7 +49,7 @@ buildPythonPackage rec {
aiohttp-wsgi
pytest-aiohttp
pytest-asyncio
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
];
pytestFlagsArray = [

View File

@ -22,8 +22,7 @@
# Test dependencies
, pickleshare
, pytest-asyncio
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, testpath
}:
@ -72,7 +71,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pickleshare
pytest-asyncio
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
testpath
];

View File

@ -11,8 +11,7 @@
# tests
, pytest-timeout
, pytestCheckHook
, pytest_7
, pytest7CheckHook
}:
buildPythonPackage rec {
@ -42,7 +41,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytest-timeout
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
];
disabledTests = [

View File

@ -19,8 +19,7 @@
, parse
, poetry-core
, pytest-aiohttp
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pythonOlder
, responses
, requests
@ -94,7 +93,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
httpx
pytest-aiohttp
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
responses
webob
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);

View File

@ -7,8 +7,7 @@
, jsonschema
, pytest-asyncio
, pytest-httpbin
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pythonOlder
, requests
, xmltodict
@ -43,7 +42,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytest-asyncio
pytest-httpbin
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
];
pythonImportsCheck = [

View File

@ -4,8 +4,7 @@
, email-validator
, fetchFromGitHub
, pytest-mock
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, python-dotenv
, pythonAtLeast
, pythonOlder
@ -52,7 +51,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytest-mock
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
pytestFlagsArray = [

View File

@ -7,8 +7,7 @@
, setuptools-scm
, pytest-asyncio
, pytest-cases
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pytz
}:
@ -44,7 +43,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytest-asyncio
pytest-cases
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
];
pythonImportsCheck = [

View File

@ -4,8 +4,7 @@
, packaging
, pytest
, setuptools-scm
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pythonOlder
}:
@ -37,7 +36,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
# https://github.com/joseph-roitman/pytest-snapshot/issues/71
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
];
pythonImportsCheck = [

View File

@ -2,8 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pytest
, pytest_7
, pytestCheckHook
, pytest7CheckHook
}:
buildPythonPackage rec {
@ -24,7 +23,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
# https://github.com/utapyngo/pytest-unordered/issues/15
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
];
pythonImportsCheck = [

View File

@ -23,8 +23,7 @@
# tests
, pip
, pytest-cov
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, setuptools
}:
@ -69,7 +68,7 @@ buildPythonPackage rec {
pip
pytest-cov
# Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted.
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
setuptools
]
++ passthru.optional-dependencies.networkx

View File

@ -15,8 +15,7 @@
, wheel
, setuptools
, hypothesis
, pytestCheckHook
, pytest_7
, pytest7CheckHook
, pytest-xdist
, numpy
, pybind11
@ -117,7 +116,7 @@ in buildPythonPackage {
nativeCheckInputs = [
hypothesis
# Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>, <class 'PendingDeprecationWarning'>, <class 'FutureWarning'>) were emitted.
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
pytest-xdist
];

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, buildPythonApplication
, colorama, decorator, psutil, pyte, six
, go, mock, pytestCheckHook, pytest-mock, pytest_7
, go, mock, pytest7CheckHook, pytest-mock
}:
buildPythonApplication rec {
@ -16,7 +16,7 @@ buildPythonApplication rec {
propagatedBuildInputs = [ colorama decorator psutil pyte six ];
nativeCheckInputs = [ go mock (pytestCheckHook.override { pytest = pytest_7; }) pytest-mock ];
nativeCheckInputs = [ go mock pytest7CheckHook pytest-mock ];
disabledTests = lib.optionals stdenv.isDarwin [
"test_settings_defaults"

View File

@ -71,7 +71,7 @@ python3.pkgs.buildPythonApplication rec {
];
nativeCheckInputs = with python3.pkgs; [
(pytestCheckHook.override { pytest = pytest_7; })
pytest7CheckHook
httpretty
dmidecode
# needed for tests; at runtime we rather want the setuid wrapper

View File

@ -11775,6 +11775,8 @@ self: super: with self; {
pytest_7 = callPackage ../development/python-modules/pytest/7.nix { };
pytest7CheckHook = pytestCheckHook.override { pytest = pytest_7; };
pytest-aio = callPackage ../development/python-modules/pytest-aio { };
pytest-aiohttp = callPackage ../development/python-modules/pytest-aiohttp { };