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

commit 265306f09b1593411297e6131082bad706c55ff1
Author: Sharlatan Hellseher <sharlata...@gmail.com>
AuthorDate: Thu Mar 13 22:49:14 2025 +0000

    gnu: python-sanic: Scip more tests, simplify.
    
    * gnu/packages/python-web.scm (python-sanic) [arguments] <test-flags>:
    Ignore all benchmark and typing tests. Skip more failing tests.
    <phases>: Use default 'check.
    [native-inputs]: Remove python-bandit, python-chardet, python-coverage,
    python-cryptography, python-docutils, python-mypy, python-pygments,
    python-pytest-benchmark, python-pytest-sanic, python-slotscheck,
    python-towncrier, python-tox, and python-types-ujson; add
    python-pytest-asyncio.
    
    Change-Id: I8804114656fd76639939ba2fa50fb95d65b823ab
---
 gnu/packages/python-web.scm | 41 ++++++++++++++++-------------------------
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 4cb57d2712..a8d2c9669d 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -8974,9 +8974,15 @@ applications.")
          "115vnir4qijv89139g5h0i4l0n4w3bgh1ickgnk8xidxsa0wla15"))))
     (build-system pyproject-build-system)
     (arguments
-      (list
-       #:test-flags
-       '(list "-k"
+     (list
+      #:test-flags
+      #~(list "--asyncio-mode=auto"
+              "--ignore=tests/benchmark/"
+              "--ignore=tests/typing/test_typing.py"
+              ;; Most tests hang or fail
+              "--ignore=tests/test_cli.py"
+              "--ignore=tests/worker/test_worker_serve.py"
+              "-k"
               (string-append
                ;; PyPi sources lack examples module.
                "not test_gunicorn_"
@@ -8988,6 +8994,8 @@ applications.")
                " and not test_listeners_triggered"
                " and not test_keep_alive_connection_context"
                " and not test_keep_alive_client_timeout"
+               " and not test_conflicting_body_methods_overload"
+               " and not test_unix_connection"
                ;; Unclear why they fail since core-updates merge.
                " and not test_missing_sni"
                " and not test_no_matching_cert"
@@ -8999,14 +9007,9 @@ applications.")
                " and not test_setup_and_teardown_unix"
                " and not test_configure_socket"
                ;; Freezes
-               " and not test_server_run_with_repl"))
-       #:phases
-       #~(modify-phases %standard-phases
-           (replace 'check
-             (lambda* (#:key tests? test-flags #:allow-other-keys)
-               (when tests?
-                 (apply invoke "pytest" "-vv" "./tests"
-                        test-flags)))))))
+               " and not test_server_run_with_repl"
+               " and not test_server_run"
+               " and not test_no_workers"))))
     (propagated-inputs
      (list python-aiofiles
            python-aioquic
@@ -9020,23 +9023,11 @@ applications.")
            python-uvloop
            python-websockets))
     (native-inputs
-     (list python-bandit
-           python-beautifulsoup4
-           python-chardet
-           python-coverage
-           python-cryptography
-           python-docutils
-           python-mypy
-           python-pygments
+     (list python-beautifulsoup4
            python-pytest
-           python-pytest-benchmark
-           python-pytest-sanic
+           python-pytest-asyncio
            python-sanic-testing
            python-setuptools
-           python-slotscheck
-           python-towncrier
-           python-tox
-           python-types-ujson
            python-uvicorn
            python-wheel))
     (home-page "https://github.com/sanic-org/sanic/";)

Reply via email to