guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

299/361: gnu: python-pytest: Update to 8.3.3.


From: guix-commits
Subject: 299/361: gnu: python-pytest: Update to 8.3.3.
Date: Fri, 22 Nov 2024 06:01:02 -0500 (EST)

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

commit 1897e80cdeed0921b8a04288e1d7f5f1942f3348
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Sun Nov 10 15:25:59 2024 +0000

    gnu: python-pytest: Update to 8.3.3.
    
    * gnu/packages/check.scm (python-pytest): Update to 8.3.3.
    [build-system]: Swap to pyproject-build-system.
    [arguments]<phases>: Use default 'check phase and remove
    'prepend-version phase.
    <test-flags>: Disable some tests requiring python-pygments adding which
    introduces cycle.
    [propagated-inputs]: Remove python-pluggy; add python-exceptiongroup and
    python-pluggy-next.
    [native-inputs]: Add python-setuptools and python-wheel.
    
    * gnu/packages/check.scm (python-pytest-bootstrap) [native-inputs]: Add
    python-setuptools and python-wheel.
    
    * gnu/packages/patches/pytest-fix-unstrable-exception-test.patch: Remove 
file.
    * gnu/local.mk: Deregister patch.
    
    Change-Id: Ie8825ea1f788bbae40aefa467b6a94b8c4210cbc
---
 gnu/local.mk                                       |  1 -
 gnu/packages/check.scm                             | 71 +++++++++++-----------
 .../pytest-fix-unstrable-exception-test.patch      | 34 -----------
 3 files changed, 34 insertions(+), 72 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index d5531b2e7f..9721e061fd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2007,7 +2007,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/pybugz-encode-error.patch               \
   %D%/packages/patches/pybugz-stty.patch                       \
   %D%/packages/patches/pyqt-configure.patch                    \
-  %D%/packages/patches/pytest-fix-unstrable-exception-test.patch       \
   %D%/packages/patches/python-2-deterministic-build-info.patch \
   %D%/packages/patches/python-2.7-adjust-tests.patch           \
   %D%/packages/patches/python-2.7-expat-compat.patch           \
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 9cb4336a89..6902affa43 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1539,55 +1539,48 @@ standard library.")
 (define-public python-pytest
   (package
     (name "python-pytest")
-    (version "7.1.3")
+    (version "8.3.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest" version))
        (sha256
-        (base32
-         "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))
-       (patches (search-patches "pytest-fix-unstrable-exception-test.patch"))))
-    (build-system python-build-system)
+        (base32 "1081l7yr9z61ghjkrm8qw85ndg2hkb5fc1ibjnkhi0v4pl3q3fbh"))))
+    (build-system pyproject-build-system)
     (arguments
      (list
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'build 'pretend-version
-            ;; The version string is usually derived via setuptools-scm, but
-            ;; without the git metadata available, the version string is set to
-            ;; '0.0.0'.
-            (lambda _
-              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
-                      #$(package-version this-package))))
-          (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
-              (setenv "TERM" "dumb")    ;attempt disabling markup tests
-              (if tests?
-                  (invoke "pytest" "-vv" "-k"
-                          (string-append
-                           ;; This test involves the /usr directory, and fails.
-                           " not test_argcomplete"
-                           ;; These test do not honor the isatty detection and
-                           ;; fail.
-                           " and not test_code_highlight"
-                           " and not test_color_yes"))
-                  (format #t "test suite not run~%")))))))
-    (propagated-inputs
-     (list python-attrs-bootstrap
-           python-iniconfig
-           python-packaging-bootstrap
-           python-pluggy
-           python-py
-           python-tomli))
+      #:test-flags
+      ;; Tests requiring Pygment, introduces cycle.
+      #~(list "-k" (string-append
+                    "not test_code_highlight"
+                    " and not test_code_highlight_continuation"
+                    " and not test_code_highlight_custom_theme"
+                    " and not test_code_highlight_invalid_theme"
+                    " and not test_code_highlight_invalid_theme_mode"
+                    " and not test_code_highlight_simple"
+                    " and not test_color_yes"
+                    " and not test_comparisons_handle_colors"
+                    " and not test_empty_NO_COLOR_and_FORCE_COLOR_ignored"
+                    " and not test_remove_dir_prefix"))))
     (native-inputs
      ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
      (list bash
            python-hypothesis
            python-nose
+           ;; python-pygments ; introduces cycle
            python-pytest-bootstrap
+           python-setuptools
            python-setuptools-scm
-           python-xmlschema))
+           python-xmlschema
+           python-wheel))
+    (propagated-inputs
+     (list python-attrs-bootstrap
+           python-iniconfig
+           python-packaging-bootstrap
+           python-exceptiongroup
+           python-pluggy
+           python-py
+           python-tomli))
     (home-page "https://docs.pytest.org/en/latest/";)
     (synopsis "Python testing library")
     (description
@@ -1650,8 +1643,12 @@ and many external plugins.")
   (package
     (inherit python-pytest)
     (name "python-pytest-bootstrap")
-    (native-inputs (list python-iniconfig python-setuptools-scm
-                         python-tomli))
+    (native-inputs
+     (list python-iniconfig
+           python-setuptools
+           python-setuptools-scm
+           python-tomli
+           python-wheel))
     (arguments `(#:tests? #f))))
 
 (define-public python-pytest-assume
diff --git a/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch 
b/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch
deleted file mode 100644
index 4d77786b77..0000000000
--- a/gnu/packages/patches/pytest-fix-unstrable-exception-test.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b55e264a675f7621b8351e227b93742f19e01c7d Mon Sep 17 00:00:00 2001
-From: Daniel Valenzuela <dsvalenzuela@uc.cl>
-Date: Wed, 9 Nov 2022 19:43:10 -0300
-Subject: [PATCH] Fix test_raising_repr test
-
-Closes #10473
-
-Python <3.11 versions depend on `exceptiongroup>=1.0.0rc8`, and they released 
version `1.0.1`
-6 days ago (2022/11/03) that as a side-effect changed the output of exceptions.
----
- testing/test_assertion.py | 10 +---------
- 1 file changed, 1 insertion(+), 9 deletions(-)
-
-diff --git a/testing/test_assertion.py b/testing/test_assertion.py
-index d8844f2e41..7574592210 100644
---- a/testing/test_assertion.py
-+++ b/testing/test_assertion.py
-@@ -1664,15 +1664,7 @@ def test_raising_repr():
-     """
-     )
-     result = pytester.runpytest()
--    if sys.version_info >= (3, 11):
--        # python 3.11 has native support for un-str-able exceptions
--        result.stdout.fnmatch_lines(
--            ["E       AssertionError: <exception str() failed>"]
--        )
--    else:
--        result.stdout.fnmatch_lines(
--            ["E       AssertionError: <unprintable AssertionError object>"]
--        )
-+    result.stdout.fnmatch_lines(["E       AssertionError: <exception str() 
failed>"])
- 
- 
- def test_issue_1944(pytester: Pytester) -> None:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]