pythonPackages.pytest*: Move pytest to buildInputs to allow easy overriding pytest

This commit is contained in:
Sandro Jäckel 2021-03-12 23:20:19 +01:00 committed by Frederik Rietdijk
parent 970aea96fa
commit 60a10e0989
45 changed files with 92 additions and 46 deletions

View file

@ -9,7 +9,9 @@ buildPythonPackage rec {
sha256 = "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9"; sha256 = "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9";
}; };
propagatedBuildInputs = [ pytest aiohttp ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ aiohttp ];
# There are no tests # There are no tests
doCheck = false; doCheck = false;

View file

@ -21,10 +21,12 @@ buildPythonPackage rec {
sed -i "s/'setuptools-markdown'//g" setup.py sed -i "s/'setuptools-markdown'//g" setup.py
''; '';
buildInputs = [ pytest ];
# requires pandoc < 2.0 # requires pandoc < 2.0
# buildInputs = [ setuptools-markdown ]; # buildInputs = [ setuptools-markdown ];
checkInputs = [ mock ]; checkInputs = [ mock ];
propagatedBuildInputs = [ ansible pytest ]; propagatedBuildInputs = [ ansible ];
# tests not included with release, even on github # tests not included with release, even on github
doCheck = false; doCheck = false;

View file

@ -16,10 +16,11 @@ buildPythonPackage rec {
sha256 = "de2d62f53ecc107ed754d70d562adfa7573677a263216a7f19aa332f20dc6c15"; sha256 = "de2d62f53ecc107ed754d70d562adfa7573677a263216a7f19aa332f20dc6c15";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
numpy numpy
six six
pytest
]; ];
# The tests requires astropy, which itself requires # The tests requires astropy, which itself requires

View file

@ -31,8 +31,7 @@ buildPythonPackage rec {
}) })
]; ];
buildInputs = [
propagatedBuildInputs = [
pytest pytest
]; ];

View file

@ -25,9 +25,10 @@ buildPythonPackage rec {
setuptools_scm setuptools_scm
]; ];
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
hypothesis hypothesis
pytest
pytest-astropy-header pytest-astropy-header
pytest-doctestplus pytest-doctestplus
pytest-filter-subpackage pytest-filter-subpackage

View file

@ -22,7 +22,9 @@ buildPythonPackage rec {
sha256 = "1yqzz44as4pxffmg4hk9lijvnvlc2chg1maq1fbj5i4k4jpagvjz"; sha256 = "1yqzz44as4pxffmg4hk9lijvnvlc2chg1maq1fbj5i4k4jpagvjz";
}; };
propagatedBuildInputs = [ glob2 Mako parse parse-type py pytest six ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ glob2 Mako parse parse-type py six ];
# Tests require extra dependencies # Tests require extra dependencies
checkInputs = [ execnet mock pytest ]; checkInputs = [ execnet mock pytest ];

View file

@ -19,7 +19,9 @@ buildPythonPackage rec {
sha256 = "1hslzzinpwc1zqhbpllqh3sllmiyk69pcycl7ahr0rz3micgwczj"; sha256 = "1hslzzinpwc1zqhbpllqh3sllmiyk69pcycl7ahr0rz3micgwczj";
}; };
propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optionals (pythonOlder "3.4") [ pathlib statistics ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ py-cpuinfo ] ++ lib.optionals (pythonOlder "3.4") [ pathlib statistics ];
meta = { meta = {
description = "Py.test fixture for benchmarking code"; description = "Py.test fixture for benchmarking code";

View file

@ -16,7 +16,9 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools_scm ]; nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ black pytest toml ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ black toml ];
# does not contain tests # does not contain tests
doCheck = false; doCheck = false;

View file

@ -15,7 +15,7 @@ buildPythonPackage rec {
sha256 = "1i01i5ab06ic11na13gcacrlcs2ab6rmaii0yz0x06z5ynnljn6s"; sha256 = "1i01i5ab06ic11na13gcacrlcs2ab6rmaii0yz0x06z5ynnljn6s";
}; };
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
checkInputs = [ pytestCheckHook ]; checkInputs = [ pytestCheckHook ];
meta = with lib; { meta = with lib; {

View file

@ -19,8 +19,9 @@ buildPythonPackage rec {
sha256 = "197nvlqlyfrqpy5lrkmfh1ywpr6j9zipxl9d7syg2a2n7jz3a8rj"; sha256 = "197nvlqlyfrqpy5lrkmfh1ywpr6j9zipxl9d7syg2a2n7jz3a8rj";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
click click
]; ];

View file

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"; sha256 = "c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b";
}; };
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
checkInputs = [ pytest ]; checkInputs = [ pytest ];

