guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit 8ada24b499fb46c9e5c51d78b19ffd6840936848
Author: Nicolas Graves <[email protected]>
AuthorDate: Fri Jan 31 02:56:39 2025 +0100

    build-system/pyproject: Stop hiding options.
    
    * gnu/packages/python-crypto.scm (python-keyring)
    [arguments]<#:test-flags>: Remove arguments hiding coverage options.
    
    * gnu/packages/python-web.scm (python-asgi-lifespan,
    python-openapi-schema-validator, python-openapi-spec-validator,
    python-openapi-core)[arguments]<#:test-flags>: Remove arguments hiding
    coverage options.
    (python-openapi-schema-validator, python-openapi-spec-validator)
    [arguments]<#:phases>: Remove 'remove-coverage-pytest-options phase.
    (python-cssselect2)[arguments]: Remove uneeded field.
    (python-quart)[arguments]: Remove uneeded field.
    (python-jsonpickle)[arguments]<#:test-flags>: Remove uneeded
    test-flags.
    
    * gnu/packages/python-xyz.scm (python-cattrs)
    [arguments]<#:phases>: Remove arguments hiding coverage options.
    (python-blessed)[arguments]: Remove uneeded field.
    
    python-pytest-cov remove option
    
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/audio.scm          |  3 +--
 gnu/packages/python-crypto.scm  |  1 -
 gnu/packages/python-science.scm |  1 -
 gnu/packages/python-web.scm     | 42 +++--------------------------------------
 gnu/packages/python-xyz.scm     | 11 ++---------
 5 files changed, 6 insertions(+), 52 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index de72dfc873..035a2300e4 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -7992,8 +7992,7 @@ Home Page}.")
      (list
       #:test-flags
       ;; Ignore --mpl flag.
-      '(list "-c" "/dev/null"
-             "-k" (string-append
+      '(list "-k" (string-append
                    ;; Resampling tests require python-samplerate.
                    "not resample"
                    ;; These tests use Pooch and download data files.
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index c918f953d1..f696a3247c 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -318,7 +318,6 @@ do what is needed for client/server Kerberos authentication 
based on
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags '(list "-c" "/dev/null") ;avoid extra test dependencies
       #:phases
       #~(modify-phases %standard-phases
           (add-before 'check 'workaround-test-failure
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index c95759e182..c22840e3ae 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1965,7 +1965,6 @@ between dataframe libraries.
       ;; tests: 121 passed, 1 deselected, 3 warnings
       #:test-flags
       #~(list "--pyargs" "ndindex"
-              "-c" "/dev/null" ;avoid coverage
               "-k" "not test_iter_indices_matmul") ; flaky
       #:phases
       #~(modify-phases %standard-phases
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 171060c3c9..7a5d46e26f 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2580,8 +2580,7 @@ that is then compared to a @code{csrftoken} hidden form 
field or a
     (arguments
      (list
       #:test-flags
-      '(list "-c" "/dev/null"           ;ignore coverage-related options
-             "-k"
+      '(list "-k"
              (string-append
               ;; XXX: Some tests fail because of "Exceptions from Trio nursery"
               "not (test_lifespan_manager[trio-None-None-StartupFailed]"
@@ -3736,10 +3735,7 @@ CSS3 that adds programming capabilities and some other 
syntactic sugar.")
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags
-      ;; Prevent running the flake8 and black pytest plugins, which only tests
-      ;; style and frequently causes harmless failures.
-      '(list "-o" "addopts=''" "tests")
+      #:test-flags '(list "tests")
       #:phases
       '(modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -5033,10 +5029,6 @@ OpenAI API.")
       '(list "-k" "not test_array_prefixitems_invalid")
       #:phases
       #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-coverage-pytest-options
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("^--cov.*") ""))))
           ;; See 
https://github.com/python-openapi/openapi-schema-validator/issues/204
           (add-after 'unpack 'relax-requirements
             (lambda _
@@ -5080,13 +5072,7 @@ JSON Schema Specification Draft 2020-12.
      (list
       ;; These tests attempt to fetch resources from the Internet
       #:test-flags '(list "--ignore-glob=tests/integration/validation/**"
-                          "-k" "not example")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-coverage-pytest-options
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("^--cov.*") "")))))))
+                          "-k" "not example")))
     (native-inputs
      (list python-poetry-core
            python-pytest))
@@ -5125,9 +5111,6 @@ compliance with the specification.")
      (list
       #:test-flags
       '(list "tests/unit"
-             ;; Ignore Pytest configuration in setup.cfg that adds
-             ;; unwanted flake8 and coverage options.
-             "-c" "/dev/null"
              "-k" "not test_chars_valid")))
     (native-inputs (list python-django
                          python-falcon
@@ -9447,17 +9430,6 @@ in various CSS modules.")
        (sha256
         (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
     (build-system pyproject-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-linters
-           ;; Their check fails; none of our business.
-           (lambda _
-             (substitute* '("setup.py" "pyproject.toml")
-               (("'pytest-flake8',") "")
-               (("'pytest-isort',") "")
-               (("--flake8") "")
-               (("--isort") "")))))))
     (propagated-inputs
      (list python-tinycss2))
     (native-inputs
@@ -12666,14 +12638,6 @@ accessing the Twitter API.")
        (sha256
         (base32 "1h5ifv8g9dc9m07vj4v7dfalam83v38545d845vvgys1gan1pscd"))))
     (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-coverage-pytest-options
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("--no-cov-on-fail") "")))))))
     (native-inputs
      (list python-poetry-core
            python-pytest
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 33b717d4e9..8eec17c885 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10607,8 +10607,7 @@ Server (PLS).")
     (arguments
      (list
       #:test-flags
-      '(list "-c" "/dev/null"           ;avoid coverage
-             "--ignore-glob" "**/test_autopep8_format.py"  ;avoid autopep8 dep
+      '(list "--ignore-glob" "**/test_autopep8_format.py"  ;avoid autopep8 dep
              "-k"
              (string-append
               "not test_concurrent_ws_requests "  ; flaky
@@ -21779,9 +21778,7 @@ interfaces.")
               (substitute* "pyproject.toml"
                 ;; Fix version string
                 (("dynamic = \\[\"version\"\\]")
-                 (string-append "version = \"" #$version "\""))
-                ;; Just run pytest with no frills
-                (("addopts = \"-l.*") ""))))
+                 (string-append "version = \"" #$version "\"")))))
           ;; XXX Our python-hypothesis package is too old.
           (add-after 'unpack 'compatibility
             (lambda _
@@ -30374,10 +30371,6 @@ For the most part it's transliterated from C, the 
major differences are:
          ;; Don't get hung up on Windows test failures.
          '(delete-file "blessed/win_terminal.py"))))
     (build-system pyproject-build-system)
-    (arguments
-     (list
-      ;; Avoid python-pytest-coverage
-      #:test-flags '(list "-c /dev/null")))
     (propagated-inputs (list python-six python-wcwidth))
     (native-inputs (list python-pytest python-setuptools python-wheel))
     (home-page "https://github.com/jquast/blessed";)

Reply via email to