treewide: pytestFlagsArray -> pytestFlags and join flag and option argument

This treewide change targets Python packages
that specifies pytest flags with pytestFlagsArray,
and whose flags cannot be consructed by other pytestCheckHook-honoured arguments.

Use the __structuredAttrs-agnostic argument pytestFlags
instead of the deprecated pytestFlagsArray.

For flags with option arguments,
join each flag and their option argument into a single command-line argument
following POSIX Utility Argument Syntax[1]
for easier overriding (remove/replace).

Examples:

* [ "-W" "ignore:message:WarningClass" ] ->
  [ "-Wignore:message:WarningClass" ]

* [ "--reruns" "3" ] ->
  [ "--reruns=3" ]

[1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
This commit is contained in:
Yueh-Shun Li 2025-05-01 03:46:26 +08:00
parent eff6dd6765
commit 76e2a397c2
172 changed files with 267 additions and 341 deletions

View File

@ -39,13 +39,10 @@ python3Packages.buildPythonApplication rec {
defusedxml defusedxml
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::sphinx.deprecation.RemovedInSphinx90Warning"
"ignore::sphinx.deprecation.RemovedInSphinx90Warning" "--rootdir=src/ablog"
"--rootdir" "-Wignore::sphinx.deprecation.RemovedInSphinx90Warning" # Ignore ImportError
"src/ablog"
"-W"
"ignore::sphinx.deprecation.RemovedInSphinx90Warning" # Ignore ImportError
]; ];
# assert "post 1" not in html # assert "post 1" not in html

View File