View file

@ -17,10 +17,11 @@ buildPythonPackage rec {
sha256 = "fb083925a17ce636f33997c275f61123e63372c1db11fefac1e991ed25a4ca37"; sha256 = "fb083925a17ce636f33997c275f61123e63372c1db11fefac1e991ed25a4ca37";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
six six
numpy numpy
pytest
]; ];
checkInputs = [ checkInputs = [

View file

@ -21,10 +21,11 @@ buildPythonPackage rec {
sha256 = "0v6b4ly0p8nknpnp3f4dbslfsifzzjx2vv27rfylx04kzdhg4m9p"; sha256 = "0v6b4ly0p8nknpnp3f4dbslfsifzzjx2vv27rfylx04kzdhg4m9p";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
factory_boy factory_boy
inflection inflection
pytest
]; ];
checkInputs = [ checkInputs = [

View file

@ -21,8 +21,9 @@ buildPythonPackage rec {
setuptools_scm setuptools_scm
]; ];
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
pytest-doctestplus pytest-doctestplus
pytestcov pytestcov
pytestCheckHook pytestCheckHook

View file

@ -15,8 +15,9 @@ buildPythonPackage rec {
sha256 = "bf070c5485dad82d5b5f5d0eb08d269737e378492d9a68f5223b0a90924c7754"; sha256 = "bf070c5485dad82d5b5f5d0eb08d269737e378492d9a68f5223b0a90924c7754";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ pyflakes ];
checkInputs = [ pytest ]; checkInputs = [ pytest ];
propagatedBuildInputs = [ pytest pyflakes ];
# no longer passes # no longer passes
doCheck = false; doCheck = false;

View file

@ -12,8 +12,9 @@ buildPythonPackage rec {
doCheck = false; doCheck = false;
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
flask flask
werkzeug werkzeug
]; ];

View file

@ -18,9 +18,10 @@ buildPythonPackage rec {
sha256 = "10c4pbh03b4s1q8cjd75lr0fvyf9id0zmdk29566qqsmaz28npas"; sha256 = "10c4pbh03b4s1q8cjd75lr0fvyf9id0zmdk29566qqsmaz28npas";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
freezegun freezegun
pytest
]; ];
checkInputs = [ checkInputs = [

View file

@ -12,7 +12,8 @@ buildPythonPackage rec {
}; };
nativeBuildInputs = [ setuptools_scm ]; nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ pytest pytest-metadata ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ pytest-metadata ];
meta = with lib; { meta = with lib; {
description = "Plugin for generating HTML reports"; description = "Plugin for generating HTML reports";

View file

@ -18,9 +18,10 @@ buildPythonPackage rec {
sha256 = "08idd3y6khxjqkn46diqvkjvsl4w4pxhl6z1hspbkrj0pqwf9isi"; sha256 = "08idd3y6khxjqkn46diqvkjvsl4w4pxhl6z1hspbkrj0pqwf9isi";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
httpx httpx
pytest
]; ];
checkInputs = [ checkInputs = [

View file

@ -11,7 +11,7 @@ buildPythonPackage rec {
}; };
nativeBuildInputs = [ setuptools_scm ]; nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
meta = with lib; { meta = with lib; {
description = "Plugin for accessing test session metadata"; description = "Plugin for accessing test session metadata";

View file

@ -18,7 +18,9 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools_scm ]; nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ pytest mypy filelock ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ mypy filelock ];
# does not contain tests # does not contain tests
doCheck = false; doCheck = false;

View file

@ -20,8 +20,9 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools_scm ]; nativeBuildInputs = [ setuptools_scm ];
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
psutil psutil
]; ];

View file

@ -17,7 +17,7 @@ buildPythonPackage rec {
sha256 = "9c9e4f1b060414c642e88ad98ca60f1fd37937debd704bd8f4a2ef8e08b9cb6d"; sha256 = "9c9e4f1b060414c642e88ad98ca60f1fd37937debd704bd8f4a2ef8e08b9cb6d";
}; };
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook

View file

@ -21,8 +21,9 @@ buildPythonPackage rec {
nativeBuildInputs = [ pytestrunner ]; nativeBuildInputs = [ pytestrunner ];
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
pylint pylint
six six
toml toml

View file

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "0qhxh0z2b3p52v3i0za9mrmjnb1nlvvyi2g23rf88b3xrrm59z33"; sha256 = "0qhxh0z2b3p52v3i0za9mrmjnb1nlvvyi2g23rf88b3xrrm59z33";
}; };
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
checkInputs = [ pytest ]; checkInputs = [ pytest ];
checkPhase = '' checkPhase = ''

