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
];
pytestFlagsArray = [
"-W"
"ignore::sphinx.deprecation.RemovedInSphinx90Warning"
"--rootdir"
"src/ablog"
"-W"
"ignore::sphinx.deprecation.RemovedInSphinx90Warning" # Ignore ImportError
pytestFlags = [
"-Wignore::sphinx.deprecation.RemovedInSphinx90Warning"
"--rootdir=src/ablog"
"-Wignore::sphinx.deprecation.RemovedInSphinx90Warning" # Ignore ImportError
];
# assert "post 1" not in html

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -55,7 +55,7 @@ buildPythonPackage {
pytestCheckHook
];
pytestFlagsArray = [ "--asyncio-mode=auto" ];
pytestFlags = [ "--asyncio-mode=auto" ];
disabledTests = lib.optionals (pythonAtLeast "3.12") [
# 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.
pytestFlagsArray = [ "--verbose" ];
pytestFlags = [ "--verbose" ];
preFixup = lib.optionalString withGui ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -45,10 +45,9 @@ buildPythonPackage rec {
"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.
"-W"
"ignore::DeprecationWarning"
"-Wignore::DeprecationWarning"
];
pythonImportsCheck = [ "flask_sqlalchemy" ];

View File

@ -40,7 +40,7 @@ buildPythonPackage rec {
# 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
# relevant to the user.
pytestFlagsArray = [ "--no-cov" ];
pytestFlags = [ "--no-cov" ];
pythonImportsCheck = [ "flufl.lock" ];

View File

@ -42,7 +42,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "fyta_cli" ];
pytestFlagsArray = [ "--snapshot-update" ];
pytestFlags = [ "--snapshot-update" ];
meta = with lib; {
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" ];
pytestFlagsArray = [ "--skip-tests-requiring-internet" ];
pytestFlags = [ "--skip-tests-requiring-internet" ];
pythonImportsCheck = [ "geopy" ];

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -45,9 +45,9 @@ buildPythonPackage rec {
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>
"-W ignore::pytest.PytestUnraisableExceptionWarning"
"-Wignore::pytest.PytestUnraisableExceptionWarning"
];
disabledTests = [

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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