diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index 571097ad4786c..52cb4bd5e70dc 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -35,18 +35,18 @@ python3.pkgs.buildPythonApplication rec { LC_ALL = "en_US.UTF-8"; - pytestFlags = lib.optionals (xineBackend || !withGstPlugins) [ - "--ignore=tests/plugin/test_replaygain.py" + disabledTestPaths = lib.optionals (xineBackend || !withGstPlugins) [ + "tests/plugin/test_replaygain.py" ] ++ [ # requires networking - "--ignore=tests/test_browsers_iradio.py" + "tests/test_browsers_iradio.py" # the default theme doesn't have the required icons - "--ignore=tests/plugin/test_trayicon.py" + "tests/plugin/test_trayicon.py" # upstream does actually not enforce source code linting - "--ignore=tests/quality" + "tests/quality" # build failure on Arch Linux # https://github.com/NixOS/nixpkgs/pull/77796#issuecomment-575841355 - "--ignore=tests/test_operon.py" + "tests/test_operon.py" ]; checkPhase = '' diff --git a/pkgs/applications/misc/gallery-dl/default.nix b/pkgs/applications/misc/gallery-dl/default.nix index 6ccc31ef9b59d..b965265f8457c 100644 --- a/pkgs/applications/misc/gallery-dl/default.nix +++ b/pkgs/applications/misc/gallery-dl/default.nix @@ -12,10 +12,10 @@ buildPythonApplication rec { propagatedBuildInputs = [ requests ]; checkInputs = [ pytestCheckHook ]; - pytestFlagsArray = [ + disabledTestPaths = [ # requires network access - "--ignore=test/test_results.py" - "--ignore=test/test_downloader.py" + "test/test_results.py" + "test/test_downloader.py" ]; meta = with lib; { diff --git a/pkgs/applications/networking/errbot/default.nix b/pkgs/applications/networking/errbot/default.nix index f4a44275b693e..bb3fa82a5df1b 100644 --- a/pkgs/applications/networking/errbot/default.nix +++ b/pkgs/applications/networking/errbot/default.nix @@ -70,7 +70,7 @@ buildPythonApplication rec { ]; # Slack backend test has an import issue - pytestFlagsArray = [ "--ignore=tests/backend_tests/slack_test.py" ]; + disabledTestPaths = [ "tests/backend_tests/slack_test.py" ]; disabledTests = [ "backup" diff --git a/pkgs/development/python-modules/anyio/default.nix b/pkgs/development/python-modules/anyio/default.nix index e6cc3182487a3..23fbb4657e06d 100644 --- a/pkgs/development/python-modules/anyio/default.nix +++ b/pkgs/development/python-modules/anyio/default.nix @@ -43,12 +43,12 @@ buildPythonPackage rec { uvloop ]; - pytestFlagsArray = [ + disabledTestPaths = [ # lots of DNS lookups - "--ignore=tests/test_sockets.py" + "tests/test_sockets.py" ] ++ lib.optionals stdenv.isDarwin [ # darwin sandboxing limitations - "--ignore=tests/streams/test_tls.py" + "tests/streams/test_tls.py" ]; pythonImportsCheck = [ "anyio" ]; diff --git a/pkgs/development/python-modules/anytree/default.nix b/pkgs/development/python-modules/anytree/default.nix index c11833ba57932..1f638fc2648a2 100644 --- a/pkgs/development/python-modules/anytree/default.nix +++ b/pkgs/development/python-modules/anytree/default.nix @@ -42,10 +42,10 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook nose ]; - pytestFlagsArray = lib.optionals (pythonOlder "3.4") [ + disabledTestPaths = lib.optionals (pythonOlder "3.4") [ # Use enums, which aren't available pre-python3.4 - "--ignore=tests/test_resolver.py" - "--ignore=tests/test_search.py" + "tests/test_resolver.py" + "tests/test_search.py" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/auth0-python/default.nix b/pkgs/development/python-modules/auth0-python/default.nix index 79844afe318e0..ba3ef81580612 100644 --- a/pkgs/development/python-modules/auth0-python/default.nix +++ b/pkgs/development/python-modules/auth0-python/default.nix @@ -24,9 +24,9 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = [ + disabledTestPaths = [ # jwt package is not available in nixpkgs - "--ignore=auth0/v3/test/authentication/test_token_verifier.py" + "auth0/v3/test/authentication/test_token_verifier.py" ]; # tries to ping websites (e.g. google.com) diff --git a/pkgs/development/python-modules/cassandra-driver/default.nix b/pkgs/development/python-modules/cassandra-driver/default.nix index 55468ba0fdf7b..99c6e24e486de 100644 --- a/pkgs/development/python-modules/cassandra-driver/default.nix +++ b/pkgs/development/python-modules/cassandra-driver/default.nix @@ -32,7 +32,9 @@ buildPythonPackage rec { }; nativeBuildInputs = [ cython ]; + buildInputs = [ libev ]; + propagatedBuildInputs = [ six geomet ] ++ lib.optionals (pythonOlder "3.4") [ futures ]; @@ -46,9 +48,6 @@ buildPythonPackage rec { # increase tolerance for time-based test substituteInPlace tests/unit/io/utils.py --replace 'delta=.15' 'delta=.3' ''; - postCheck = '' - unset NIX_REDIRECTS LD_PRELOAD - ''; checkInputs = [ pytestCheckHook @@ -66,9 +65,13 @@ buildPythonPackage rec { pytestFlagsArray = [ "tests/unit" + ]; + + disabledTestPaths = [ # requires puresasl - "--ignore=tests/unit/advanced/test_auth.py" + "tests/unit/advanced/test_auth.py" ]; + disabledTests = [ # doesn't seem to be intended to be run directly "_PoolTests" @@ -76,6 +79,10 @@ buildPythonPackage rec { "test_connection_initialization" ]; + postCheck = '' + unset NIX_REDIRECTS LD_PRELOAD + ''; + meta = with lib; { description = "A Python client driver for Apache Cassandra"; homepage = "http://datastax.github.io/python-driver"; diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix index f0fe81f85e283..0be84b8c6a479 100644 --- a/pkgs/development/python-modules/celery/default.nix +++ b/pkgs/development/python-modules/celery/default.nix @@ -1,6 +1,6 @@ { lib, buildPythonPackage, fetchPypi , billiard, click, click-didyoumean, click-plugins, click-repl, kombu, pytz, vine -, boto3, case, moto, pytest, pytest-celery, pytest-subtests, pytest-timeout +, boto3, case, moto, pytestCheckHook, pytest-celery, pytest-subtests, pytest-timeout }: buildPythonPackage rec { @@ -19,20 +19,26 @@ buildPythonPackage rec { propagatedBuildInputs = [ billiard click click-didyoumean click-plugins click-repl kombu pytz vine ]; - checkInputs = [ boto3 case moto pytest pytest-celery pytest-subtests pytest-timeout ]; + checkInputs = [ boto3 case moto pytestCheckHook pytest-celery pytest-subtests pytest-timeout ]; # ignore test that's incompatible with pytest5 # test_eventlet touches network # test_mongodb requires pymongo # test_multi tries to create directories under /var - checkPhase = '' - pytest -k 'not restore_current_app_fallback and not msgpack and not on_apply and not pytest' \ - --ignore=t/unit/contrib/test_pytest.py \ - --ignore=t/unit/concurrency/test_eventlet.py \ - --ignore=t/unit/bin/test_multi.py \ - --ignore=t/unit/apps/test_multi.py \ - --ignore=t/unit/backends/test_mongodb.py - ''; + disabledTestPaths = [ + "t/unit/contrib/test_pytest.py" + "t/unit/concurrency/test_eventlet.py" + "t/unit/bin/test_multi.py" + "t/unit/apps/test_multi.py" + "t/unit/backends/test_mongodb.py" + ]; + + disabledTests = [ + "restore_current_app_fallback" + "msgpack" + "on_apply" + "pytest" + ]; meta = with lib; { homepage = "https://github.com/celery/celery/"; diff --git a/pkgs/development/python-modules/cherrypy/17.nix b/pkgs/development/python-modules/cherrypy/17.nix index 2ee8eb3bd0caf..384f21890a97a 100644 --- a/pkgs/development/python-modules/cherrypy/17.nix +++ b/pkgs/development/python-modules/cherrypy/17.nix @@ -1,7 +1,6 @@ { lib, stdenv, buildPythonPackage, fetchPypi -, setuptools_scm -, cheroot, contextlib2, portend, routes, six, zc_lockfile -, backports_unittest-mock, objgraph, pathpy, pytest, pytestcov, backports_functools_lru_cache, requests_toolbelt +, setuptools_scm, cheroot, contextlib2, portend, routes, six, zc_lockfile +, backports_unittest-mock, objgraph, pathpy, pytestCheckHook, pytestcov, backports_functools_lru_cache, requests_toolbelt }: buildPythonPackage rec { @@ -21,12 +20,12 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools_scm ]; checkInputs = [ - backports_unittest-mock objgraph pathpy pytest pytestcov backports_functools_lru_cache requests_toolbelt + backports_unittest-mock objgraph pathpy pytestCheckHook pytestcov backports_functools_lru_cache requests_toolbelt ]; - checkPhase = '' - pytest ${lib.optionalString stdenv.isDarwin "--ignore=cherrypy/test/test_wsgi_unix_socket.py"} - ''; + disabledTestPaths = lib.optionals stdenv.isDarwin [ + "cherrypy/test/test_wsgi_unix_socket.py" + ]; meta = with lib; { homepage = "https://www.cherrypy.org"; diff --git a/pkgs/development/python-modules/cirq/default.nix b/pkgs/development/python-modules/cirq/default.nix index 16c61f2e895f0..b646f061f098b 100644 --- a/pkgs/development/python-modules/cirq/default.nix +++ b/pkgs/development/python-modules/cirq/default.nix @@ -28,7 +28,6 @@ buildPythonPackage rec { pname = "cirq"; version = "0.9.1"; - disabled = pythonOlder "3.6"; src = fetchFromGitHub { @@ -69,6 +68,7 @@ buildPythonPackage rec { doCheck = true; # pythonImportsCheck = [ "cirq" "cirq.Circuit" ]; # cirq's importlib hook doesn't work here dontUseSetuptoolsCheck = true; + checkInputs = [ pytestCheckHook pytest-asyncio @@ -80,10 +80,14 @@ buildPythonPackage rec { ]; pytestFlagsArray = [ - "--ignore=dev_tools" # Only needed when developing new code, which is out-of-scope - "--ignore=cirq/contrib/" # requires external (unpackaged) python packages, so untested. "--benchmark-disable" # Don't need to run benchmarks when packaging. ]; + + disabledTestPaths = [ + "dev_tools" # Only needed when developing new code, which is out-of-scope + "cirq/contrib/" # requires external (unpackaged) python packages, so untested. + ]; + disabledTests = [ "test_convert_to_ion_gates" # fails on some systems due to rounding error, 0.75 != 0.750...2 ] ++ lib.optionals stdenv.isAarch64 [ diff --git a/pkgs/development/python-modules/connexion/default.nix b/pkgs/development/python-modules/connexion/default.nix index 6b212be3bb7bf..85d3b4bb32ffb 100644 --- a/pkgs/development/python-modules/connexion/default.nix +++ b/pkgs/development/python-modules/connexion/default.nix @@ -4,7 +4,6 @@ , glibcLocales , lib , pythonOlder - , aiohttp , aiohttp-swagger , aiohttp-jinja2 @@ -51,9 +50,9 @@ buildPythonPackage rec { flask swagger-ui-bundle ] - ++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson pytest-aiohttp ] - ++ lib.optional (pythonOlder "3.7") glibcLocales - ; + ++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson pytest-aiohttp ] + ++ lib.optional (pythonOlder "3.7") glibcLocales; + propagatedBuildInputs = [ clickclick jsonschema @@ -64,11 +63,9 @@ buildPythonPackage rec { openapi-spec-validator swagger-ui-bundle flask - ] - ++ lib.optional (pythonOlder "3.4") pathlib - ++ lib.optional (pythonOlder "3.6") typing - ++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson ] - ; + ] ++ lib.optional (pythonOlder "3.4") pathlib + ++ lib.optional (pythonOlder "3.6") typing + ++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson ]; preConfigure = lib.optional (pythonOlder "3.7") '' export LANG=en_US.UTF-8 diff --git a/pkgs/development/python-modules/dask-image/default.nix b/pkgs/development/python-modules/dask-image/default.nix index a68c86538ee11..2a12fb07e445f 100644 --- a/pkgs/development/python-modules/dask-image/default.nix +++ b/pkgs/development/python-modules/dask-image/default.nix @@ -5,7 +5,7 @@ , numpy, toolz # dask[array] , scipy , pims -, pytest +, pytestCheckHook , pytest-flake8 , scikitimage }: @@ -20,9 +20,11 @@ buildPythonPackage rec { }; nativeBuildInputs = [ pytest-flake8 ]; + propagatedBuildInputs = [ dask numpy toolz scipy pims ]; + checkInputs = [ - pytest + pytestCheckHook scikitimage ]; @@ -34,9 +36,10 @@ buildPythonPackage rec { ''; # scikit.external is not exported - checkPhase = '' - pytest --ignore=tests/test_dask_image/ - ''; + disabledTestPaths = [ + "tests/test_dask_image" + ]; + pythonImportsCheck = [ "dask_image" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/databases/default.nix b/pkgs/development/python-modules/databases/default.nix index f5a7c52ef8e50..8f5f919f0508a 100644 --- a/pkgs/development/python-modules/databases/default.nix +++ b/pkgs/development/python-modules/databases/default.nix @@ -4,7 +4,7 @@ , sqlalchemy , aiocontextvars , isPy27 -, pytest +, pytestCheckHook , asyncpg , aiomysql , aiosqlite @@ -28,7 +28,7 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook asyncpg aiomysql aiosqlite @@ -36,9 +36,10 @@ buildPythonPackage rec { # big chunk to tests depend on existing posgresql and mysql databases # some tests are better than no tests - checkPhase = '' - pytest --ignore=tests/test_integration.py --ignore=tests/test_databases.py - ''; + disabledTestPaths = [ + "tests/test_integration.py" + "tests/test_databases.py" + ]; meta = with lib; { description = "Async database support for Python"; diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix index 990908efe0346..97a43c2e4a6f6 100644 --- a/pkgs/development/python-modules/faker/default.nix +++ b/pkgs/development/python-modules/faker/default.nix @@ -31,8 +31,8 @@ buildPythonPackage rec { ]; # avoid tests which import random2, an abandoned library - pytestFlagsArray = [ - "--ignore=tests/providers/test_ssn.py" + disabledTestPaths = [ + "tests/providers/test_ssn.py" ]; pythonImportsCheck = [ "faker" ]; diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index dadfc41c68bc2..54f721d1e0990 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -51,7 +51,7 @@ buildPythonPackage rec { ]; # disabled tests require orjson which requires rust nightly - pytestFlagsArray = [ "--ignore=tests/test_default_response_class.py" ]; + disabledTestPaths = [ "tests/test_default_response_class.py" ]; disabledTests = [ "test_get_custom_response" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/fastecdsa/default.nix b/pkgs/development/python-modules/fastecdsa/default.nix index 04d9da87c5c11..2f4a9e820f8f4 100644 --- a/pkgs/development/python-modules/fastecdsa/default.nix +++ b/pkgs/development/python-modules/fastecdsa/default.nix @@ -19,15 +19,15 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; # skip tests which require being online to download test vectors - pytestFlags = [ - "--ignore=fastecdsa/tests/test_wycheproof_vectors.py" - "--ignore=fastecdsa/tests/test_rfc6979_ecdsa.py" + disabledTestPaths = [ + "fastecdsa/tests/test_wycheproof_vectors.py" + "fastecdsa/tests/test_rfc6979_ecdsa.py" ]; # skip tests for now, they fail with # ImportError: cannot import name '_ecdsa' from 'fastecdsa' # but the installed package works just fine - doCheck = false; + # doCheck = false; pythonImportsCheck = [ "fastecdsa" ]; diff --git a/pkgs/development/python-modules/fints/default.nix b/pkgs/development/python-modules/fints/default.nix index c4dfc04046b71..863e9cbf509c3 100644 --- a/pkgs/development/python-modules/fints/default.nix +++ b/pkgs/development/python-modules/fints/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, fetchFromGitHub, isPy27 , bleach , mt-940 -, pytest +, pytestCheckHook , requests , sepaxml }: @@ -20,12 +20,16 @@ buildPythonPackage rec { propagatedBuildInputs = [ requests mt-940 sepaxml bleach ]; - checkInputs = [ pytest ]; + checkInputs = [ pytestCheckHook ]; # ignore network calls and broken fixture - checkPhase = '' - pytest . --ignore=tests/test_client.py -k 'not robust_mode' - ''; + disabledTestPaths = [ + "tests/test_client.py" + ]; + + disabledTests = [ + "robust_mode" +]; meta = with lib; { homepage = "https://github.com/raphaelm/python-fints/"; diff --git a/pkgs/development/python-modules/flake8/default.nix b/pkgs/development/python-modules/flake8/default.nix index 6f1d8181a5839..a3364e885a06e 100644 --- a/pkgs/development/python-modules/flake8/default.nix +++ b/pkgs/development/python-modules/flake8/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi, pythonOlder -, mock, pytest, pytestrunner +, mock, pytestCheckHook, pytestrunner , configparser, enum34, mccabe, pycodestyle, pyflakes, functools32, typing, importlib-metadata }: @@ -12,17 +12,18 @@ buildPythonPackage rec { sha256 = "aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b"; }; - checkInputs = [ pytest mock pytestrunner ]; propagatedBuildInputs = [ pyflakes pycodestyle mccabe ] ++ lib.optionals (pythonOlder "3.2") [ configparser functools32 ] ++ lib.optionals (pythonOlder "3.4") [ enum34 ] ++ lib.optionals (pythonOlder "3.5") [ typing ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + checkInputs = [ pytestCheckHook mock pytestrunner ]; + # fixtures fail to initialize correctly - checkPhase = '' - py.test tests --ignore=tests/integration/test_checker.py - ''; + disabledTestPaths = [ + "tests/integration/test_checker.py" + ]; meta = with lib; { description = "Code checking using pep8 and pyflakes"; diff --git a/pkgs/development/python-modules/flask-restful/default.nix b/pkgs/development/python-modules/flask-restful/default.nix index d5b48fd0428af..da24d8d13df3d 100644 --- a/pkgs/development/python-modules/flask-restful/default.nix +++ b/pkgs/development/python-modules/flask-restful/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi, fetchpatch, isPy3k -, nose, mock, blinker, pytest +, nose, mock, blinker, pytestCheckHook , flask, six, pytz, aniso8601, pycrypto }: @@ -14,13 +14,17 @@ buildPythonPackage rec { propagatedBuildInputs = [ flask six pytz aniso8601 pycrypto ]; - checkInputs = [ pytest nose mock blinker ]; + checkInputs = [ pytestCheckHook nose mock blinker ]; # test_reqparse.py: werkzeug move Multidict location (only imported in tests) # handle_non_api_error isn't updated for addition encoding argument - checkPhase = '' - pytest --ignore=tests/test_reqparse.py -k 'not handle_non_api_error' - ''; + disabledTestPaths = [ + "tests/test_reqparse.py" + ]; + + disabledTests = [ + "handle_non_api_error" + ]; meta = with lib; { homepage = "https://flask-restful.readthedocs.io/"; diff --git a/pkgs/development/python-modules/fs/default.nix b/pkgs/development/python-modules/fs/default.nix index aa6831441d898..44c67fad1da3d 100644 --- a/pkgs/development/python-modules/fs/default.nix +++ b/pkgs/development/python-modules/fs/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { HOME=$(mktemp -d) ''; - pytestFlagsArray = [ "--ignore=tests/test_opener.py" ]; + disabledTestPaths = [ "tests/test_opener.py" ]; disabledTests = [ "user_data_repr" @@ -62,5 +62,4 @@ buildPythonPackage rec { maintainers = with maintainers; [ lovek323 ]; platforms = platforms.unix; }; - } diff --git a/pkgs/development/python-modules/google-cloud-firestore/default.nix b/pkgs/development/python-modules/google-cloud-firestore/default.nix index 30ef0af76a1a5..f925949982bca 100644 --- a/pkgs/development/python-modules/google-cloud-firestore/default.nix +++ b/pkgs/development/python-modules/google-cloud-firestore/default.nix @@ -39,10 +39,10 @@ buildPythonPackage rec { rm -r google ''; - pytestFlagsArray = [ + disabledTestPaths = [ # tests are broken - "--ignore=tests/system/test_system.py" - "--ignore=tests/system/test_system_async.py" + "tests/system/test_system.py" + "tests/system/test_system_async.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/google-cloud-speech/default.nix b/pkgs/development/python-modules/google-cloud-speech/default.nix index 65ad31af2eb20..a187c6fd1d03d 100644 --- a/pkgs/development/python-modules/google-cloud-speech/default.nix +++ b/pkgs/development/python-modules/google-cloud-speech/default.nix @@ -22,10 +22,10 @@ buildPythonPackage rec { checkInputs = [ mock pytestCheckHook pytest-asyncio ]; - pytestFlagsArray = [ + disabledTestPaths = [ # requrire credentials - "--ignore=tests/system/gapic/v1/test_system_speech_v1.py" - "--ignore=tests/system/gapic/v1p1beta1/test_system_speech_v1p1beta1.py" + "tests/system/gapic/v1/test_system_speech_v1.py" + "tests/system/gapic/v1p1beta1/test_system_speech_v1p1beta1.py" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/google-cloud-storage/default.nix b/pkgs/development/python-modules/google-cloud-storage/default.nix index 84706a8b5a91b..80a5fb735837c 100644 --- a/pkgs/development/python-modules/google-cloud-storage/default.nix +++ b/pkgs/development/python-modules/google-cloud-storage/default.nix @@ -43,9 +43,9 @@ buildPythonPackage rec { "test_build_api_url" ]; - pytestFlagsArray = [ - "--ignore=tests/unit/test_bucket.py" - "--ignore=tests/system/test_system.py" + disabledTestPaths = [ + "tests/unit/test_bucket.py" + "tests/system/test_system.py" ]; # prevent google directory from shadowing google imports diff --git a/pkgs/development/python-modules/graspologic/default.nix b/pkgs/development/python-modules/graspologic/default.nix index b4e8803784b56..64d0c60660de0 100644 --- a/pkgs/development/python-modules/graspologic/default.nix +++ b/pkgs/development/python-modules/graspologic/default.nix @@ -16,7 +16,6 @@ buildPythonPackage rec { pname = "graspologic"; version = "0.3"; - disabled = isPy27; src = fetchFromGitHub { @@ -37,7 +36,12 @@ buildPythonPackage rec { ]; checkInputs = [ pytestCheckHook pytestcov ]; - pytestFlagsArray = [ "tests" "--ignore=docs" "--ignore=tests/test_sklearn.py" ]; + + disabledTestPaths = [ + "docs" + "tests/test_sklearn.py" + ]; + disabledTests = [ "gridplot_outputs" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/gremlinpython/default.nix b/pkgs/development/python-modules/gremlinpython/default.nix index 97d169283b232..5678efc699c5e 100644 --- a/pkgs/development/python-modules/gremlinpython/default.nix +++ b/pkgs/development/python-modules/gremlinpython/default.nix @@ -34,17 +34,20 @@ buildPythonPackage rec { substituteInPlace setup.cfg --replace 'addopts' '#addopts' ''; - # many tests expect a running tinkerpop server pytestFlagsArray = [ - "--ignore=tests/driver/test_client.py" - "--ignore=tests/driver/test_driver_remote_connection.py" - "--ignore=tests/driver/test_driver_remote_connection_threaded.py" - "--ignore=tests/process/test_dsl.py" - "--ignore=tests/structure/io/test_functionalityio.py" # disabledTests doesn't quite allow us to be precise enough for this "-k 'not (TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid))'" ]; + # many tests expect a running tinkerpop server + disabledTestPaths = [ + "tests/driver/test_client.py" + "tests/driver/test_driver_remote_connection.py" + "tests/driver/test_driver_remote_connection_threaded.py" + "tests/process/test_dsl.py" + "tests/structure/io/test_functionalityio.py" + ]; + meta = with lib; { description = "Gremlin-Python implements Gremlin, the graph traversal language of Apache TinkerPop, within the Python language"; homepage = "https://tinkerpop.apache.org/"; diff --git a/pkgs/development/python-modules/hcloud/default.nix b/pkgs/development/python-modules/hcloud/default.nix index 8f9d69a8941d7..be3bbecedf26e 100644 --- a/pkgs/development/python-modules/hcloud/default.nix +++ b/pkgs/development/python-modules/hcloud/default.nix @@ -7,7 +7,7 @@ , flake8 , isort , mock -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -21,12 +21,12 @@ buildPythonPackage rec { propagatedBuildInputs = [ future requests python-dateutil ]; - checkInputs = [ flake8 isort mock pytest ]; + checkInputs = [ flake8 isort mock pytestCheckHook ]; # Skip integration tests since they require a separate external fake API endpoint. - checkPhase = '' - pytest --ignore=tests/integration - ''; + disabledTestPaths = [ + "tests/integration" + ]; meta = with lib; { description = "Official Hetzner Cloud python library"; diff --git a/pkgs/development/python-modules/httpcore/default.nix b/pkgs/development/python-modules/httpcore/default.nix index dbbdf0bb38c0d..8f3c95ea8cc37 100644 --- a/pkgs/development/python-modules/httpcore/default.nix +++ b/pkgs/development/python-modules/httpcore/default.nix @@ -40,11 +40,11 @@ buildPythonPackage rec { trio ]; - pytestFlagsArray = [ + disabledTestPaths = [ # these tests fail during dns lookups: httpcore.ConnectError: [Errno -2] Name or service not known - "--ignore=tests/test_threadsafety.py" - "--ignore=tests/sync_tests/test_interfaces.py" - "--ignore=tests/sync_tests/test_retries.py" + "tests/test_threadsafety.py" + "tests/sync_tests/test_interfaces.py" + "tests/sync_tests/test_retries.py" ]; pythonImportsCheck = [ "httpcore" ]; diff --git a/pkgs/development/python-modules/hyppo/default.nix b/pkgs/development/python-modules/hyppo/default.nix index 5b2869e10d192..263444d513b9b 100644 --- a/pkgs/development/python-modules/hyppo/default.nix +++ b/pkgs/development/python-modules/hyppo/default.nix @@ -11,7 +11,6 @@ buildPythonPackage rec { pname = "hyppo"; version = "0.1.3"; - disabled = isPy27; src = fetchFromGitHub { @@ -29,7 +28,7 @@ buildPythonPackage rec { ]; checkInputs = [ pytestCheckHook pytestcov ]; - pytestFlagsArray = [ "--ignore=docs" ]; + disabledTestPaths = [ "docs" ]; meta = with lib; { homepage = "https://github.com/neurodata/hyppo"; diff --git a/pkgs/development/python-modules/i3ipc/default.nix b/pkgs/development/python-modules/i3ipc/default.nix index 37d5ccd8786f9..08b05d7c916ce 100644 --- a/pkgs/development/python-modules/i3ipc/default.nix +++ b/pkgs/development/python-modules/i3ipc/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub -, xorgserver, pytest, pytest-xvfb, i3, python, xlib, xdpyinfo +, xorgserver, pytestCheckHook, pytest-xvfb, i3, python, xlib, xdpyinfo , makeFontsConf, coreutils }: @@ -13,24 +13,25 @@ buildPythonPackage rec { rev = "v${version}"; sha256 = "13bzs9dcv27czpnnbgz7a037lm8h991c8gk0qzzk5mq5yak24715"; }; + propagatedBuildInputs = [ xlib ]; fontsConf = makeFontsConf { fontDirectories = [ ]; }; + FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file - checkInputs = [ pytest xdpyinfo pytest-xvfb xorgserver i3 ]; + checkInputs = [ pytestCheckHook xdpyinfo pytest-xvfb xorgserver i3 ]; postPatch = '' substituteInPlace test/i3.config \ --replace /bin/true ${coreutils}/bin/true ''; - checkPhase = '' - py.test --ignore=test/aio/test_shutdown_event.py \ - --ignore=test/test_shutdown_event.py - ''; - + disabledTestPaths = [ + "test/aio/test_shutdown_event.py" + "test/test_shutdown_event.py" + ]; meta = with lib; { description = "An improved Python library to control i3wm and sway"; diff --git a/pkgs/development/python-modules/ibis-framework/default.nix b/pkgs/development/python-modules/ibis-framework/default.nix index 1627159e6fbdb..723a0032b6cc5 100644 --- a/pkgs/development/python-modules/ibis-framework/default.nix +++ b/pkgs/development/python-modules/ibis-framework/default.nix @@ -4,7 +4,7 @@ , numpy , pandas , pyarrow -, pytest +, pytestCheckHook , pytz , regex , requests @@ -46,15 +46,18 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook + ]; + + pytestFlagsArray = [ + "ibis" ]; # ignore tests which require test dataset, or frameworks not available - checkPhase = '' - pytest ibis \ - --ignore=ibis/tests/all \ - --ignore=ibis/{sql,spark} - ''; + disabledTestPaths = [ + "ibis/tests/all" + "ibis/{sql,spark}" + ]; meta = with lib; { description = "Productivity-centric Python Big Data Framework"; diff --git a/pkgs/development/python-modules/ignite/default.nix b/pkgs/development/python-modules/ignite/default.nix index 307c25e724eea..2d2e1d5820cfa 100644 --- a/pkgs/development/python-modules/ignite/default.nix +++ b/pkgs/development/python-modules/ignite/default.nix @@ -29,14 +29,15 @@ buildPythonPackage rec { # runs succesfully in 3.9, however, async isn't correctly closed so it will fail after test suite. doCheck = pythonOlder "3.9"; + pytestFlagsArray = [ "tests/" ]; + # Some packages are not in NixPkgs; other tests try to build distributed # models, which doesn't work in the sandbox. # avoid tests which need special packages - pytestFlagsArray = [ - "--ignore=tests/ignite/contrib/handlers/test_trains_logger.py" - "--ignore=tests/ignite/metrics/test_dill.py" - "--ignore=tests/ignite/metrics/test_ssim.py" - "tests/" + disabledTestPaths = [ + "tests/ignite/contrib/handlers/test_trains_logger.py" + "tests/ignite/metrics/test_dill.py" + "tests/ignite/metrics/test_ssim.py" ]; # disable tests which need specific packages diff --git a/pkgs/development/python-modules/isort/default.nix b/pkgs/development/python-modules/isort/default.nix index bc11697339e89..e773cea31eb57 100644 --- a/pkgs/development/python-modules/isort/default.nix +++ b/pkgs/development/python-modules/isort/default.nix @@ -6,8 +6,7 @@ , pytestCheckHook }: -let -in buildPythonPackage rec { +buildPythonPackage rec { pname = "isort"; version = "5.6.4"; format = "pyproject"; @@ -45,9 +44,9 @@ in buildPythonPackage rec { export PATH=$PATH:$out/bin ''; - pytestFlagsArray = [ - "--ignore=tests/integration/" # pulls in 10 other packages - "--ignore=tests/unit/profiles/test_black.py" # causes infinite recursion to include black + disabledTestPaths = [ + "tests/integration/" # pulls in 10 other packages + "tests/unit/profiles/test_black.py" # causes infinite recursion to include black ]; disabledTests = [ diff --git a/pkgs/development/python-modules/javaproperties/default.nix b/pkgs/development/python-modules/javaproperties/default.nix index a9acf380da102..4cddbb4ee0d68 100644 --- a/pkgs/development/python-modules/javaproperties/default.nix +++ b/pkgs/development/python-modules/javaproperties/default.nix @@ -18,11 +18,20 @@ buildPythonPackage rec { propagatedBuildInputs = [ six ]; checkInputs = [ dateutil pytest ]; - checkPhase = '' + + preCheck = '' rm tox.ini - pytest -k 'not dumps and not time' --ignore=test/test_propclass.py ''; + disabledTestPaths = [ + "test/test_propclass.py" + ]; + + disabledTests = [ + "dumps" + "time" + ]; + meta = with lib; { description = "Microsoft Azure API Management Client Library for Python"; homepage = "https://github.com/Azure/azure-sdk-for-python"; diff --git a/pkgs/development/python-modules/jupyterlab-git/default.nix b/pkgs/development/python-modules/jupyterlab-git/default.nix index 3219bd5730bb0..2699b8b0ef3d8 100644 --- a/pkgs/development/python-modules/jupyterlab-git/default.nix +++ b/pkgs/development/python-modules/jupyterlab-git/default.nix @@ -1,11 +1,12 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , fetchPypi , pythonOlder , notebook , nbdime , git -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -23,11 +24,15 @@ buildPythonPackage rec { # all Tests on darwin fail or are skipped due to sandbox doCheck = !stdenv.isDarwin; - checkInputs = [ pytest ]; + checkInputs = [ pytestCheckHook ]; - checkPhase = '' - pytest jupyterlab_git/ --ignore=jupyterlab_git/tests/test_handlers.py - ''; + pytestFlagsArray = [ + "jupyterlab_git/" + ]; + + disabledTestPaths = [ + "jupyterlab_git/tests/test_handlers.py" + ]; pythonImportsCheck = [ "jupyterlab_git" ]; diff --git a/pkgs/development/python-modules/kubernetes/default.nix b/pkgs/development/python-modules/kubernetes/default.nix index f2cb598a6c9bd..927c58969c02b 100644 --- a/pkgs/development/python-modules/kubernetes/default.nix +++ b/pkgs/development/python-modules/kubernetes/default.nix @@ -1,34 +1,32 @@ -{ lib, buildPythonPackage, fetchPypi, pythonAtLeast, - ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google-auth, adal, - isort, pytest, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }: +{ lib, buildPythonPackage, fetchPypi, pythonAtLeast +, ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google-auth, adal +, isort, pytestCheckHook, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }: buildPythonPackage rec { pname = "kubernetes"; version = "12.0.1"; - prePatch = '' - sed -e 's/sphinx>=1.2.1,!=1.3b1,<1.4 # BSD/sphinx/' -i test-requirements.txt - - # This is used to randomize tests, which is not reproducible. Drop it. - sed -e '/randomize/d' -i test-requirements.txt - '' - # This is a python2 and python3.2 only requiremet since it is a backport of a python-3.3 api. - + (if (pythonAtLeast "3.3") then '' - sed -e '/ipaddress/d' -i requirements.txt - '' else ""); - - doCheck = pythonAtLeast "3"; - checkPhase = '' - py.test --ignore=kubernetes/dynamic/test_client.py - ''; - src = fetchPypi { inherit pname version; sha256 = "ec52ea01d52e2ec3da255992f7e859f3a76f2bdb51cf65ba8cd71dfc309d8daa"; }; - checkInputs = [ isort coverage pytest mock sphinx autopep8 pep8 codecov recommonmark nose ]; + # prePatch = '' + # sed -e 's/sphinx>=1.2.1,!=1.3b1,<1.4 # BSD/sphinx/' -i test-requirements.txt + + # # This is used to randomize tests, which is not reproducible. Drop it. + # sed -e '/randomize/d' -i test-requirements.txt + # '' + # # This is a python2 and python3.2 only requiremet since it is a backport of a python-3.3 api. + # + lib.optionalString (pythonAtLeast "3.3") + # "sed -e '/ipaddress/d' -i requirements.txt"; + propagatedBuildInputs = [ ipaddress websocket_client urllib3 pyyaml requests_oauthlib python-dateutil google-auth adal ]; + checkInputs = [ isort coverage pytestCheckHook mock sphinx autopep8 pep8 codecov recommonmark nose ]; + + disabledTestPaths = [ + "kubernetes/dynamic/test_client.py" + ]; meta = with lib; { description = "Kubernetes python client"; diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix index 458d2ca503297..62352c12746e6 100644 --- a/pkgs/development/python-modules/loguru/default.nix +++ b/pkgs/development/python-modules/loguru/default.nix @@ -12,10 +12,17 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook colorama ]; - pytestFlagsArray = lib.optionals stdenv.isDarwin [ "--ignore=tests/test_multiprocessing.py" ]; + disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ]; - disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ] - ++ lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" "test_await_complete_inheritance" ]; + disabledTests = [ + "test_time_rotation_reopening" + "test_file_buffering" + ] ++ lib.optionals stdenv.isDarwin [ + "test_rotation_and_retention" + "test_rotation_and_retention_timed_file" + "test_renaming" + "test_await_complete_inheritance" + ]; meta = with lib; { homepage = "https://github.com/Delgan/loguru"; diff --git a/pkgs/development/python-modules/manticore/default.nix b/pkgs/development/python-modules/manticore/default.nix index 9e0938fb14865..74f682890f438 100644 --- a/pkgs/development/python-modules/manticore/default.nix +++ b/pkgs/development/python-modules/manticore/default.nix @@ -51,13 +51,13 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; preCheck = "export PATH=${yices}/bin:${z3}/bin:$PATH"; - pytestFlagsArray = [ - "--ignore=tests/ethereum" # TODO: enable when solc works again - "--ignore=tests/ethereum_bench" + disabledTestPaths = [ + "tests/ethereum" # TODO: enable when solc works again + "tests/ethereum_bench" ] ++ lib.optionals (!stdenv.isLinux) [ - "--ignore=tests/native" - "--ignore=tests/other/test_locking.py" - "--ignore=tests/other/test_state_introspection.py" + "tests/native" + "tests/other/test_locking.py" + "tests/other/test_state_introspection.py" ]; disabledTests = [ # failing tests diff --git a/pkgs/development/python-modules/minio/default.nix b/pkgs/development/python-modules/minio/default.nix index 00ea5b06c646e..39a6f666aa62b 100644 --- a/pkgs/development/python-modules/minio/default.nix +++ b/pkgs/development/python-modules/minio/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { checkInputs = [ faker mock nose pytestCheckHook ]; # example credentials aren't present - pytestFlagsArray = [ "--ignore=tests/unit/credentials_test.py" ]; + disabledTestPaths = [ "tests/unit/credentials_test.py" ]; meta = with lib; { description = "Simple APIs to access any Amazon S3 compatible object storage server"; diff --git a/pkgs/development/python-modules/mlxtend/default.nix b/pkgs/development/python-modules/mlxtend/default.nix index 44402b36ec081..17928eca929fe 100644 --- a/pkgs/development/python-modules/mlxtend/default.nix +++ b/pkgs/development/python-modules/mlxtend/default.nix @@ -24,8 +24,12 @@ buildPythonPackage rec { }; checkInputs = [ pytestCheckHook ]; + # image tests download files over the network - pytestFlagsArray = [ "-sv" "--ignore=mlxtend/image" ]; + pytestFlagsArray = [ "-sv" ]; + + disabledTestPaths = [ "mlxtend/image" ]; + # Fixed in master, but failing in release version # see: https://github.com/rasbt/mlxtend/pull/721 disabledTests = [ "test_variance_explained_ratio" ]; diff --git a/pkgs/development/python-modules/mocket/default.nix b/pkgs/development/python-modules/mocket/default.nix index 6a9301d61e376..0f0bec4a02d9d 100644 --- a/pkgs/development/python-modules/mocket/default.nix +++ b/pkgs/development/python-modules/mocket/default.nix @@ -42,12 +42,12 @@ buildPythonPackage rec { sure ]; - pytestFlagsArray = [ - "--ignore=tests/main/test_pook.py" # pook is not packaged - "--ignore=tests/main/test_redis.py" # requires a live redis instance + disabledTestPaths = [ + "tests/main/test_pook.py" # pook is not packaged + "tests/main/test_redis.py" # requires a live redis instance ] ++ lib.optionals (pythonOlder "3.8") [ # uses IsolatedAsyncioTestCase which is only available >= 3.8 - "--ignore=tests/tests38/test_http_aiohttp.py" + "tests38/test_http_aiohttp.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/moto/default.nix b/pkgs/development/python-modules/moto/default.nix index ddc3896c6a55b..1fd970da7f379 100644 --- a/pkgs/development/python-modules/moto/default.nix +++ b/pkgs/development/python-modules/moto/default.nix @@ -84,146 +84,144 @@ buildPythonPackage rec { # Multiple test files still import boto, rather than boto3 like # boto is long-deprecated and broken on python3.9 # https://github.com/spulec/moto/blob/63ce647123755e4c4693a89f52c254596004c098/tests/test_autoscaling/test_autoscaling.py#L2 - # NOTE: This should change to use disabledTestFiles / disabledTestPaths once that - # feature stabalizes: see #113153 (mostly the discussion therein), #113167, #110700 - pytestFlagsArray = [ - "--ignore=tests/test_awslambda/test_policy.py" - "--ignore=tests/test_autoscaling/test_autoscaling.py" - "--ignore=tests/test_autoscaling/test_cloudformation.py" - "--ignore=tests/test_autoscaling/test_elbv2.py" - "--ignore=tests/test_autoscaling/test_launch_configurations.py" - "--ignore=tests/test_autoscaling/test_policies.py" - "--ignore=tests/test_autoscaling/test_server.py" - "--ignore=tests/test_awslambda/test_lambda.py" - "--ignore=tests/test_awslambda/test_lambda_cloudformation.py" - "--ignore=tests/test_batch/test_cloudformation.py" - "--ignore=tests/test_batch/test_server.py" - "--ignore=tests/test_cloudformation/test_cloudformation_depends_on.py" - "--ignore=tests/test_cloudformation/test_cloudformation_stack_crud.py" - "--ignore=tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py" - "--ignore=tests/test_cloudformation/test_cloudformation_stack_integration.py" - "--ignore=tests/test_cloudformation/test_stack_parsing.py" - "--ignore=tests/test_cloudformation/test_validate.py" - "--ignore=tests/test_cloudwatch/test_cloudwatch.py" - "--ignore=tests/test_cognitoidentity/test_server.py" - "--ignore=tests/test_config/test_config.py" - "--ignore=tests/test_core/test_auth.py" - "--ignore=tests/test_core/test_decorator_calls.py" - "--ignore=tests/test_core/test_nested.py" - "--ignore=tests/test_core/test_server.py" - "--ignore=tests/test_datapipeline/test_datapipeline.py" - "--ignore=tests/test_datapipeline/test_server.py" - "--ignore=tests/test_datasync/test_datasync.py" - "--ignore=tests/test_dynamodb/test_dynamodb.py" - "--ignore=tests/test_dynamodb/test_dynamodb_table_with_range_key.py" - "--ignore=tests/test_dynamodb/test_dynamodb_table_without_range_key.py" - "--ignore=tests/test_dynamodb/test_server.py" - "--ignore=tests/test_dynamodb2/test_dynamodb.py" - "--ignore=tests/test_dynamodb2/test_dynamodb_table_with_range_key.py" - "--ignore=tests/test_dynamodb2/test_dynamodb_table_without_range_key.py" - "--ignore=tests/test_dynamodb2/test_server.py" - "--ignore=tests/test_ec2/test_amazon_dev_pay.py" - "--ignore=tests/test_ec2/test_amis.py" - "--ignore=tests/test_ec2/test_availability_zones_and_regions.py" - "--ignore=tests/test_ec2/test_customer_gateways.py" - "--ignore=tests/test_ec2/test_dhcp_options.py" - "--ignore=tests/test_ec2/test_elastic_block_store.py" - "--ignore=tests/test_ec2/test_elastic_ip_addresses.py" - "--ignore=tests/test_ec2/test_elastic_network_interfaces.py" - "--ignore=tests/test_ec2/test_general.py" - "--ignore=tests/test_ec2/test_instances.py" - "--ignore=tests/test_ec2/test_internet_gateways.py" - "--ignore=tests/test_ec2/test_ip_addresses.py" - "--ignore=tests/test_ec2/test_key_pairs.py" - "--ignore=tests/test_ec2/test_monitoring.py" - "--ignore=tests/test_ec2/test_network_acls.py" - "--ignore=tests/test_ec2/test_placement_groups.py" - "--ignore=tests/test_ec2/test_regions.py" - "--ignore=tests/test_ec2/test_reserved_instances.py" - "--ignore=tests/test_ec2/test_route_tables.py" - "--ignore=tests/test_ec2/test_security_groups.py" - "--ignore=tests/test_ec2/test_spot_instances.py" - "--ignore=tests/test_ec2/test_subnets.py" - "--ignore=tests/test_ec2/test_tags.py" - "--ignore=tests/test_ec2/test_virtual_private_gateways.py" - "--ignore=tests/test_ec2/test_vm_export.py" - "--ignore=tests/test_ec2/test_vm_import.py" - "--ignore=tests/test_ec2/test_vpc_peering.py" - "--ignore=tests/test_ec2/test_vpcs.py" - "--ignore=tests/test_ec2/test_vpn_connections.py" - "--ignore=tests/test_ec2/test_vpn_connections.py" - "--ignore=tests/test_ec2/test_windows.py" - "--ignore=tests/test_ecs/test_ecs_boto3.py" - "--ignore=tests/test_elb/test_elb.py" - "--ignore=tests/test_elb/test_server.py" - "--ignore=tests/test_elbv2/test_elbv2.py" - "--ignore=tests/test_elbv2/test_server.py" - "--ignore=tests/test_emr/test_emr.py" - "--ignore=tests/test_emr/test_server.py" - "--ignore=tests/test_glacier/test_glacier_archives.py" - "--ignore=tests/test_glacier/test_glacier_jobs.py" - "--ignore=tests/test_glacier/test_glacier_vaults.py" - "--ignore=tests/test_iam/test_iam.py" - "--ignore=tests/test_iam/test_iam_cloudformation.py" - "--ignore=tests/test_iam/test_iam_groups.py" - "--ignore=tests/test_iam/test_server.py" - "--ignore=tests/test_iot/test_server.py" - "--ignore=tests/test_iotdata/test_server.py" - "--ignore=tests/test_kinesis/test_kinesis.py" - "--ignore=tests/test_kinesis/test_kinesis_cloudformation.py" - "--ignore=tests/test_kinesis/test_server.py" - "--ignore=tests/test_kinesisvideo/test_server.py" - "--ignore=tests/test_kinesisvideoarchivedmedia/test_server.py" - "--ignore=tests/test_kms/test_kms.py" - "--ignore=tests/test_kms/test_server.py" - "--ignore=tests/test_kms/test_utils.py" - "--ignore=tests/test_logs/test_logs.py" - "--ignore=tests/test_polly/test_server.py" - "--ignore=tests/test_rds/test_rds.py" - "--ignore=tests/test_rds/test_server.py" - "--ignore=tests/test_rds2/test_server.py" - "--ignore=tests/test_redshift/test_redshift.py" - "--ignore=tests/test_redshift/test_server.py" - "--ignore=tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py" - "--ignore=tests/test_route53/test_route53.py" - "--ignore=tests/test_s3/test_s3.py" - "--ignore=tests/test_s3/test_s3_cloudformation.py" - "--ignore=tests/test_s3/test_s3_lifecycle.py" - "--ignore=tests/test_s3/test_s3_storageclass.py" - "--ignore=tests/test_s3/test_s3_utils.py" - "--ignore=tests/test_s3bucket_path/test_s3bucket_path.py" - "--ignore=tests/test_s3bucket_path/test_s3bucket_path_combo.py" - "--ignore=tests/test_secretsmanager/test_server.py" - "--ignore=tests/test_ses/test_server.py" - "--ignore=tests/test_ses/test_ses.py" - "--ignore=tests/test_ses/test_ses_boto3.py" - "--ignore=tests/test_ses/test_ses_sns_boto3.py" - "--ignore=tests/test_sns/test_application.py" - "--ignore=tests/test_sns/test_application_boto3.py" - "--ignore=tests/test_sns/test_publishing.py" - "--ignore=tests/test_sns/test_publishing_boto3.py" - "--ignore=tests/test_sns/test_server.py" - "--ignore=tests/test_sns/test_subscriptions.py" - "--ignore=tests/test_sns/test_subscriptions_boto3.py" - "--ignore=tests/test_sns/test_topics.py" - "--ignore=tests/test_sns/test_topics_boto3.py" - "--ignore=tests/test_sqs/test_server.py" - "--ignore=tests/test_sqs/test_sqs.py" - "--ignore=tests/test_ssm/test_ssm_boto3.py" - "--ignore=tests/test_ssm/test_ssm_docs.py" - "--ignore=tests/test_sts/test_server.py" - "--ignore=tests/test_sts/test_sts.py" - "--ignore=tests/test_swf/models/test_activity_task.py" - "--ignore=tests/test_swf/models/test_decision_task.py" - "--ignore=tests/test_swf/models/test_timeout.py" - "--ignore=tests/test_swf/models/test_workflow_execution.py" - "--ignore=tests/test_swf/responses/test_activity_tasks.py" - "--ignore=tests/test_swf/responses/test_activity_types.py" - "--ignore=tests/test_swf/responses/test_decision_tasks.py" - "--ignore=tests/test_swf/responses/test_domains.py" - "--ignore=tests/test_swf/responses/test_timeouts.py" - "--ignore=tests/test_swf/responses/test_workflow_executions.py" - "--ignore=tests/test_swf/responses/test_workflow_types.py" + disabledTestPaths = [ + "tests/test_awslambda/test_policy.py" + "tests/test_autoscaling/test_autoscaling.py" + "tests/test_autoscaling/test_cloudformation.py" + "tests/test_autoscaling/test_elbv2.py" + "tests/test_autoscaling/test_launch_configurations.py" + "tests/test_autoscaling/test_policies.py" + "tests/test_autoscaling/test_server.py" + "tests/test_awslambda/test_lambda.py" + "tests/test_awslambda/test_lambda_cloudformation.py" + "tests/test_batch/test_cloudformation.py" + "tests/test_batch/test_server.py" + "tests/test_cloudformation/test_cloudformation_depends_on.py" + "tests/test_cloudformation/test_cloudformation_stack_crud.py" + "tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py" + "tests/test_cloudformation/test_cloudformation_stack_integration.py" + "tests/test_cloudformation/test_stack_parsing.py" + "tests/test_cloudformation/test_validate.py" + "tests/test_cloudwatch/test_cloudwatch.py" + "tests/test_cognitoidentity/test_server.py" + "tests/test_config/test_config.py" + "tests/test_core/test_auth.py" + "tests/test_core/test_decorator_calls.py" + "tests/test_core/test_nested.py" + "tests/test_core/test_server.py" + "tests/test_datapipeline/test_datapipeline.py" + "tests/test_datapipeline/test_server.py" + "tests/test_datasync/test_datasync.py" + "tests/test_dynamodb/test_dynamodb.py" + "tests/test_dynamodb/test_dynamodb_table_with_range_key.py" + "tests/test_dynamodb/test_dynamodb_table_without_range_key.py" + "tests/test_dynamodb/test_server.py" + "tests/test_dynamodb2/test_dynamodb.py" + "tests/test_dynamodb2/test_dynamodb_table_with_range_key.py" + "tests/test_dynamodb2/test_dynamodb_table_without_range_key.py" + "tests/test_dynamodb2/test_server.py" + "tests/test_ec2/test_amazon_dev_pay.py" + "tests/test_ec2/test_amis.py" + "tests/test_ec2/test_availability_zones_and_regions.py" + "tests/test_ec2/test_customer_gateways.py" + "tests/test_ec2/test_dhcp_options.py" + "tests/test_ec2/test_elastic_block_store.py" + "tests/test_ec2/test_elastic_ip_addresses.py" + "tests/test_ec2/test_elastic_network_interfaces.py" + "tests/test_ec2/test_general.py" + "tests/test_ec2/test_instances.py" + "tests/test_ec2/test_internet_gateways.py" + "tests/test_ec2/test_ip_addresses.py" + "tests/test_ec2/test_key_pairs.py" + "tests/test_ec2/test_monitoring.py" + "tests/test_ec2/test_network_acls.py" + "tests/test_ec2/test_placement_groups.py" + "tests/test_ec2/test_regions.py" + "tests/test_ec2/test_reserved_instances.py" + "tests/test_ec2/test_route_tables.py" + "tests/test_ec2/test_security_groups.py" + "tests/test_ec2/test_spot_instances.py" + "tests/test_ec2/test_subnets.py" + "tests/test_ec2/test_tags.py" + "tests/test_ec2/test_virtual_private_gateways.py" + "tests/test_ec2/test_vm_export.py" + "tests/test_ec2/test_vm_import.py" + "tests/test_ec2/test_vpc_peering.py" + "tests/test_ec2/test_vpcs.py" + "tests/test_ec2/test_vpn_connections.py" + "tests/test_ec2/test_vpn_connections.py" + "tests/test_ec2/test_windows.py" + "tests/test_ecs/test_ecs_boto3.py" + "tests/test_elb/test_elb.py" + "tests/test_elb/test_server.py" + "tests/test_elbv2/test_elbv2.py" + "tests/test_elbv2/test_server.py" + "tests/test_emr/test_emr.py" + "tests/test_emr/test_server.py" + "tests/test_glacier/test_glacier_archives.py" + "tests/test_glacier/test_glacier_jobs.py" + "tests/test_glacier/test_glacier_vaults.py" + "tests/test_iam/test_iam.py" + "tests/test_iam/test_iam_cloudformation.py" + "tests/test_iam/test_iam_groups.py" + "tests/test_iam/test_server.py" + "tests/test_iot/test_server.py" + "tests/test_iotdata/test_server.py" + "tests/test_kinesis/test_kinesis.py" + "tests/test_kinesis/test_kinesis_cloudformation.py" + "tests/test_kinesis/test_server.py" + "tests/test_kinesisvideo/test_server.py" + "tests/test_kinesisvideoarchivedmedia/test_server.py" + "tests/test_kms/test_kms.py" + "tests/test_kms/test_server.py" + "tests/test_kms/test_utils.py" + "tests/test_logs/test_logs.py" + "tests/test_polly/test_server.py" + "tests/test_rds/test_rds.py" + "tests/test_rds/test_server.py" + "tests/test_rds2/test_server.py" + "tests/test_redshift/test_redshift.py" + "tests/test_redshift/test_server.py" + "tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py" + "tests/test_route53/test_route53.py" + "tests/test_s3/test_s3.py" + "tests/test_s3/test_s3_cloudformation.py" + "tests/test_s3/test_s3_lifecycle.py" + "tests/test_s3/test_s3_storageclass.py" + "tests/test_s3/test_s3_utils.py" + "tests/test_s3bucket_path/test_s3bucket_path.py" + "tests/test_s3bucket_path/test_s3bucket_path_combo.py" + "tests/test_secretsmanager/test_server.py" + "tests/test_ses/test_server.py" + "tests/test_ses/test_ses.py" + "tests/test_ses/test_ses_boto3.py" + "tests/test_ses/test_ses_sns_boto3.py" + "tests/test_sns/test_application.py" + "tests/test_sns/test_application_boto3.py" + "tests/test_sns/test_publishing.py" + "tests/test_sns/test_publishing_boto3.py" + "tests/test_sns/test_server.py" + "tests/test_sns/test_subscriptions.py" + "tests/test_sns/test_subscriptions_boto3.py" + "tests/test_sns/test_topics.py" + "tests/test_sns/test_topics_boto3.py" + "tests/test_sqs/test_server.py" + "tests/test_sqs/test_sqs.py" + "tests/test_ssm/test_ssm_boto3.py" + "tests/test_ssm/test_ssm_docs.py" + "tests/test_sts/test_server.py" + "tests/test_sts/test_sts.py" + "tests/test_swf/models/test_activity_task.py" + "tests/test_swf/models/test_decision_task.py" + "tests/test_swf/models/test_timeout.py" + "tests/test_swf/models/test_workflow_execution.py" + "tests/test_swf/responses/test_activity_tasks.py" + "tests/test_swf/responses/test_activity_types.py" + "tests/test_swf/responses/test_decision_tasks.py" + "tests/test_swf/responses/test_domains.py" + "tests/test_swf/responses/test_timeouts.py" + "tests/test_swf/responses/test_workflow_executions.py" + "tests/test_swf/responses/test_workflow_types.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/natsort/default.nix b/pkgs/development/python-modules/natsort/default.nix index d475f21fcb511..a7ec94d6cd152 100644 --- a/pkgs/development/python-modules/natsort/default.nix +++ b/pkgs/development/python-modules/natsort/default.nix @@ -7,13 +7,20 @@ , pytest-mock , hypothesis , glibcLocales -, pathlib ? null +, pathlib , isPy3k }: buildPythonPackage rec { pname = "natsort"; version = "7.1.1"; + # Does not support Python 2 + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "00c603a42365830c4722a2eb7663a25919551217ec09a243d3399fa8dd4ac403"; + }; checkInputs = [ pytest @@ -25,14 +32,6 @@ buildPythonPackage rec { # pathlib was made part of standard library in 3.5: ++ (lib.optionals (pythonOlder "3.4") [ pathlib ]); - src = fetchPypi { - inherit pname version; - sha256 = "00c603a42365830c4722a2eb7663a25919551217ec09a243d3399fa8dd4ac403"; - }; - - # Does not support Python 2 - disabled = !isPy3k; - # testing based on project's tox.ini # natsort_keygen has pytest mock issues checkPhase = '' @@ -44,5 +43,6 @@ buildPythonPackage rec { description = "Natural sorting for python"; homepage = "https://github.com/SethMMorton/natsort"; license = lib.licenses.mit; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/nbconvert/default.nix b/pkgs/development/python-modules/nbconvert/default.nix index 582a6132c2595..bb633e602d4ee 100644 --- a/pkgs/development/python-modules/nbconvert/default.nix +++ b/pkgs/development/python-modules/nbconvert/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { entrypoints bleach mistune jinja2 pygments traitlets testpath jupyter_core nbformat ipykernel pandocfilters tornado jupyter_client defusedxml - (nbclient.override { doCheck = false; }) # avoid infinite recursion + nbclient jupyterlab-pygments ]; @@ -47,14 +47,13 @@ buildPythonPackage rec { HOME=$(mktemp -d) ''; - pytestFlagsArray = [ - "--ignore=nbconvert/preprocessors/tests/test_execute.py" + disabledTestPaths = [ + "nbconvert/preprocessors/tests/test_execute.py" # can't resolve template paths within sandbox - "--ignore=nbconvert/tests/base.py" - "--ignore=nbconvert/tests/test_nbconvertapp.py" + "nbconvert/tests/base.py" + "nbconvert/tests/test_nbconvertapp.py" ]; - disabledTests = [ "test_export" "test_webpdf_without_chromium" diff --git a/pkgs/development/python-modules/nestedtext/default.nix b/pkgs/development/python-modules/nestedtext/default.nix index 1fbfde7b26a62..e1abe9b2e89b9 100644 --- a/pkgs/development/python-modules/nestedtext/default.nix +++ b/pkgs/development/python-modules/nestedtext/default.nix @@ -1,4 +1,6 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib +, buildPythonPackage +, fetchFromGitHub , inform , pytestCheckHook , docopt @@ -21,7 +23,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ inform ]; checkInputs = [ pytestCheckHook docopt natsort voluptuous ]; - pytestFlagsArray = [ "--ignore=build" ]; # Avoids an ImportMismatchError. + disabledTestPaths = [ + # Avoids an ImportMismatchError. + "build" + ]; meta = with lib; { description = "A human friendly data format"; diff --git a/pkgs/development/python-modules/ntlm-auth/default.nix b/pkgs/development/python-modules/ntlm-auth/default.nix index 080734bd25e84..c364596dc172c 100644 --- a/pkgs/development/python-modules/ntlm-auth/default.nix +++ b/pkgs/development/python-modules/ntlm-auth/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchFromGitHub , mock -, pytest +, pytestCheckHook , requests , unittest2 , six @@ -19,13 +19,14 @@ buildPythonPackage rec { sha256 = "00dpf5bfsy07frsjihv1k10zmwcyq4bvkilbxha7h6nlwpcm2409"; }; - checkInputs = [ mock pytest requests unittest2 ]; propagatedBuildInputs = [ six ]; + checkInputs = [ mock pytestCheckHook requests unittest2 ]; + # Functional tests require networking - checkPhase = '' - py.test --ignore=tests/functional/test_iis.py - ''; + disabledTestPaths = [ + "tests/functional/test_iis.py" + ]; meta = with lib; { description = "Calculates NTLM Authentication codes"; diff --git a/pkgs/development/python-modules/paramiko/default.nix b/pkgs/development/python-modules/paramiko/default.nix index c2237f68524f8..3f10d5b3e9b21 100644 --- a/pkgs/development/python-modules/paramiko/default.nix +++ b/pkgs/development/python-modules/paramiko/default.nix @@ -6,7 +6,7 @@ , invoke , pynacl , pyasn1 -, pytest +, pytestCheckHook , pytest-relaxed , mock }: @@ -20,30 +20,30 @@ buildPythonPackage rec { sha256 = "7f36f4ba2c0d81d219f4595e35f70d56cc94f9ac40a6acdf51d6ca210ce65035"; }; - checkInputs = [ invoke pytest mock pytest-relaxed ]; propagatedBuildInputs = [ bcrypt cryptography pynacl pyasn1 ]; + checkInputs = [ invoke pytestCheckHook mock pytest-relaxed ]; + __darwinAllowLocalNetworking = true; # 2 sftp tests fail (skip for now) # test_config relies on artifacts to be to downloaded # RSA tests don't have valid keys - checkPhase = '' - pytest tests \ - --ignore=tests/test_sftp.py \ - --ignore=tests/test_config.py - ''; + disabledTestPaths = [ + "tests/test_sftp.py" + "tests/test_config.py" + ]; meta = with pkgs.lib; { homepage = "https://github.com/paramiko/paramiko/"; description = "Native Python SSHv2 protocol library"; - license = licenses.lgpl21Plus; - longDescription = '' This is a library for making SSH2 connections (client or server). Emphasis is on using SSH2 as an alternative to SSL for making secure connections between python scripts. All major ciphers and hash methods are supported. SFTP client and server mode are both supported too. ''; + license = licenses.lgpl21Plus; + maintainers = []; }; } diff --git a/pkgs/development/python-modules/phonemizer/default.nix b/pkgs/development/python-modules/phonemizer/default.nix index 43ce5f1e766d2..d8c662b9ea2db 100644 --- a/pkgs/development/python-modules/phonemizer/default.nix +++ b/pkgs/development/python-modules/phonemizer/default.nix @@ -50,8 +50,8 @@ buildPythonApplication rec { # We tried to package festvial, but were unable to get the backend running, # so let's disable related tests. - pytestFlagsArray = [ - "--ignore=test/test_festival.py" + disabledTestPaths = [ + "test/test_festival.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/pipx/default.nix b/pkgs/development/python-modules/pipx/default.nix index 34a7bc6b31a1d..57098b8a37020 100644 --- a/pkgs/development/python-modules/pipx/default.nix +++ b/pkgs/development/python-modules/pipx/default.nix @@ -13,7 +13,6 @@ buildPythonPackage rec { pname = "pipx"; version = "0.16.1.0"; - disabled = pythonOlder "3.6"; # no tests in the pypi tarball, so we directly fetch from github @@ -40,7 +39,7 @@ buildPythonPackage rec { ''; # disable tests, which require internet connection - pytestFlagsArray = [ "--ignore=tests/test_install_all_packages.py" ]; + disabledTestPaths = [ "tests/test_install_all_packages.py" ]; disabledTests = [ "install" "inject" @@ -57,8 +56,7 @@ buildPythonPackage rec { ]; meta = with lib; { - description = - "Install and Run Python Applications in Isolated Environments"; + description = "Install and Run Python Applications in Isolated Environments"; homepage = "https://github.com/pipxproject/pipx"; license = licenses.mit; maintainers = with maintainers; [ yevhenshymotiuk ]; diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix index fe62d1be1ea1b..ed65a1d48b605 100644 --- a/pkgs/development/python-modules/pycurl/default.nix +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -5,7 +5,7 @@ , curl , openssl , bottle -, pytest +, pytestCheckHook , nose , flaky }: @@ -31,34 +31,42 @@ buildPythonPackage rec { checkInputs = [ bottle - pytest + pytestCheckHook nose flaky ]; - # skip impure or flakey tests - # See also: - # * https://github.com/NixOS/nixpkgs/issues/77304 - checkPhase = '' - HOME=$TMPDIR pytest tests -k "not test_ssl_in_static_libs \ - and not test_keyfunction \ - and not test_keyfunction_bogus_return \ - and not test_libcurl_ssl_gnutls \ - and not test_libcurl_ssl_nss \ - and not test_libcurl_ssl_openssl" \ - --ignore=tests/getinfo_test.py \ - --ignore=tests/memory_mgmt_test.py \ - --ignore=tests/multi_memory_mgmt_test.py \ - --ignore=tests/multi_timer_test.py - ''; - preConfigure = '' substituteInPlace setup.py --replace '--static-libs' '--libs' export PYCURL_SSL_LIBRARY=openssl ''; + preCheck = '' + export HOME=$TMPDIR + ''; + + # skip impure or flakey tests + # See also: + # * https://github.com/NixOS/nixpkgs/issues/77304 + disabledTestPaths = [ + "tests/getinfo_test.py" + "tests/memory_mgmt_test.py" + "tests/multi_memory_mgmt_test.py" + "tests/multi_timer_test.py" + ]; + + disabledTests = [ + "test_keyfunction" + "test_keyfunction_bogus_return" + "test_libcurl_ssl_gnutls" + "test_libcurl_ssl_nss" + "test_libcurl_ssl_openssl" + "test_ssl_in_static_libs" + ]; + meta = { homepage = "http://pycurl.sourceforge.net/"; description = "Python wrapper for libcurl"; + maintainers = []; }; } diff --git a/pkgs/development/python-modules/pyfxa/default.nix b/pkgs/development/python-modules/pyfxa/default.nix index eb5403c2b9685..86e603a91682a 100644 --- a/pkgs/development/python-modules/pyfxa/default.nix +++ b/pkgs/development/python-modules/pyfxa/default.nix @@ -1,6 +1,6 @@ { lib, buildPythonPackage, fetchPypi , requests, cryptography, pybrowserid, hawkauthlib, six -, grequests, mock, responses, pytest, pyjwt }: +, grequests, mock, responses, pytestCheckHook, pyjwt }: buildPythonPackage rec { pname = "PyFxA"; @@ -21,17 +21,18 @@ buildPythonPackage rec { ]; checkInputs = [ - grequests mock responses pytest + grequests mock responses pytestCheckHook ]; # test_oath is mostly network calls - checkPhase = '' - pytest --ignore=fxa/tests/test_oauth.py - ''; + disabledTestPaths = [ + "fxa/tests/test_oauth.py" + ]; meta = with lib; { description = "Firefox Accounts client library for Python"; homepage = "https://github.com/mozilla/PyFxA"; license = licenses.mpl20; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/pyproj/default.nix b/pkgs/development/python-modules/pyproj/default.nix index c000283e6de86..ec3eaedeabe40 100644 --- a/pkgs/development/python-modules/pyproj/default.nix +++ b/pkgs/development/python-modules/pyproj/default.nix @@ -37,10 +37,13 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook mock ]; # prevent importing local directory - preCheck = "cd test"; - pytestFlagsArray = [ - "--ignore=test_doctest_wrapper.py" - "--ignore=test_datadir.py" + preCheck = '' + cd test + ''; + + disabledTestPaths = [ + "test_doctest_wrapper.py" + "test_datadir.py" ]; disabledTests = [ @@ -56,5 +59,6 @@ buildPythonPackage rec { description = "Python interface to PROJ.4 library"; homepage = "https://github.com/jswhit/pyproj"; license = with lib.licenses; [ isc ]; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/pyro4/default.nix b/pkgs/development/python-modules/pyro4/default.nix index 626560d89b6d8..fe6cfceeac58f 100644 --- a/pkgs/development/python-modules/pyro4/default.nix +++ b/pkgs/development/python-modules/pyro4/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { preCheck = "PYTHONPATH=tests/PyroTests:$PYTHONPATH"; # ignore network related tests, which fail in sandbox - pytestFlagsArray = [ "--ignore=tests/PyroTests/test_naming.py" ]; + disabledTestPaths = [ "tests/PyroTests/test_naming.py" ]; disabledTests = [ "StartNSfunc" diff --git a/pkgs/development/python-modules/pytest-factoryboy/default.nix b/pkgs/development/python-modules/pytest-factoryboy/default.nix index e63b7329c9655..b1d5f4efe20e1 100644 --- a/pkgs/development/python-modules/pytest-factoryboy/default.nix +++ b/pkgs/development/python-modules/pytest-factoryboy/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { pytestcov ]; - pytestFlagsArray = [ "--ignore=docs" ]; + disabledTestPaths = [ "docs" ]; pythonImportsCheck = [ "pytest_factoryboy" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/qiskit-aqua/default.nix b/pkgs/development/python-modules/qiskit-aqua/default.nix index 0e6e8e25b538c..e26af51f07822 100644 --- a/pkgs/development/python-modules/qiskit-aqua/default.nix +++ b/pkgs/development/python-modules/qiskit-aqua/default.nix @@ -24,7 +24,7 @@ , withScikitQuant ? false , scikit-quant ? null , withCplex ? false -, cplex ? null +, cplex # Check Inputs , ddt , pytestCheckHook @@ -91,7 +91,10 @@ buildPythonPackage rec { >> qiskit/optimization/__init__.py ''; - postInstall = "rm -rf $out/${python.sitePackages}/docs"; # Remove docs dir b/c it can cause conflicts. + # Remove docs dir b/c it can cause conflicts. + postInstall = '' + rm -r $out/${python.sitePackages}/docs + ''; checkInputs = [ pytestCheckHook @@ -99,6 +102,7 @@ buildPythonPackage rec { pytest-timeout qiskit-aer ]; + pythonImportsCheck = [ "qiskit.aqua" "qiskit.aqua.algorithms" @@ -107,15 +111,19 @@ buildPythonPackage rec { "qiskit.ml" "qiskit.optimization" ]; + pytestFlagsArray = [ "--timeout=30" "--durations=10" - ] ++ lib.optionals (!withPyscf) [ - "--ignore=test/chemistry/test_qeom_ee.py" - "--ignore=test/chemistry/test_qeom_vqe.py" - "--ignore=test/chemistry/test_vqe_uccsd_adapt.py" - "--ignore=test/chemistry/test_bopes_sampler.py" ]; + + disabledTestPaths = lib.optionals (!withPyscf) [ + "test/chemistry/test_qeom_ee.py" + "test/chemistry/test_qeom_vqe.py" + "test/chemistry/test_vqe_uccsd_adapt.py" + "test/chemistry/test_bopes_sampler.py" + ]; + disabledTests = [ # Disabled due to missing pyscf "test_validate" # test/chemistry/test_inputparser.py diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index ff51e82e351ea..cb1077977f9f8 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -100,18 +100,17 @@ buildPythonPackage rec { "qiskit.transpiler.passes.routing.cython.stochastic_swap.swap_trial" ]; - pytestFlagsArray = [ - "--ignore=test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency + disabledTestPaths = [ + "test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency ] ++ lib.optionals (!withClassicalFunctionCompiler ) [ - "--ignore=test/python/classical_function_compiler/" + "test/python/classical_function_compiler/" ]; disabledTests = [ # Flaky tests "test_cx_equivalence" "test_pulse_limits" - ] # Disabling slow tests for build constraints - ++ [ + ] ++ [ "test_all_examples" "test_controlled_random_unitary" "test_controlled_standard_gates_1" diff --git a/pkgs/development/python-modules/roombapy/default.nix b/pkgs/development/python-modules/roombapy/default.nix index 9c438bde75622..063f7ad40ac6a 100644 --- a/pkgs/development/python-modules/roombapy/default.nix +++ b/pkgs/development/python-modules/roombapy/default.nix @@ -11,6 +11,7 @@ buildPythonPackage rec { pname = "roombapy"; version = "1.6.2-1"; + format = "pyproject"; src = fetchFromGitHub { owner = "pschmitt"; @@ -19,13 +20,11 @@ buildPythonPackage rec { sha256 = "14k7bys479xwpa4alpdwphzmxm3x8kc48nfqnshn1wj94vyxc425"; }; - format = "pyproject"; - nativeBuildInputs = [ poetry ]; propagatedBuildInputs = [ paho-mqtt ]; checkInputs = [ hbmqtt pytest-asyncio pytestCheckHook ]; - pytestFlagsArray = [ "tests/" "--ignore=tests/test_discovery.py" ]; + disabledTestPaths = [ "tests/test_discovery.py" ]; pythonImportsCheck = [ "roombapy" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index 6887eded3bfda..a964c8eba49b1 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -68,10 +68,10 @@ buildPythonPackage rec { substituteInPlace pytest.ini --replace "--doctest-modules" "" ''; - pytestFlagsArray = [ - "--ignore=tests/test_proxy_connect.py" - "--ignore=tests/test_utils_display.py" - "--ignore=tests/test_command_check.py" + disabledTestPaths = [ + "tests/test_proxy_connect.py" + "tests/test_utils_display.py" + "tests/test_command_check.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/setproctitle/default.nix b/pkgs/development/python-modules/setproctitle/default.nix index 80fb7ab77f5c9..815d0a227de5b 100644 --- a/pkgs/development/python-modules/setproctitle/default.nix +++ b/pkgs/development/python-modules/setproctitle/default.nix @@ -19,7 +19,9 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; # tries to compile programs with dependencies that aren't available - pytestFlagsArray = [ "--ignore=tests/setproctitle_test.py" ]; + disabledTestPaths = [ + "tests/setproctitle_test.py" + ]; meta = with lib; { description = "Allows a process to change its title (as displayed by system tools such as ps and top)"; diff --git a/pkgs/development/python-modules/slack-sdk/default.nix b/pkgs/development/python-modules/slack-sdk/default.nix index cb491cf600782..925ce97e48eb0 100644 --- a/pkgs/development/python-modules/slack-sdk/default.nix +++ b/pkgs/development/python-modules/slack-sdk/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { ''; # Exclude tests that requires network features - pytestFlagsArray = [ "--ignore=integration_tests" ]; + disabledTestPaths = [ "integration_tests" ]; disabledTests = [ "test_start_raises_an_error_if_rtm_ws_url_is_not_returned" "test_org_installation" diff --git a/pkgs/development/python-modules/slackclient/default.nix b/pkgs/development/python-modules/slackclient/default.nix index 4a3c292721868..a005c7cdad909 100644 --- a/pkgs/development/python-modules/slackclient/default.nix +++ b/pkgs/development/python-modules/slackclient/default.nix @@ -20,7 +20,6 @@ buildPythonPackage rec { pname = "python-slackclient"; version = "2.9.3"; - disabled = !isPy3k; src = fetchFromGitHub { @@ -50,7 +49,7 @@ buildPythonPackage rec { ]; # Exclude tests that requires network features - pytestFlagsArray = [ "--ignore=integration_tests" ]; + disabledTestPaths = [ "integration_tests" ]; disabledTests = [ "test_start_raises_an_error_if_rtm_ws_url_is_not_returned" ]; pythonImportsCheck = [ "slack" ]; diff --git a/pkgs/development/python-modules/smbus-cffi/default.nix b/pkgs/development/python-modules/smbus-cffi/default.nix index 6715cfd60d956..a854f825c1a4d 100644 --- a/pkgs/development/python-modules/smbus-cffi/default.nix +++ b/pkgs/development/python-modules/smbus-cffi/default.nix @@ -26,16 +26,18 @@ buildPythonPackage rec { propagatedBuildInputs = [ cffi ]; + checkInputs = [ pytestCheckHook pyserial ]; + installCheckPhase = '' # we want to import the installed module that also contains the compiled library - rm -rf smbus + rm -r smbu runHook pytestCheckPhase ''; # requires hardware access - pytestFlagsArray = [ "--ignore=test/test_smbus_integration.py" ]; - - checkInputs = [ pytestCheckHook pyserial ]; + disabledTestPaths = [ + "test/test_smbus_integration.py" + ]; meta = with lib; { description = "Python module for SMBus access through Linux I2C /dev interface"; diff --git a/pkgs/development/python-modules/streamz/default.nix b/pkgs/development/python-modules/streamz/default.nix index 62e71bd2fd1c0..9c35f7ce46f40 100644 --- a/pkgs/development/python-modules/streamz/default.nix +++ b/pkgs/development/python-modules/streamz/default.nix @@ -4,7 +4,7 @@ , flaky , graphviz , networkx -, pytest +, pytestCheckHook , requests , six , toolz @@ -35,19 +35,22 @@ buildPythonPackage rec { distributed flaky graphviz - pytest + pytestCheckHook requests ]; disabled = pythonOlder "3.6"; + pytestFlagsArray = [ + "--deselect=streamz/tests/test_sources.py::test_tcp_async" + "--deselect=streamz/tests/test_sources.py::test_tcp" + ]; + # Disable test_tcp_async because fails on sandbox build # disable kafka tests - checkPhase = '' - pytest --deselect=streamz/tests/test_sources.py::test_tcp_async \ - --deselect=streamz/tests/test_sources.py::test_tcp \ - --ignore=streamz/tests/test_kafka.py - ''; + disabledTestPaths = [ + "streamz/tests/test_kafka.py" + ]; meta = with lib; { description = "Pipelines to manage continuous streams of data"; diff --git a/pkgs/development/python-modules/subunit/default.nix b/pkgs/development/python-modules/subunit/default.nix index f462268918774..e393b82e704b3 100644 --- a/pkgs/development/python-modules/subunit/default.nix +++ b/pkgs/development/python-modules/subunit/default.nix @@ -4,11 +4,10 @@ , cppunit , pkg-config , subunit - # python dependencies , fixtures , hypothesis -, pytest +, pytestCheckHook , testscenarios , testtools }: @@ -17,15 +16,21 @@ buildPythonPackage { inherit (subunit) name src meta; nativeBuildInputs = [ pkg-config ]; + buildInputs = [ check cppunit ]; + propagatedBuildInputs = [ testtools ]; - checkInputs = [ testscenarios hypothesis fixtures pytest ]; + checkInputs = [ testscenarios hypothesis fixtures pytestCheckHook ]; + + pytestFlagsArray = [ + "python/subunit" + ]; + # ignore tests which call shell code, or call methods which haven't been implemented - checkPhase = '' - pytest python/subunit \ - --ignore=python/subunit/tests/test_{output_filter,test_protocol{,2}}.py - ''; + disabledTestPaths = [ + "python/subunit/tests/test_{output_filter,test_protocol{,2}}.py" + ]; patchPhase = '' sed -i 's/version=VERSION/version="${subunit.version}"/' setup.py diff --git a/pkgs/development/python-modules/tenacity/default.nix b/pkgs/development/python-modules/tenacity/default.nix index 51f055d066075..8b6ddcd119bda 100644 --- a/pkgs/development/python-modules/tenacity/default.nix +++ b/pkgs/development/python-modules/tenacity/default.nix @@ -13,16 +13,17 @@ buildPythonPackage rec { }; nativeBuildInputs = [ pbr setuptools_scm ]; + propagatedBuildInputs = [ six ] + ++ lib.optionals isPy27 [ futures monotonic typing ]; checkInputs = [ pytest sphinx tornado ] ++ lib.optionals isPy3k [ typeguard ]; - checkPhase = if isPy27 then '' - pytest --ignore='tenacity/tests/test_asyncio.py' - '' else '' - pytest - ''; + + disabledTestPaths = lib.optionals isPy27 [ + "tenacity/tests/test_asyncio.py" + ]; meta = with lib; { homepage = "https://github.com/jd/tenacity"; diff --git a/pkgs/development/python-modules/txtorcon/default.nix b/pkgs/development/python-modules/txtorcon/default.nix index 01a7cd3d87ac7..fa779d7ba3b51 100644 --- a/pkgs/development/python-modules/txtorcon/default.nix +++ b/pkgs/development/python-modules/txtorcon/default.nix @@ -1,30 +1,29 @@ {lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted -, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof +, automat, zope_interface, idna, pyopenssl, service-identity, pytestCheckHook, mock, lsof , GeoIP, isPy27}: buildPythonPackage rec { pname = "txtorcon"; version = "20.0.0"; - checkInputs = [ pytest mock lsof GeoIP ]; + src = fetchPypi { + inherit pname version; + sha256 = "0yipb41w2icbj50d3z1j92d8w6xhbqd1rnmd31vzb5k3g20x0b0j"; + }; + propagatedBuildInputs = [ incremental twisted automat zope_interface # extra dependencies required by twisted[tls] idna pyopenssl service-identity ] ++ lib.optionals (!isPy3k) [ ipaddress ]; - src = fetchPypi { - inherit pname version; - sha256 = "0yipb41w2icbj50d3z1j92d8w6xhbqd1rnmd31vzb5k3g20x0b0j"; - }; + checkInputs = [ pytestCheckHook mock lsof GeoIP ]; - # zope.interface issue - doCheck = isPy3k; # Skip a failing test until fixed upstream: # https://github.com/meejah/txtorcon/issues/250 - checkPhase = '' - pytest --ignore=test/test_util.py . - ''; + disabledTestPaths = [ + "test/test_util.py" + ]; meta = { description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions"; diff --git a/pkgs/development/python-modules/typer/default.nix b/pkgs/development/python-modules/typer/default.nix index 61adcf9254ff6..3440b3984e9c9 100644 --- a/pkgs/development/python-modules/typer/default.nix +++ b/pkgs/development/python-modules/typer/default.nix @@ -35,9 +35,10 @@ buildPythonPackage rec { black isort ]; - pytestFlagsArray = [ - "--ignore=tests/test_completion/test_completion.py" - "--ignore=tests/test_completion/test_completion_install.py" + + disabledTestPaths = [ + "tests/test_completion/test_completion.py" + "tests/test_completion/test_completion_install.py" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/uvicorn/default.nix b/pkgs/development/python-modules/uvicorn/default.nix index 36e8b12929e0e..7906c01c09641 100644 --- a/pkgs/development/python-modules/uvicorn/default.nix +++ b/pkgs/development/python-modules/uvicorn/default.nix @@ -53,9 +53,9 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - pytestFlagsArray = [ + disabledTestPaths = [ # watchgod required the watchgod package, which isn't available in nixpkgs - "--ignore=tests/supervisors/test_reload.py" + "tests/supervisors/test_reload.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/uvloop/default.nix b/pkgs/development/python-modules/uvloop/default.nix index 3ba9dcb5f1445..8afbabb579876 100644 --- a/pkgs/development/python-modules/uvloop/default.nix +++ b/pkgs/development/python-modules/uvloop/default.nix @@ -44,8 +44,11 @@ buildPythonPackage rec { "--assert=plain" "--strict" "--tb=native" + ]; + + disabledTestPaths = [ # ignore code linting tests - "--ignore=tests/test_sourcecode.py" + "tests/test_sourcecode.py" ]; # force using installed/compiled uvloop vs source by moving tests to temp dir diff --git a/pkgs/development/python-modules/vcrpy/default.nix b/pkgs/development/python-modules/vcrpy/default.nix index e67bbc59e9329..53698bdf0dc6f 100644 --- a/pkgs/development/python-modules/vcrpy/default.nix +++ b/pkgs/development/python-modules/vcrpy/default.nix @@ -6,7 +6,7 @@ , mock , contextlib2 , wrapt -, pytest +, pytestCheckHook , pytest-httpbin , yarl , pythonOlder @@ -23,7 +23,7 @@ buildPythonPackage rec { }; checkInputs = [ - pytest + pytestCheckHook pytest-httpbin ]; @@ -35,14 +35,19 @@ buildPythonPackage rec { ++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ] ++ lib.optionals (pythonAtLeast "3.4") [ yarl ]; - checkPhase = '' - py.test --ignore=tests/integration -k "not TestVCRConnection" - ''; + disabledTestPaths = [ + "tests/integration" + ]; + + disabledTests = [ + "TestVCRConnection" + ]; meta = with lib; { description = "Automatically mock your HTTP interactions to simplify and speed up testing"; homepage = "https://github.com/kevin1024/vcrpy"; license = licenses.mit; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/xmlschema/default.nix b/pkgs/development/python-modules/xmlschema/default.nix index e31054e74c139..ffbd3acbc4c79 100644 --- a/pkgs/development/python-modules/xmlschema/default.nix +++ b/pkgs/development/python-modules/xmlschema/default.nix @@ -1,12 +1,12 @@ { lib, buildPythonPackage, fetchFromGitHub , elementpath , lxml -, pytest +, pytestCheckHook }: buildPythonPackage rec { - version = "1.4.1"; pname = "xmlschema"; + version = "1.4.1"; src = fetchFromGitHub { owner = "sissaschool"; @@ -17,23 +17,28 @@ buildPythonPackage rec { propagatedBuildInputs = [ elementpath ]; - checkInputs = [ lxml pytest ]; + checkInputs = [ lxml pytestCheckHook ]; postPatch = '' substituteInPlace setup.py \ --replace "elementpath~=2.0.0" "elementpath~=2.0" ''; + pytestFlagsArray = [ "tests" ]; + # Ignore broken fixtures, and tests for files which don't exist. # For darwin, we need to explicity say we can't reach network - checkPhase = '' - pytest tests \ - --ignore=tests/test_factory.py \ - --ignore=tests/test_schemas.py \ - --ignore=tests/test_memory.py \ - --ignore=tests/test_validation.py \ - -k 'not element_tree_import_script and not export_remote' - ''; + disabledTestPaths = [ + "tests/test_factory.py" + "tests/test_schemas.py" + "tests/test_memory.py" + "tests/test_validation.py" + ]; + + disabledTests = [ + "element_tree_import_script" + "export_remote" + ]; meta = with lib; { description = "XML Schema validator and data conversion library for Python"; diff --git a/pkgs/development/tools/devpi-server/default.nix b/pkgs/development/tools/devpi-server/default.nix index 8a484a23349c2..5f5c268e1d855 100644 --- a/pkgs/development/tools/devpi-server/default.nix +++ b/pkgs/development/tools/devpi-server/default.nix @@ -42,21 +42,26 @@ python3Packages.buildPythonApplication rec { export PATH=$PATH:$out/bin export HOME=$TMPDIR ''; + pytestFlagsArray = [ "./test_devpi_server" "--slow" "-rfsxX" - "--ignore=test_devpi_server/test_nginx_replica.py" - "--ignore=test_devpi_server/test_streaming_nginx.py" - "--ignore=test_devpi_server/test_streaming_replica_nginx.py" ]; + + disabledTestPaths = [ + "test_devpi_server/test_nginx_replica.py" + "test_devpi_server/test_streaming_nginx.py" + "test_devpi_server/test_streaming_replica_nginx.py" + ]; + disabledTests = [ "root_passwd_hash_option" "TestMirrorIndexThings" ]; meta = with lib;{ - homepage = "http://doc.devpi.net"; + homepage = "https://doc.devpi.net"; description = "Github-style pypi index server and packaging meta tool"; license = licenses.mit; maintainers = with maintainers; [ makefu ]; diff --git a/pkgs/shells/bash/bash-completion/default.nix b/pkgs/shells/bash/bash-completion/default.nix index 0ebcaa9e86457..6023e78858196 100644 --- a/pkgs/shells/bash/bash-completion/default.nix +++ b/pkgs/shells/bash/bash-completion/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchurl +{ lib +, stdenv +, fetchurl , fetchpatch , autoreconfHook , perl @@ -32,7 +34,7 @@ stdenv.mkDerivation rec { # pkill, pwdx, renice, and reptyr completions ps python3Packages.pexpect - python3Packages.pytest + python3Packages.pytestCheckHook bashInteractive ]; @@ -43,21 +45,21 @@ stdenv.mkDerivation rec { # because they try to touch network # - ignore test_ls because impure logic # - ignore test_screen because it assumes vt terminals exist - checkPhase = '' - pytest . \ - ${lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ - --ignore=test/t/test_chsh.py \ - --ignore=test/t/test_ether_wake.py \ - --ignore=test/t/test_ifdown.py \ - --ignore=test/t/test_ifstat.py \ - --ignore=test/t/test_ifup.py \ - --ignore=test/t/test_iperf.py \ - --ignore=test/t/test_iperf3.py \ - --ignore=test/t/test_nethogs.py \ - --ignore=test/t/unit/test_unit_ip_addresses.py \ - --ignore=test/t/test_ls.py \ - --ignore=test/t/test_screen.py - ''; + disabledTestPaths = + lib.optional (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "test/t/test_gcc.py" + ++ [ + "test/t/test_chsh.py" + "test/t/test_ether_wake.py" + "test/t/test_ifdown.py" + "test/t/test_ifstat.py" + "test/t/test_ifup.py" + "test/t/test_iperf.py" + "test/t/test_iperf3.py" + "test/t/test_nethogs.py" + "test/t/unit/test_unit_ip_addresses.py" + "test/t/test_ls.py" + "test/t/test_screen.py" + ]; prePatch = lib.optionalString stdenv.isDarwin '' sed -i -e 's/readlink -f/readlink/g' bash_completion completions/* diff --git a/pkgs/tools/admin/lexicon/default.nix b/pkgs/tools/admin/lexicon/default.nix index 6c105cf9b335b..65724c11c360e 100644 --- a/pkgs/tools/admin/lexicon/default.nix +++ b/pkgs/tools/admin/lexicon/default.nix @@ -7,7 +7,7 @@ let py = python3.override { packageOverrides = self: super: { # until https://github.com/ags-slc/localzone/issues/1 gets resolved - dnspython = super.dnspython.overridePythonAttrs(oldAttrs: rec { + dnspython = super.dnspython.overridePythonAttrs (oldAttrs: rec { pname = "dnspython"; version = "1.16.0"; # since name is defined from the previous derivation, need to override @@ -21,13 +21,13 @@ let }; }); - localzone = super.localzone.overridePythonAttrs(oldAttrs: rec { + localzone = super.localzone.overridePythonAttrs (oldAttrs: rec { meta = oldAttrs.meta // { broken = false; }; }); }; }; in - with py.pkgs; +with py.pkgs; buildPythonApplication rec { pname = "lexicon"; @@ -64,15 +64,15 @@ buildPythonApplication rec { checkInputs = [ mock - pytest + pytestCheckHook pytestcov pytest_xdist vcrpy ]; - checkPhase = '' - pytest --ignore=lexicon/tests/providers/test_auto.py - ''; + disabledTestPaths = [ + "lexicon/tests/providers/test_auto.py" + ]; meta = with lib; { description = "Manipulate DNS records on various DNS providers in a standardized way"; diff --git a/pkgs/tools/admin/mycli/default.nix b/pkgs/tools/admin/mycli/default.nix index ca845cce1456a..ff75a1aaa634c 100644 --- a/pkgs/tools/admin/mycli/default.nix +++ b/pkgs/tools/admin/mycli/default.nix @@ -14,6 +14,12 @@ buildPythonApplication rec { sha256 = "sha256-dI2Yvj2llI9TlMFbs35ijYeFuGqoTovZyRh+ILhNMmY="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "sqlparse>=0.3.0,<0.4.0" "sqlparse" \ + --replace "importlib_resources >= 5.0.0" "importlib_resources" + ''; + propagatedBuildInputs = [ cli-helpers click @@ -29,24 +35,18 @@ buildPythonApplication rec { sqlparse ]; - checkInputs = [ pytest mock glibcLocales ]; + checkInputs = [ pytestCheckHook mock glibcLocales ]; - checkPhase = '' + preCheck = '' export HOME=. export LC_ALL="en_US.UTF-8" - - py.test \ - --ignore=mycli/packages/paramiko_stub/__init__.py ''; - postPatch = '' - substituteInPlace setup.py \ - --replace "sqlparse>=0.3.0,<0.4.0" "sqlparse" \ - --replace "importlib_resources >= 5.0.0" "importlib_resources" - ''; + disabledTestPaths = [ + "mycli/packages/paramiko_stub/__init__.py" + ]; meta = with lib; { - inherit version; description = "Command-line interface for MySQL"; longDescription = '' Rich command-line interface for MySQL with auto-completion and diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix index 325039d686501..bd06775247dd6 100644 --- a/pkgs/tools/audio/tts/default.nix +++ b/pkgs/tools/audio/tts/default.nix @@ -92,11 +92,11 @@ python3Packages.buildPythonApplication rec { mv TTS{,.old} ''; - pytestFlagsArray = [ + disabledTestPaths = [ # requires tensorflow - "--ignore=tests/test_tacotron2_tf_model.py" - "--ignore=tests/test_vocoder_tf_melgan_generator.py" - "--ignore=tests/test_vocoder_tf_pqmf.py" + "tests/test_tacotron2_tf_model.py" + "tests/test_vocoder_tf_melgan_generator.py" + "tests/test_vocoder_tf_pqmf.py" ]; meta = with lib; { diff --git a/pkgs/tools/networking/linkchecker/default.nix b/pkgs/tools/networking/linkchecker/default.nix index ea96ab94037bf..6f3a8e0d8c319 100644 --- a/pkgs/tools/networking/linkchecker/default.nix +++ b/pkgs/tools/networking/linkchecker/default.nix @@ -26,23 +26,28 @@ buildPythonApplication rec { checkInputs = [ parameterized - pytest + pytestCheckHook ]; - postPatch = '' - sed -i 's/^requests.*$/requests>=2.2/' requirements.txt - sed -i "s/'request.*'/'requests >= 2.2'/" setup.py + # postPatch = '' + # sed -i 's/^requests.*$/requests>=2.2/' requirements.txt + # sed -i "s/'request.*'/'requests >= 2.2'/" setup.py + # ''; + + # network tests fails on darwin + preCheck = '' + rm tests/test_network.py tests/checker/test_http*.py tests/checker/test_content_allows_robots.py tests/checker/test_noproxy.py ''; # test_timeit2 is flakey, and depends sleep being precise to the milisecond - checkPhase = '' - ${lib.optionalString stdenv.isDarwin '' - # network tests fails on darwin - rm tests/test_network.py tests/checker/test_http*.py tests/checker/test_content_allows_robots.py tests/checker/test_noproxy.py - ''} - pytest --ignore=tests/checker/{test_telnet,telnetserver}.py \ - -k 'not TestLoginUrl and not test_timeit2' - ''; + disabledTestPaths = [ + "tests/checker/{test_telnet,telnetserver}.py" + ]; + + disabledTests = [ + "TestLoginUrl" + "test_timeit2" + ]; meta = { description = "Check websites for broken links"; diff --git a/pkgs/tools/security/snallygaster/default.nix b/pkgs/tools/security/snallygaster/default.nix index 36ea37edbb9ae..920a01015072e 100644 --- a/pkgs/tools/security/snallygaster/default.nix +++ b/pkgs/tools/security/snallygaster/default.nix @@ -24,9 +24,9 @@ python3Packages.buildPythonApplication rec { pytestCheckHook ]; - pytestFlagsArray = [ + disabledTestPaths = [ # we are not interested in linting the project - "--ignore=tests/test_codingstyle.py" + "tests/test_codingstyle.py" ]; meta = with lib; { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ada815948ff37..698192a05ffe6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4366,7 +4366,9 @@ in { nbconflux = callPackage ../development/python-modules/nbconflux { }; - nbconvert = callPackage ../development/python-modules/nbconvert { }; + nbconvert = callPackage ../development/python-modules/nbconvert { + nbclient = self.nbclient.override { doCheck = false; }; + }; nbdime = callPackage ../development/python-modules/nbdime { };