mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-14 00:22:44 +03:00
Merge pull request #331138 from pbsds/fix-pytest-cov-stub-migrations-1722359134
treewide: migrate to pytest-cov-stub
This commit is contained in:
commit
e6fe66b285
@ -6,6 +6,7 @@
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
pytest-aiohttp,
|
||||
pytest-cov-stub,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
@ -32,11 +33,6 @@ buildPythonPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pytest.ini \
|
||||
--replace "--cov=aiojobs/ --cov=tests/ --cov-report term" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ async-timeout ];
|
||||
@ -48,6 +44,7 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-aiohttp
|
||||
pytest-cov-stub
|
||||
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||
|
||||
pythonImportsCheck = [ "aiojobs" ];
|
||||
|
@ -8,6 +8,7 @@
|
||||
yarl,
|
||||
aresponses,
|
||||
pytest-asyncio,
|
||||
pytest-cov-stub,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
@ -34,14 +35,14 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
aresponses
|
||||
pytest-asyncio
|
||||
pytest-cov-stub
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Upstream doesn't set a version for the pyproject.toml
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "0.0.0" "${version}" \
|
||||
--replace "--cov" ""
|
||||
--replace "0.0.0" "${version}"
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "ambee" ];
|
||||
|
@ -3,6 +3,7 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
@ -20,12 +21,10 @@ buildPythonPackage rec {
|
||||
sha256 = "0cssdcridadjzichz1vv1ng7jwphqkn8ihh83hpz9mcjmxyb94qc";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace " --cov=anonip --cov-report=term-missing --no-cov-on-fail" ""
|
||||
'';
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
];
|
||||
|
||||
pytestFlagsArray = [ "tests.py" ];
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
jupyterhub,
|
||||
pythonOlder,
|
||||
pytest-asyncio,
|
||||
pytest-cov-stub,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
@ -35,13 +36,9 @@ buildPythonPackage rec {
|
||||
jupyterhub
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "--cov=batchspawner" ""
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-asyncio
|
||||
pytest-cov-stub
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
setuptools,
|
||||
strct,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pyyaml,
|
||||
}:
|
||||
|
||||
@ -31,11 +32,6 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pytest.ini \
|
||||
--replace-fail \
|
||||
"--cov" \
|
||||
"#--cov"
|
||||
|
||||
# configure correct version, which fails due to missing .git
|
||||
substituteInPlace versioneer.py birch/_version.py \
|
||||
--replace-fail '"0+unknown"' '"${version}"'
|
||||
@ -54,6 +50,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
pyyaml
|
||||
];
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
watchdog,
|
||||
portalocker,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pymongo,
|
||||
dnspython,
|
||||
pymongo-inmemory,
|
||||
@ -39,15 +40,9 @@ buildPythonPackage rec {
|
||||
portalocker
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail \
|
||||
'"--cov' \
|
||||
'#"--cov'
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
pymongo
|
||||
dnspython
|
||||
pymongo-inmemory
|
||||
|
@ -7,6 +7,7 @@
|
||||
fetchpatch,
|
||||
poetry-core,
|
||||
pytest-asyncio,
|
||||
pytest-cov-stub,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
yarl,
|
||||
@ -37,8 +38,7 @@ buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace '"0.0.0"' '"${version}"' \
|
||||
--replace 'addopts = "--cov"' ""
|
||||
--replace '"0.0.0"' '"${version}"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
@ -53,6 +53,7 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
aresponses
|
||||
pytest-asyncio
|
||||
pytest-cov-stub
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
poetry-core,
|
||||
pydantic,
|
||||
pyjwt,
|
||||
pytest-cov-stub,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
@ -28,11 +29,6 @@ buildPythonPackage rec {
|
||||
hash = "sha256-FTNLyCcwDU6EssQDJlwtmA7cQj57fsOaecvbpwswirU=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "--cov=githubkit --cov-append --cov-report=term-missing" ""
|
||||
'';
|
||||
|
||||
pythonRelaxDeps = [ "hishel" ];
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
@ -61,6 +57,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
pytest-xdist
|
||||
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
scipy,
|
||||
pandas,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
@ -25,11 +26,6 @@ buildPythonPackage rec {
|
||||
hash = "sha256-An5RzK0nnRaBI6JEUl5shLrA22RgWzEbC9NJiRvgxT4=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tox.ini \
|
||||
--replace-fail "--cov=./hickle" ""
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@ -42,6 +38,7 @@ buildPythonPackage rec {
|
||||
astropy
|
||||
pandas
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
scipy
|
||||
];
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
mwoauth,
|
||||
pyjwt,
|
||||
pytest-asyncio,
|
||||
pytest-cov-stub,
|
||||
pytestCheckHook,
|
||||
requests,
|
||||
requests-mock,
|
||||
@ -31,11 +32,6 @@ buildPythonPackage rec {
|
||||
hash = "sha256-gFhhOCcmorkrLxrup9fICh5ueCrc64fxfuZXTQG1tMk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail " --cov=oauthenticator" ""
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@ -58,6 +54,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-asyncio
|
||||
pytest-cov-stub
|
||||
pytestCheckHook
|
||||
requests-mock
|
||||
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||
|
@ -4,6 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
bson,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pyyaml,
|
||||
setuptools,
|
||||
}:
|
||||
@ -23,8 +24,6 @@ buildPythonPackage rec {
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "'pytest-runner'" ""
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "--cov=pymarshal --cov-report=html --cov-report=term" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
@ -33,6 +32,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
bson
|
||||
pyyaml
|
||||
];
|
||||
|
@ -4,6 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
setuptools,
|
||||
mirakuru,
|
||||
port-for,
|
||||
@ -28,7 +29,6 @@ buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "--cov" "" \
|
||||
--replace-fail "--max-worker-restart=0" ""
|
||||
sed -i 's#/usr/lib/postgresql/.*/bin/pg_ctl#${postgresql}/bin/pg_ctl#' pytest_postgresql/plugin.py
|
||||
'';
|
||||
@ -45,6 +45,7 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
postgresql
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
];
|
||||
pytestFlagsArray = [
|
||||
"-p"
|
||||
|
@ -13,6 +13,7 @@
|
||||
prettytable,
|
||||
pytest-mock,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pythonOlder,
|
||||
requests,
|
||||
setuptools,
|
||||
@ -37,7 +38,7 @@ buildPythonPackage rec {
|
||||
substituteInPlace requirements.txt \
|
||||
--replace-fail "==" ">="
|
||||
substituteInPlace pytest.ini \
|
||||
--replace ' --cov toggl -m "not premium"' ""
|
||||
--replace ' -m "not premium"' ""
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
@ -60,6 +61,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
pytest-mock
|
||||
faker
|
||||
factory-boy
|
||||
|
Loading…
Reference in New Issue
Block a user