View file

@ -19,7 +19,7 @@ buildPythonPackage rec {
setuptools_scm setuptools_scm
]; ];
propagatedBuildInputs = [ buildInputs = [
pytest pytest
]; ];

View file

@ -16,7 +16,7 @@ buildPythonPackage rec {
disabled = pythonOlder "3.5"; disabled = pythonOlder "3.5";
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/jbasko/pytest-random-order"; homepage = "https://github.com/jbasko/pytest-random-order";

View file

@ -14,9 +14,10 @@ buildPythonPackage rec {
sha256 = "e20c58d4b7c359c4975dc3c3d3d67be0905180d2368be0be3ae09b15a136cfc0"; sha256 = "e20c58d4b7c359c4975dc3c3d3d67be0905180d2368be0be3ae09b15a136cfc0";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
six six
pytest
]; ];
checkInputs = [ checkInputs = [

View file

@ -11,9 +11,9 @@ buildPythonPackage rec {
sha256 = "1cb11a17fc121b3918414eb5eaf314ee325f2e693ac7cb3f6abf7560790827f2"; sha256 = "1cb11a17fc121b3918414eb5eaf314ee325f2e693ac7cb3f6abf7560790827f2";
}; };
checkInputs = [ mock pytest ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ pytest ]; checkInputs = [ mock pytest ];
checkPhase = '' checkPhase = ''
py.test test_pytest_rerunfailures.py py.test test_pytest_rerunfailures.py

View file

@ -1,4 +1,5 @@
{ lib { lib
, aiohttp
, async_generator , async_generator
, buildPythonPackage , buildPythonPackage
, doCheck ? true , doCheck ? true
@ -21,7 +22,10 @@ buildPythonPackage rec {
sha256 = "1zpgnw1lqbll59chv4hgcn31mdql1nv4gw9crbihky3ly3d3ncqi"; sha256 = "1zpgnw1lqbll59chv4hgcn31mdql1nv4gw9crbihky3ly3d3ncqi";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
aiohttp
async_generator async_generator
httpx httpx
pytest pytest

View file

@ -25,10 +25,11 @@ buildPythonPackage rec {
toml toml
]; ];
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
requests requests
psutil psutil
pytest
zc_lockfile zc_lockfile
] ++ lib.optional (!isPy3k) subprocess32; ] ++ lib.optional (!isPy3k) subprocess32;

View file

@ -11,9 +11,9 @@ buildPythonPackage rec {
sha256 = "0q8j0ayzmnvlraml6i977ybdq4xi096djhf30n2m1rvnvrhm45nq"; sha256 = "0q8j0ayzmnvlraml6i977ybdq4xi096djhf30n2m1rvnvrhm45nq";
}; };
buildInputs = [ pytest ];
checkInputs = [ cmdline pytest ]; checkInputs = [ cmdline pytest ];
propagatedBuildInputs = [ pytestcov coverage setuptools-git mock pathpy execnet contextlib2 termcolor ]; propagatedBuildInputs = [ pytestcov coverage setuptools-git mock pathpy execnet contextlib2 termcolor ];
nativeBuildInputs = [ pytest ];
checkPhase = '' checkPhase = ''
py.test ${lib.optionalString isPyPy "-k'not (test_run or test_run_integration)'"} py.test ${lib.optionalString isPyPy "-k'not (test_run or test_run_integration)'"}

View file

@ -11,7 +11,9 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools-scm ]; nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ packaging pytest ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ packaging ];
# pypi does not contain tests and GitHub archive is not supported because setuptools-scm can't detect the version # pypi does not contain tests and GitHub archive is not supported because setuptools-scm can't detect the version
doCheck = false; doCheck = false;

View file

@ -15,7 +15,7 @@ buildPythonPackage rec {
sha256 = "1jbzkyp4xki81h01yl4vg3nrg9b6shsk1ryrmkaslffyhrqnj8zh"; sha256 = "1jbzkyp4xki81h01yl4vg3nrg9b6shsk1ryrmkaslffyhrqnj8zh";
}; };
propagatedBuildInputs = [ buildInputs = [
pytest pytest
]; ];

View file

@ -16,9 +16,10 @@ buildPythonPackage rec {
sha256 = "b1b2186b0a72aada6859bea2a5764145e3aaa2c1cfbb23c3a19b5f7b697563d3"; sha256 = "b1b2186b0a72aada6859bea2a5764145e3aaa2c1cfbb23c3a19b5f7b697563d3";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
termcolor termcolor
pytest
packaging packaging
]; ];

