diff mbox series

[bug#70858,30/32] build-system/pyproject: Stop hiding options.

Message ID 20240510075605.6303-30-ngraves@ngraves.fr
State New
Headers show
Series None | expand

Commit Message

Nicolas Graves May 10, 2024, 7:55 a.m. UTC
* gnu/packages/pdf.scm (python-pydyf, weasyprint)[arguments]
<#:test-flags>: Remove arguments hiding coverage options.

* gnu/packages/python-crypto.scm (python-keyring)
[arguments]<#:test-flags>: Remove arguments hiding coverage options.

* gnu/packages/python-web.scm (python-asgi-csrf, 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, python-tinycss2)[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.

Change-Id: Ibe08ecfebf8a24259c8658918d98fe9e5a8925b7
---
 gnu/packages/pdf.scm           |  6 +---
 gnu/packages/python-crypto.scm |  1 -
 gnu/packages/python-web.scm    | 51 ++++------------------------------
 gnu/packages/python-xyz.scm    |  4 +--
 4 files changed, 7 insertions(+), 55 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 4e260d614de..16d4d9336e3 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -816,9 +816,6 @@  (define-public python-pydyf
        (sha256
         (base32 "18q43g5d9455msipcgd5fvnh8m4a2rz189slzfg80yycjw66rshs"))))
     (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:test-flags #~'("-c" "/dev/null")))
     (propagated-inputs (list python-pillow))
     (native-inputs
      (list ghostscript
@@ -1635,8 +1632,7 @@  (define-public weasyprint
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags #~(list "-c" "/dev/null"
-                           "-n" (number->string (parallel-job-count)))
+      #:test-flags #~(list "-n" (number->string (parallel-job-count)))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-library-paths
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 6965a330624..6139856a906 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -288,7 +288,6 @@  (define-public python-keyring
     (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-web.scm b/gnu/packages/python-web.scm
index 425aa9d5d0f..a149e561243 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -738,10 +738,7 @@  (define-public python-asgi-csrf
     (build-system pyproject-build-system)
     (arguments
      (list #:test-flags
-           ;; Provide a null config to avoid the extraneous dependency on
-           ;; python-pytest-coverage.
-           #~(list "-c" "/dev/null"
-                   ;; Disable two failing tests (see:
+           #~(list ;; Disable two failing tests (see:
                    ;; https://github.com/simonw/asgi-csrf/issues/24).
                    "-k" (string-append
                          "not (test_multipart "
@@ -780,8 +777,7 @@  (define-public python-asgi-lifespan
     (arguments
      (list
       #:test-flags
-      '(list "-c" "/dev/null"           ;ignore coverage-related options
-             "-k"
+      '(list "-k"
              (string-append
               ;; XXX: Some tests fail because of a 'lifespan.shutdown.failed'
               ;; extra event, perhaps because our version of trio is older.
@@ -1528,10 +1524,7 @@  (define-public python-jsonpickle
     (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
@@ -2178,13 +2171,7 @@  (define-public python-openapi-schema-validator
      (list
       #:test-flags
       ;; This one returns 5 instead of 4 elements
-      '(list "-k" "not test_array_prefixitems_invalid")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-coverage-pytest-options
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("^--cov.*") "")))))))
+      '(list "-k" "not test_array_prefixitems_invalid")))
     (native-inputs (list python-poetry-core python-pytest))
     (propagated-inputs
      (list python-isodate
@@ -2222,13 +2209,7 @@  (define-public python-openapi-spec-validator
      (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))
@@ -2267,9 +2248,6 @@  (define-public python-openapi-core
      (list
       #:test-flags
       '(list "tests/unit"
-             ;; Ignore Pytest configuration in setup.cfg that adds
-             ;; unwanted flake8 and coverage options.
-             "-c" "/dev/null"
              "-k" (string-append
                    ;; Type mismatches
                    "not TestFlaskOpenAPIRequest"
@@ -5891,14 +5869,6 @@  (define-public python-tinycss2
        (sha256
         (base32 "0zyc48vbmczpqj7f3f0d7zb3bz29fyj50dg0m6bbwbr5i88kq3sq"))))
     (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'check 'remove-unwanted-dependencies
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("^addopts.*") "")))))))
     (propagated-inputs
      (list python-webencodings))
     (native-inputs
@@ -5925,17 +5895,6 @@  (define-public python-cssselect2
        (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
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 733a60b087d..2bfeecf33e0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21316,9 +21316,7 @@  (define-public python-cattrs
               (substitute* "pyproject.toml"
                 ;; Fix version string
                 (("dynamic = \\[\"version\"\\]")
-                 (string-append "version = \"" #$version "\""))
-                ;; Just run pytest with no frills
-                (("addopts = \"-l.*") "")))))))
+                 (string-append "version = \"" #$version "\""))))))))
     (native-inputs
      (list python-hatchling
            python-hatch-vcs