diff --git a/pkgs/by-name/co/conan/package.nix b/pkgs/by-name/co/conan/package.nix index 386e59d985b0..ebd96f12693c 100644 --- a/pkgs/by-name/co/conan/package.nix +++ b/pkgs/by-name/co/conan/package.nix @@ -65,14 +65,11 @@ python3.pkgs.buildPythonApplication rec { "conan" ]; - pytestFlagsArray = [ - "-n" - "$NIX_BUILD_CORES" - ]; - disabledTests = [ # Tests require network access "TestFTP" + # Unstable test + "test_shared_windows_find_libraries" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Rejects paths containing nix "test_conditional_os" diff --git a/pkgs/by-name/fi/fichub-cli/package.nix b/pkgs/by-name/fi/fichub-cli/package.nix index 3d62d7b2a304..f694a9b99307 100644 --- a/pkgs/by-name/fi/fichub-cli/package.nix +++ b/pkgs/by-name/fi/fichub-cli/package.nix @@ -35,21 +35,8 @@ python3Packages.buildPythonApplication rec { pytestCheckHook ]; - # The package tries to create a file under the home directory on import - preCheck = '' - export HOME=$(mktemp -d) - ''; - - pytestFlagsArray = [ - # pytest exits with a code of 5 if no tests are selected. - # handle this specific case as not an error - "|| ([ $? = 5 ] || exit $?)" - ]; - - disabledTestPaths = [ - # Loading tests tries to download something from pypi.org - "tests/test_cli.py" - ]; + # Loading tests tries to download something from pypi.org + doCheck = false; meta = { description = "CLI for the fichub.net API"; diff --git a/pkgs/by-name/pi/picard/package.nix b/pkgs/by-name/pi/picard/package.nix index e43e39e5a47d..e39f26d4a84e 100644 --- a/pkgs/by-name/pi/picard/package.nix +++ b/pkgs/by-name/pi/picard/package.nix @@ -62,7 +62,7 @@ pythonPackages.buildPythonApplication rec { pyyaml ]; - setupPyGlobalFlags = [ "build" "--disable-autoupdate" "--localedir=$out/share/locale" ]; + setupPyGlobalFlags = [ "build" "--disable-autoupdate" "--localedir=${placeholder "out"}/share/locale" ]; preCheck = '' export HOME=$(mktemp -d) diff --git a/pkgs/by-name/ro/routersploit/package.nix b/pkgs/by-name/ro/routersploit/package.nix index 3f656e8e4578..14de115541af 100644 --- a/pkgs/by-name/ro/routersploit/package.nix +++ b/pkgs/by-name/ro/routersploit/package.nix @@ -39,8 +39,6 @@ python3.pkgs.buildPythonApplication rec { ]; pytestFlagsArray = [ - "-n" - "$NIX_BUILD_CORES" # Run the same tests as upstream does in the first round "tests/core/" "tests/test_exploit_scenarios.py" diff --git a/pkgs/development/python-modules/bottleneck/default.nix b/pkgs/development/python-modules/bottleneck/default.nix index 18aa852cd73b..f89ea81255e4 100644 --- a/pkgs/development/python-modules/bottleneck/default.nix +++ b/pkgs/development/python-modules/bottleneck/default.nix @@ -24,7 +24,8 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - pytestFlagsArray = [ "$out/${python.sitePackages}" ]; + preCheck = "pushd $out"; + postCheck = "popd"; disabledTests = [ "test_make_c_files" ]; diff --git a/pkgs/development/python-modules/certbot-dns-inwx/default.nix b/pkgs/development/python-modules/certbot-dns-inwx/default.nix index 08c83c264bca..81b20f23ff79 100644 --- a/pkgs/development/python-modules/certbot-dns-inwx/default.nix +++ b/pkgs/development/python-modules/certbot-dns-inwx/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { # Doesn't have any tests doCheck = false; - pytestCheckHook = [ "certbot_dns_inwx" ]; + pytestImportsCheck = [ "certbot_dns_inwx" ]; meta = with lib; { description = "INWX DNS Authenticator plugin for Certbot"; diff --git a/pkgs/development/python-modules/dtw-python/default.nix b/pkgs/development/python-modules/dtw-python/default.nix index 7021d576bab4..627d16b0e062 100644 --- a/pkgs/development/python-modules/dtw-python/default.nix +++ b/pkgs/development/python-modules/dtw-python/default.nix @@ -39,10 +39,12 @@ buildPythonPackage rec { ]; # We need to run tests on real built package: https://github.com/NixOS/nixpkgs/issues/255262 - preCheck = "cd $out"; - nativeCheckInputs = [ pytestCheckHook ]; # tests/ are not included to output package, so we have to set path explicitly - pytestFlagsArray = [ "$src/tests" ]; + preCheck = '' + appendToVar pytestFlagsArray "$src/tests" + cd $out + ''; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "dtw" ]; diff --git a/pkgs/development/python-modules/iso4217/default.nix b/pkgs/development/python-modules/iso4217/default.nix index 56945d3ed07a..b9dd6d2f9f7b 100644 --- a/pkgs/development/python-modules/iso4217/default.nix +++ b/pkgs/development/python-modules/iso4217/default.nix @@ -40,15 +40,15 @@ buildPythonPackage rec { # The table is already downloaded export ISO4217_DOWNLOAD=0 # Copy the table file to satifiy the build process - cp -r ${table} $pname/table.xml + cp -r ${table} iso4217/table.xml ''; postInstall = '' # Copy the table file - cp -r ${table} $out/${python.sitePackages}/$pname/table.xml + cp -r ${table} $out/${python.sitePackages}/iso4217/table.xml ''; - pytestFlagsArray = [ "$pname/test.py" ]; + pytestFlagsArray = [ "iso4217/test.py" ]; pythonImportsCheck = [ "iso4217" ]; diff --git a/pkgs/development/python-modules/macaddress/default.nix b/pkgs/development/python-modules/macaddress/default.nix index 97d07f45d1c8..137561253049 100644 --- a/pkgs/development/python-modules/macaddress/default.nix +++ b/pkgs/development/python-modules/macaddress/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { reprshed ]; - pytestFlagsArray = [ "$src/test.py" ]; + pytestFlagsArray = [ "test.py" ]; meta = with lib; { homepage = "https://github.com/mentalisttraceur/python-macaddress"; diff --git a/pkgs/development/python-modules/qcodes/default.nix b/pkgs/development/python-modules/qcodes/default.nix index 01ae8380228c..a1c5206f4af2 100644 --- a/pkgs/development/python-modules/qcodes/default.nix +++ b/pkgs/development/python-modules/qcodes/default.nix @@ -148,8 +148,6 @@ buildPythonPackage rec { pytestFlagsArray = [ "-v" - "-n" - "$NIX_BUILD_CORES" # Follow upstream with settings "-m 'not serial'" "--hypothesis-profile ci" diff --git a/pkgs/development/python-modules/vapoursynth/default.nix b/pkgs/development/python-modules/vapoursynth/default.nix index 1fb1d4be03ef..8e50bba69a4d 100644 --- a/pkgs/development/python-modules/vapoursynth/default.nix +++ b/pkgs/development/python-modules/vapoursynth/default.nix @@ -20,7 +20,7 @@ buildPythonPackage { unittestFlagsArray = [ "-s" - "$src/test" + "test" "-p" "'*test.py'" ];