View file

@ -16,7 +16,7 @@ buildPythonPackage rec {
sha256 = "0xnsigs0kmpq1za0d4i522sp3f71x5bgpdh3ski0rs74yqy13cr0"; sha256 = "0xnsigs0kmpq1za0d4i522sp3f71x5bgpdh3ski0rs74yqy13cr0";
}; };
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
checkInputs = [ pytestCheckHook pexpect pytestcov ]; checkInputs = [ pytestCheckHook pexpect pytestcov ];

View file

@ -17,7 +17,9 @@ buildPythonPackage rec {
# package has no tests # package has no tests
doCheck = false; doCheck = false;
propagatedBuildInputs = [ pytest tornado ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ tornado ];
meta = with lib; { meta = with lib; {
description = "A py.test plugin providing fixtures and markers to simplify testing of asynchronous tornado applications."; description = "A py.test plugin providing fixtures and markers to simplify testing of asynchronous tornado applications.";

View file

@ -15,8 +15,9 @@ buildPythonPackage rec {
sha256 = "04cg1cfrr55dbi8nljkpcsc103i5c6p0nr46vjr0bnxgkxx03x36"; sha256 = "04cg1cfrr55dbi8nljkpcsc103i5c6p0nr46vjr0bnxgkxx03x36";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
tornado tornado
]; ];

View file

@ -13,11 +13,12 @@ buildPythonPackage rec {
sha256 = "0bhh2nknhp14jzsx4zzpqm4qnfaihyi65cjf6kf6qgdhc0ax6nf4"; sha256 = "0bhh2nknhp14jzsx4zzpqm4qnfaihyi65cjf6kf6qgdhc0ax6nf4";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
trio trio
async_generator async_generator
outcome outcome
pytest
]; ];
checkInputs = [ checkInputs = [

View file

@ -16,7 +16,9 @@ buildPythonPackage rec {
sha256 = "cee2320becc5625050ab221b8f38533e636651a24644612f4726891fdf1f1847"; sha256 = "cee2320becc5625050ab221b8f38533e636651a24644612f4726891fdf1f1847";
}; };
propagatedBuildInputs = [ greenlet pytest decorator ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ greenlet decorator ];
meta = with lib; { meta = with lib; {
description = "A twisted plugin for py.test"; description = "A twisted plugin for py.test";

View file

@ -16,8 +16,9 @@ buildPythonPackage rec {
sha256 = "1i6fin91mklvbi8jzfiswvwf1m91f43smpj36a17xrzk4gisfs6i"; sha256 = "1i6fin91mklvbi8jzfiswvwf1m91f43smpj36a17xrzk4gisfs6i";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
vcrpy vcrpy
]; ];

View file

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "5939f76fe04ad18297e53af0c9fb38aca1ec74db807bd40ad72733603adbbc7d"; sha256 = "5939f76fe04ad18297e53af0c9fb38aca1ec74db807bd40ad72733603adbbc7d";
}; };
propagatedBuildInputs = [ pytest ]; buildInputs = [ pytest ];
meta = { meta = {
description = "Plugin to list Python warnings in pytest report"; description = "Plugin to list Python warnings in pytest report";

View file

@ -16,7 +16,9 @@ buildPythonPackage rec {
sha256 = "06136f03d5b361718b8d0d234042f7b2f203910d8568f63df2f866b547b3d4b9"; sha256 = "06136f03d5b361718b8d0d234042f7b2f203910d8568f63df2f866b547b3d4b9";
}; };
propagatedBuildInputs = [ pytest colorama docopt watchdog ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ colorama docopt watchdog ];
# No Tests # No Tests
doCheck = false; doCheck = false;

View file

@ -14,7 +14,10 @@ buildPythonPackage rec {
}; };
nativeBuildInputs = [ setuptools_scm ]; nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ psutil pytest ];
buildInputs = [ pytest ];
propagatedBuildInputs = [ psutil ];
# Remove test QoL package from install_requires # Remove test QoL package from install_requires
postPatch = '' postPatch = ''

View file

@ -16,8 +16,9 @@ buildPythonPackage rec {
sha256 = "1kyq5rg27dsnj7dc6x9y7r8vwf8rc88y2ppnnw6r96alw0nn9fn4"; sha256 = "1kyq5rg27dsnj7dc6x9y7r8vwf8rc88y2ppnnw6r96alw0nn9fn4";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pytest
virtual-display virtual-display
]; ];