@ -60,9 +60,8 @@ localPython.pkgs.buildPythonApplication rec {
]; ];
# Upstream did not adapt to pytest 8 yet. # Upstream did not adapt to pytest 8 yet.
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::pytest.PytestRemovedIn8Warning"
"ignore::pytest.PytestRemovedIn8Warning"
]; ];
passthru = { passthru = {

View File

@ -144,7 +144,7 @@ py.pkgs.buildPythonApplication rec {
# tests/unit/customizations/sso/test_utils.py uses sockets # tests/unit/customizations/sso/test_utils.py uses sockets
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
pytestFlagsArray = [ pytestFlags = [
"-Wignore::DeprecationWarning" "-Wignore::DeprecationWarning"
]; ];

View File

@ -101,7 +101,7 @@ python.pkgs.buildPythonApplication rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ pytestFlags = [
"--benchmark-skip" "--benchmark-skip"
"--pyargs" "--pyargs"
"borg.testsuite" "borg.testsuite"

View File

@ -71,7 +71,7 @@ python3.pkgs.buildPythonApplication rec {
"browsr" "browsr"
]; ];
pytestFlagsArray = [ pytestFlags = [
"--snapshot-update" "--snapshot-update"
]; ];

View File

@ -56,7 +56,7 @@ python3.pkgs.buildPythonApplication rec {
export HOME=$(mktemp -d); export HOME=$(mktemp -d);
''; '';
pytestFlagsArray = [ pytestFlags = [
# --fast skips tests which try to start a devpi-server improperly # --fast skips tests which try to start a devpi-server improperly
"--fast" "--fast"
]; ];

View File

@ -259,7 +259,7 @@ python.pkgs.buildPythonApplication rec {
nativeCheckInputs = with python.pkgs; [ pytestCheckHook ] ++ pythonPath; nativeCheckInputs = with python.pkgs; [ pytestCheckHook ] ++ pythonPath;
pytestFlagsArray = [ pytestFlags = [
# Always show more information when tests fail # Always show more information when tests fail
"-vv" "-vv"
]; ];

View File

@ -268,7 +268,7 @@ stdenv.mkDerivation (finalAttrs: {
filelock filelock
lxml lxml
]; ];
pytestFlagsArray = [ pytestFlags = [
"--benchmark-disable" "--benchmark-disable"
]; ];
disabledTestPaths = [ disabledTestPaths = [

View File

@ -80,9 +80,9 @@ python3.pkgs.buildPythonApplication rec {
pythonRemoveDeps = [ "future-annotations" ]; pythonRemoveDeps = [ "future-annotations" ];
pytestFlagsArray = [ pytestFlags = [
# DeprecationWarning: There is no current event loop # DeprecationWarning: There is no current event loop
"-W ignore::DeprecationWarning" "-Wignore::DeprecationWarning"
]; ];
disabledTests = disabledTests =

View File

@ -32,7 +32,7 @@ python3Packages.buildPythonApplication {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "-v" ]; pytestFlags = [ "-v" ];
pythonImportsCheck = [ "memtree" ]; pythonImportsCheck = [ "memtree" ];
passthru.updateScript = nix-update-script { passthru.updateScript = nix-update-script {

View File

@ -77,7 +77,7 @@ python3Packages.buildPythonApplication rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "-vv" ]; pytestFlags = [ "-vv" ];
makeWrapperArgs = lib.optionals (withTmpdir != null) [ makeWrapperArgs = lib.optionals (withTmpdir != null) [
"--set TMPDIR ${withTmpdir}" "--set TMPDIR ${withTmpdir}"

View File

@ -103,7 +103,7 @@ python3Packages.buildPythonApplication rec {
patchShebangs pre_commit/resources/hook-tmpl patchShebangs pre_commit/resources/hook-tmpl
''; '';
pytestFlagsArray = [ pytestFlags = [
"--forked" "--forked"
]; ];

View File

@ -245,9 +245,8 @@ python.pkgs.buildPythonApplication rec {
] ]
++ lib.flatten (lib.attrValues optional-dependencies); ++ lib.flatten (lib.attrValues optional-dependencies);
pytestFlagsArray = [ pytestFlags = [
"--reruns" "--reruns=3"
"3"
]; ];
disabledTests = [ disabledTests = [

View File

@ -52,9 +52,7 @@ python3Packages.buildPythonApplication rec {
pytest-httpserver pytest-httpserver
]; ];
pytestFlagsArray = [ pytestFlags = [
"-n"
"$NIX_BUILD_CORES"
"--snapshot-warn-unused" "--snapshot-warn-unused"
]; ];

View File

@ -76,7 +76,7 @@ buildPythonApplication rec {
"test2" "test2"
]; ];
pytestFlagsArray = [ "--offline" ]; pytestFlags = [ "--offline" ];
strictDeps = true; strictDeps = true;

View File

@ -65,7 +65,7 @@ buildPythonPackage rec {
"test_get_build" "test_get_build"
]; ];
pytestFlagsArray = [ "--snapshot-update" ]; pytestFlags = [ "--snapshot-update" ];
pythonImportsCheck = [ "aioazuredevops" ]; pythonImportsCheck = [ "aioazuredevops" ];

View File

@ -52,7 +52,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "aioelectricitymaps" ]; pythonImportsCheck = [ "aioelectricitymaps" ];
# https://github.com/jpbede/aioelectricitymaps/pull/415 # https://github.com/jpbede/aioelectricitymaps/pull/415
pytestFlagsArray = [ "--snapshot-update" ]; pytestFlags = [ "--snapshot-update" ];
meta = with lib; { meta = with lib; {
description = "Module for interacting with Electricity maps"; description = "Module for interacting with Electricity maps";

View File

@ -55,7 +55,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
preCheck = '' preCheck = ''
export HOME=$(mktemp -d) export HOME=$(mktemp -d)

View File

@ -38,9 +38,8 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
pythonImportsCheck = [ "aiohttp_jinja2" ]; pythonImportsCheck = [ "aiohttp_jinja2" ];

View File

@ -36,7 +36,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "aiohttp_retry" ]; pythonImportsCheck = [ "aiohttp_retry" ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
meta = with lib; { meta = with lib; {
description = "Retry client for aiohttp"; description = "Retry client for aiohttp";

View File

@ -41,7 +41,7 @@ buildPythonPackage rec {
pytest-mock pytest-mock
]; ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "aiosyncthing" ]; pythonImportsCheck = [ "aiosyncthing" ];

View File

@ -52,7 +52,7 @@ buildPythonPackage rec {
trustme trustme
]; ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "aiounifi" ]; pythonImportsCheck = [ "aiounifi" ];

View File

@ -51,7 +51,7 @@ buildPythonPackage rec {
"test_search" "test_search"
]; ];
pytestFlagsArray = [ "--snapshot-update" ]; pytestFlags = [ "--snapshot-update" ];
meta = with lib; { meta = with lib; {
description = "Module to interact with the WAQI API"; description = "Module to interact with the WAQI API";

View File

@ -44,7 +44,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "aiowithings" ]; pythonImportsCheck = [ "aiowithings" ];
pytestFlagsArray = [ "--snapshot-update" ]; pytestFlags = [ "--snapshot-update" ];
disabledTests = [ disabledTests = [
# Tests require network access # Tests require network access

View File

@ -55,7 +55,7 @@ buildPythonPackage {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
disabledTests = lib.optionals (pythonAtLeast "3.12") [ disabledTests = lib.optionals (pythonAtLeast "3.12") [
# stuck in epoll # stuck in epoll

View File

@ -84,7 +84,7 @@ buildPythonPackage rec {
]; ];
# If it won't be verbose, you'll see nothing going on for a long time. # If it won't be verbose, you'll see nothing going on for a long time.
pytestFlagsArray = [ "--verbose" ]; pytestFlags = [ "--verbose" ];
preFixup = lib.optionalString withGui '' preFixup = lib.optionalString withGui ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}") makeWrapperArgs+=("''${qtWrapperArgs[@]}")

View File

@ -86,9 +86,8 @@ buildPythonPackage rec {
"tests/lib/test_bedrock.py" "tests/lib/test_bedrock.py"
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = { meta = {

View File

@ -54,7 +54,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "ariadne" ]; pythonImportsCheck = [ "ariadne" ];
pytestFlagsArray = [ "--snapshot-update" ]; pytestFlags = [ "--snapshot-update" ];
disabledTests = [ disabledTests = [
# TypeError: TestClient.request() got an unexpected keyword argument 'content' # TypeError: TestClient.request() got an unexpected keyword argument 'content'

View File

@ -50,7 +50,7 @@ buildPythonPackage rec {
tornado tornado
]; ];
pytestFlagsArray = [ "-W ignore::DeprecationWarning" ]; pytestFlags = [ "-Wignore::DeprecationWarning" ];
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;

View File

@ -142,7 +142,7 @@ buildPythonPackage rec {
# https://github.com/NixOS/nixpkgs/issues/255262 # https://github.com/NixOS/nixpkgs/issues/255262
cd "$out" cd "$out"
''; '';
pytestFlagsArray = [ pytestFlags = [
"--hypothesis-profile=ci" "--hypothesis-profile=ci"
]; ];
postCheck = '' postCheck = ''

View File

@ -62,10 +62,9 @@ buildPythonPackage rec {
pytest-rerunfailures pytest-rerunfailures
]; ];
pytestFlagsArray = [ pytestFlags = [
# DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 # DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
# Tests must be run in the build directory. The tests create files # Tests must be run in the build directory. The tests create files

View File

@ -32,9 +32,8 @@ buildPythonPackage rec {
trio trio
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::trio.TrioDeprecationWarning"
"ignore::trio.TrioDeprecationWarning"
]; ];
disabledTests = [ disabledTests = [

View File

@ -49,7 +49,7 @@ buildPythonPackage rec {
export PATH=$PATH:$out/bin export PATH=$PATH:$out/bin
''; '';
pytestFlagsArray = [ "-s" ]; pytestFlags = [ "-s" ];
pythonImportsCheck = [ "bindep" ]; pythonImportsCheck = [ "bindep" ];

View File

@ -34,7 +34,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ pytestFlags = [
"--benchmark-disable" "--benchmark-disable"
]; ];

View File

@ -73,9 +73,8 @@ buildPythonPackage rec {
parameterized parameterized
] ++ lib.flatten (lib.attrValues optional-dependencies); ] ++ lib.flatten (lib.attrValues optional-dependencies);
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
preCheck = preCheck =

View File

@ -49,10 +49,9 @@ buildPythonPackage rec {
pytest-xdist pytest-xdist
]; ];
pytestFlagsArray = [ pytestFlags = [
# DeprecationWarning: JAXopt is no longer maintained # DeprecationWarning: JAXopt is no longer maintained
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTestPaths = [ disabledTestPaths = [

View File

@ -47,7 +47,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--benchmark-disable" ]; pytestFlags = [ "--benchmark-disable" ];
pythonImportsCheck = [ "bluetooth_data_tools" ]; pythonImportsCheck = [ "bluetooth_data_tools" ];

View File

@ -58,7 +58,7 @@ buildPythonPackage rec {
"test_readdata3" "test_readdata3"
]; ];
pytestFlagsArray = [ pytestFlags = [
"--snapshot-warn-unused" "--snapshot-warn-unused"
]; ];

View File

@ -70,9 +70,8 @@ buildPythonPackage rec {
wheel wheel
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;

View File

@ -27,12 +27,11 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
"-p no:cacheprovider" "-pno:cacheprovider"
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution # Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = certbot.meta // { meta = certbot.meta // {

View File

@ -26,8 +26,8 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
"-p no:cacheprovider" "-pno:cacheprovider"
]; ];
meta = certbot.meta // { meta = certbot.meta // {

View File

@ -27,12 +27,11 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
"-p no:cacheprovider" "-pno:cacheprovider"
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution # Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = certbot.meta // { meta = certbot.meta // {

View File

@ -24,12 +24,11 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
"-p no:cacheprovider" "-pno:cacheprovider"
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution # Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = certbot.meta // { meta = certbot.meta // {

View File

@ -27,12 +27,11 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
"-p no:cacheprovider" "-pno:cacheprovider"
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution # Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = certbot.meta // { meta = certbot.meta // {

View File

@ -61,10 +61,9 @@ buildPythonPackage rec {
pytest-xdist pytest-xdist
]; ];
pytestFlagsArray = [ pytestFlags = [
"-p no:cacheprovider" "-pno:cacheprovider"
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
makeWrapperArgs = [ "--prefix PATH : ${dialog}/bin" ]; makeWrapperArgs = [ "--prefix PATH : ${dialog}/bin" ];

View File

@ -66,9 +66,8 @@ buildPythonPackage rec {
export CI=true export CI=true
''; '';
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTests = disabledTests =

View File

@ -181,13 +181,11 @@ buildPythonPackage rec {
SWAGGER_UI_DOWNLOAD_URL = "file://${swagger-ui}"; SWAGGER_UI_DOWNLOAD_URL = "file://${swagger-ui}";
}; };
pytestFlagsArray = [ pytestFlags = [
"-x" # these are slow tests, so stop on the first failure "-x" # these are slow tests, so stop on the first failure
"-v" "-v"
"-W" "-Wignore:DeprecationWarning"
"ignore:DeprecationWarning" "-Wignore:PytestCollectionWarning"
"-W"
"ignore:PytestCollectionWarning"
]; ];
preCheck = '' preCheck = ''

View File

@ -22,8 +22,8 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
"--doctest-glob=\"*.rst\"" "--doctest-glob=*.rst"
"--doctest-modules" "--doctest-modules"
]; ];

View File

@ -44,7 +44,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "connect_box" ]; pythonImportsCheck = [ "connect_box" ];
pytestFlagsArray = [ "--vcr-record=none" ]; pytestFlags = [ "--vcr-record=none" ];
meta = with lib; { meta = with lib; {
description = "Interact with a Compal CH7465LG cable modem/router"; description = "Interact with a Compal CH7465LG cable modem/router";

View File

@ -31,7 +31,7 @@ buildPythonPackage rec {
pytest-html pytest-html
]; ];
pytestFlagsArray = [ pytestFlags = [
"--html=testing-report.html" "--html=testing-report.html"
"--self-contained-html" "--self-contained-html"
]; ];

View File

@ -69,7 +69,7 @@ buildPythonPackage rec {
pytest-xdist pytest-xdist
] ++ optional-dependencies.ssh; ] ++ optional-dependencies.ssh;
pytestFlagsArray = [ "--disable-pytest-warnings" ]; pytestFlags = [ "--disable-pytest-warnings" ];
disabledTestPaths = [ disabledTestPaths = [
# save compute time by not running benchmarks # save compute time by not running benchmarks

View File

@ -77,9 +77,8 @@ buildPythonPackage rec {
webtest webtest
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTestPaths = [ disabledTestPaths = [

View File

@ -75,7 +75,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "datafusion" ]; pythonImportsCheck = [ "datafusion" ];
pytestFlagsArray = [ pytestFlags = [
"--pyargs" "--pyargs"
pname pname
]; ];

View File

@ -230,10 +230,9 @@ buildPythonPackage rec {
httpretty httpretty
]; ];
pytestFlagsArray = [ pytestFlags = [
# Deprecated in 3.13. Use exc_type_str instead. # Deprecated in 3.13. Use exc_type_str instead.
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
pythonImportsCheck = [ "datalad" ]; pythonImportsCheck = [ "datalad" ];

View File

@ -35,7 +35,7 @@ buildPythonPackage rec {
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_ssh" ]; disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_ssh" ];
# don't swallow stdout/stderr # don't swallow stdout/stderr
pytestFlagsArray = [ "-s" ]; pytestFlags = [ "-s" ];
pythonImportsCheck = [ "deploykit" ]; pythonImportsCheck = [ "deploykit" ];

View File

@ -31,7 +31,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "discovery30303" ]; pythonImportsCheck = [ "discovery30303" ];

View File

@ -67,9 +67,8 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
] ++ lib.flatten (lib.attrValues optional-dependencies); ] ++ lib.flatten (lib.attrValues optional-dependencies);
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTests = [ disabledTests = [

View File

@ -33,7 +33,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "dynalite_devices_lib" ]; pythonImportsCheck = [ "dynalite_devices_lib" ];

View File

@ -58,9 +58,8 @@ buildPythonPackage rec {
pythonImportsCheck = [ "elastic_transport" ]; pythonImportsCheck = [ "elastic_transport" ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTests = [ disabledTests = [

View File

@ -35,7 +35,7 @@ buildPythonPackage rec {
pytest-html pytest-html
]; ];
pytestFlagsArray = [ pytestFlags = [
"--html=testing-report.html" "--html=testing-report.html"
"--self-contained-html" "--self-contained-html"
]; ];

View File

@ -51,7 +51,7 @@ buildPythonPackage rec {
"test_stdouterrin_setnull" "test_stdouterrin_setnull"
]; ];
pytestFlagsArray = [ "-vvv" ]; pytestFlags = [ "-vvv" ];
pythonImportsCheck = [ "execnet" ]; pythonImportsCheck = [ "execnet" ];

View File

@ -89,7 +89,7 @@ buildPythonPackage rec {
cd tests cd tests
''; '';
pytestFlagsArray = [ "--import-mode append" ]; pytestFlags = [ "--import-mode=append" ];
disabledTests = [ disabledTests = [
# this test requires xformers # this test requires xformers

View File

@ -116,11 +116,11 @@ buildPythonPackage rec {
++ passlib.optional-dependencies.bcrypt ++ passlib.optional-dependencies.bcrypt
++ optional-dependencies.all; ++ optional-dependencies.all;
pytestFlagsArray = [ pytestFlags = [
# ignoring deprecation warnings to avoid test failure from # ignoring deprecation warnings to avoid test failure from
# tests/test_tutorial/test_testing/test_tutorial001.py # tests/test_tutorial/test_testing/test_tutorial001.py
"-W ignore::DeprecationWarning" "-Wignore::DeprecationWarning"
"-W ignore::pytest.PytestUnraisableExceptionWarning" "-Wignore::pytest.PytestUnraisableExceptionWarning"
]; ];
disabledTests = [ disabledTests = [

View File

@ -38,7 +38,7 @@ buildPythonPackage rec {
pytest-benchmark pytest-benchmark
]; ];
pytestFlagsArray = [ "--benchmark-skip" ]; pytestFlags = [ "--benchmark-skip" ];
pythonImportsCheck = [ "fastdiff" ]; pythonImportsCheck = [ "fastdiff" ];

View File

@ -39,7 +39,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--hypothesis-profile=standard" ]; pytestFlags = [ "--hypothesis-profile=standard" ];
pythonImportsCheck = [ "fastnumbers" ]; pythonImportsCheck = [ "fastnumbers" ];

View File

@ -43,9 +43,8 @@ buildPythonPackage rec {
pythonImportsCheck = [ "flask_marshmallow" ]; pythonImportsCheck = [ "flask_marshmallow" ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = { meta = {

View File

@ -45,10 +45,9 @@ buildPythonPackage rec {
"test_explicit_table" "test_explicit_table"
]; ];
pytestFlagsArray = lib.optionals (pythonAtLeast "3.12") [ pytestFlags = lib.optionals (pythonAtLeast "3.12") [
# datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. # datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version.
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
pythonImportsCheck = [ "flask_sqlalchemy" ]; pythonImportsCheck = [ "flask_sqlalchemy" ];

View File

@ -40,7 +40,7 @@ buildPythonPackage rec {
# disable code coverage checks for all OS. Upstream does not enforce these # disable code coverage checks for all OS. Upstream does not enforce these
# checks on Darwin, and code coverage cannot be improved downstream nor is it # checks on Darwin, and code coverage cannot be improved downstream nor is it
# relevant to the user. # relevant to the user.
pytestFlagsArray = [ "--no-cov" ]; pytestFlags = [ "--no-cov" ];
pythonImportsCheck = [ "flufl.lock" ]; pythonImportsCheck = [ "flufl.lock" ];

View File

@ -42,7 +42,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "fyta_cli" ]; pythonImportsCheck = [ "fyta_cli" ];
pytestFlagsArray = [ "--snapshot-update" ]; pytestFlags = [ "--snapshot-update" ];
meta = with lib; { meta = with lib; {
description = "Module to access the FYTA API"; description = "Module to access the FYTA API";

View File

@ -38,7 +38,7 @@ buildPythonPackage rec {
disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [ "test/test_init.py" ]; disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [ "test/test_init.py" ];
pytestFlagsArray = [ "--skip-tests-requiring-internet" ]; pytestFlags = [ "--skip-tests-requiring-internet" ];
pythonImportsCheck = [ "geopy" ]; pythonImportsCheck = [ "geopy" ];

View File

@ -44,7 +44,7 @@ buildPythonPackage rec {
pytest-mock pytest-mock
]; ];
pytestFlagsArray = [ "--benchmark-disable" ]; pytestFlags = [ "--benchmark-disable" ];
pythonImportsCheck = [ "graphene" ]; pythonImportsCheck = [ "graphene" ];

View File

@ -36,9 +36,8 @@ buildPythonPackage rec {
"google.iam.v1" "google.iam.v1"
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = with lib; { meta = with lib; {

View File

@ -38,7 +38,7 @@ buildPythonPackage rec {
pyyaml pyyaml
]; ];
pytestFlagsArray = [ "--benchmark-disable" ]; pytestFlags = [ "--benchmark-disable" ];
pythonImportsCheck = [ "guessit" ]; pythonImportsCheck = [ "guessit" ];

View File

@ -52,7 +52,7 @@ buildPythonPackage rec {
syrupy syrupy
]; ];
pytestFlagsArray = [ "--snapshot-update" ]; pytestFlags = [ "--snapshot-update" ];
pythonImportsCheck = [ "habiticalib" ]; pythonImportsCheck = [ "habiticalib" ];

View File

@ -38,7 +38,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "hmmlearn" ]; pythonImportsCheck = [ "hmmlearn" ];
pytestFlagsArray = [ pytestFlags = [
"--pyargs" "--pyargs"
"hmmlearn" "hmmlearn"
]; ];

View File

@ -46,7 +46,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--asyncio-mode=auto" ]; pytestFlags = [ "--asyncio-mode=auto" ];
disabledTests = [ disabledTests = [
# Assert issues with datetime # Assert issues with datetime

View File

@ -85,11 +85,9 @@ buildPythonPackage rec {
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning" "-Wignore::trio.TrioDeprecationWarning"
"-W"
"ignore::trio.TrioDeprecationWarning"
]; ];
disabledTests = [ disabledTests = [

View File

@ -72,9 +72,8 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::UserWarning"
"ignore::UserWarning"
]; ];
# Test environment setup broken under Nix for a few tests: # Test environment setup broken under Nix for a few tests:

View File

@ -67,10 +67,9 @@ buildPythonPackage rec {
"tests/test_typeguard.py" "tests/test_typeguard.py"
]; ];
pytestFlagsArray = [ pytestFlags = [
# RuntimeWarning: coroutine '*' was never awaited # RuntimeWarning: coroutine '*' was never awaited
"-W" "-Wignore::RuntimeWarning"
"ignore::RuntimeWarning"
]; ];
pythonImportsCheck = [ "icontract" ]; pythonImportsCheck = [ "icontract" ];

View File

@ -183,8 +183,8 @@ buildPythonPackage rec {
popd popd
''; '';
pytestFlagsArray = [ pytestFlags = [
"-p no:pytest-blender" "-pno:pytest-blender"
]; ];
disabledTestPaths = [ disabledTestPaths = [

View File

@ -37,7 +37,7 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ pytestFlags = [
# verbose build outputs needed to debug hard-to-reproduce hydra failures # verbose build outputs needed to debug hard-to-reproduce hydra failures
"-v" "-v"
"--pyargs" "--pyargs"

View File

@ -31,7 +31,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--benchmark-disable" ]; pytestFlags = [ "--benchmark-disable" ];
meta = with lib; { meta = with lib; {
description = "Mixed sync-async queue"; description = "Mixed sync-async queue";

View File

@ -45,9 +45,9 @@ buildPythonPackage rec {
export HOME=$TMPDIR export HOME=$TMPDIR
''; '';
pytestFlagsArray = [ pytestFlags = [
# suppress pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0> # suppress pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
"-W ignore::pytest.PytestUnraisableExceptionWarning" "-Wignore::pytest.PytestUnraisableExceptionWarning"
]; ];
disabledTests = [ disabledTests = [

View File

@ -47,7 +47,7 @@ buildPythonPackage rec {
pytest-timeout pytest-timeout
]; ];
pytestFlagsArray = [ "-Wignore::DeprecationWarning" ]; pytestFlags = [ "-Wignore::DeprecationWarning" ];
preCheck = '' preCheck = ''
export HOME=$(mktemp -d) export HOME=$(mktemp -d)

View File

@ -86,14 +86,12 @@ buildPythonPackage rec {
flaky flaky
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
# 19 failures on python 3.13: # 19 failures on python 3.13:
# ResourceWarning: unclosed database in <sqlite3.Connection object at 0x7ffff2a0cc70> # ResourceWarning: unclosed database in <sqlite3.Connection object at 0x7ffff2a0cc70>
# TODO: Can probably be removed at the next update # TODO: Can probably be removed at the next update
"-W" "-Wignore::pytest.PytestUnraisableExceptionWarning"
"ignore::pytest.PytestUnraisableExceptionWarning"
]; ];
preCheck = '' preCheck = ''

View File

@ -67,9 +67,8 @@ buildPythonPackage rec {
export HOME=$(mktemp -d) export HOME=$(mktemp -d)
''; '';
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTestPaths = [ disabledTestPaths = [

View File

@ -73,11 +73,9 @@ buildPythonPackage rec {
export PYTHONPATH=${src}/libs/langgraph:$PYTHONPATH export PYTHONPATH=${src}/libs/langgraph:$PYTHONPATH
''; '';
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::pytest.PytestDeprecationWarning"
"ignore::pytest.PytestDeprecationWarning" "-Wignore::DeprecationWarning"
"-W"
"ignore::DeprecationWarning"
]; ];
disabledTestPaths = [ disabledTestPaths = [

View File

@ -40,7 +40,7 @@ buildPythonPackage rec {
"test_reify_recursion_limit" "test_reify_recursion_limit"
]; ];
pytestFlagsArray = [ pytestFlags = [
"--benchmark-skip" "--benchmark-skip"
"--html=testing-report.html" "--html=testing-report.html"
"--self-contained-html" "--self-contained-html"

View File

@ -38,10 +38,9 @@ buildPythonPackage rec {
typeguard typeguard
]; ];
pytestFlagsArray = [ pytestFlags = [
# DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. # DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12.
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTests = lib.optionals (pythonAtLeast "3.10") [ disabledTests = lib.optionals (pythonAtLeast "3.10") [

View File

@ -97,7 +97,7 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ "--benchmark-disable" ]; pytestFlags = [ "--benchmark-disable" ];
disabledTestPaths = lib.optionals (!withOlm) [ disabledTestPaths = lib.optionals (!withOlm) [
"tests/encryption_test.py" "tests/encryption_test.py"

View File

@ -96,9 +96,8 @@ buildPythonPackage rec {
requests requests
] ++ lib.flatten (lib.attrValues optional-dependencies); ] ++ lib.flatten (lib.attrValues optional-dependencies);
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::pydantic.warnings.PydanticDeprecatedSince211"
"ignore::pydantic.warnings.PydanticDeprecatedSince211"
]; ];
disabledTests = disabledTests =

View File

@ -38,7 +38,7 @@ buildPythonPackage {
pytest-html pytest-html
]; ];
pytestFlagsArray = [ pytestFlags = [
"--html=testing-report.html" "--html=testing-report.html"
"--self-contained-html" "--self-contained-html"
]; ];

View File

@ -45,7 +45,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "mlrose" ]; pythonImportsCheck = [ "mlrose" ];
# Fix random seed during tests # Fix random seed during tests
pytestFlagsArray = [ "--randomly-seed 0" ]; pytestFlags = [ "--randomly-seed=0" ];
meta = with lib; { meta = with lib; {
description = "Machine Learning, Randomized Optimization and SEarch"; description = "Machine Learning, Randomized Optimization and SEarch";

View File

@ -45,7 +45,7 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "-sv" ]; pytestFlags = [ "-sv" ];
disabledTests = [ disabledTests = [
# Type changed in numpy2 test should be updated # Type changed in numpy2 test should be updated

View File

@ -44,7 +44,7 @@ buildPythonPackage {
pytest-benchmark pytest-benchmark
]; ];
pytestFlagsArray = [ "--benchmark-disable" ]; pytestFlags = [ "--benchmark-disable" ];
pythonImportsCheck = [ "motmetrics" ]; pythonImportsCheck = [ "motmetrics" ];

View File

@ -72,7 +72,7 @@ buildPythonPackage rec {
] ++ lib.flatten (lib.attrValues optional-dependencies); ] ++ lib.flatten (lib.attrValues optional-dependencies);
# See https://github.com/NixOS/nixpkgs/issues/381908 and https://github.com/NixOS/nixpkgs/issues/385450. # See https://github.com/NixOS/nixpkgs/issues/381908 and https://github.com/NixOS/nixpkgs/issues/385450.
pytestFlagsArray = [ "--timeout=600" ]; pytestFlags = [ "--timeout=600" ];
pythonImportsCheck = [ "moviepy" ]; pythonImportsCheck = [ "moviepy" ];

View File

@ -69,9 +69,8 @@ buildPythonPackage rec {
"test_unary_two_elements" "test_unary_two_elements"
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
meta = { meta = {

View File

@ -87,9 +87,8 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
disabledTests = [ disabledTests = [

View File

@ -90,7 +90,7 @@ buildPythonPackage rec {
"tests/tests_microstates.py" "tests/tests_microstates.py"
]; ];
pytestFlagsArray = [ pytestFlags = [
# Otherwise, test collection fails with: # Otherwise, test collection fails with:
# AttributeError: module 'scipy.ndimage._delegators' has no attribute '@py_builtins_signature'. Did you mean: 'grey_dilation_signature'? # AttributeError: module 'scipy.ndimage._delegators' has no attribute '@py_builtins_signature'. Did you mean: 'grey_dilation_signature'?
# https://github.com/scipy/scipy/issues/22236 # https://github.com/scipy/scipy/issues/22236

View File

@ -77,9 +77,8 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pytestFlagsArray = [ pytestFlags = [
"-W" "-Wignore::DeprecationWarning"
"ignore::DeprecationWarning"
]; ];
env = { env = {

Some files were not shown because too many files have changed in this diff Show More