mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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
This commit is contained in:
parent
c36cc98365
commit
cf5bd827cf
3 changed files with 34 additions and 72 deletions
|
@ -2026,7 +2026,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/pybugz-encode-error.patch \
|
%D%/packages/patches/pybugz-encode-error.patch \
|
||||||
%D%/packages/patches/pybugz-stty.patch \
|
%D%/packages/patches/pybugz-stty.patch \
|
||||||
%D%/packages/patches/pyqt-configure.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-deterministic-build-info.patch \
|
||||||
%D%/packages/patches/python-2.7-adjust-tests.patch \
|
%D%/packages/patches/python-2.7-adjust-tests.patch \
|
||||||
%D%/packages/patches/python-2.7-expat-compat.patch \
|
%D%/packages/patches/python-2.7-expat-compat.patch \
|
||||||
|
|
|
@ -1539,55 +1539,48 @@ standard library.")
|
||||||
(define-public python-pytest
|
(define-public python-pytest
|
||||||
(package
|
(package
|
||||||
(name "python-pytest")
|
(name "python-pytest")
|
||||||
(version "7.1.3")
|
(version "8.3.3")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "pytest" version))
|
(uri (pypi-uri "pytest" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32 "1081l7yr9z61ghjkrm8qw85ndg2hkb5fc1ibjnkhi0v4pl3q3fbh"))))
|
||||||
"0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))
|
(build-system pyproject-build-system)
|
||||||
(patches (search-patches "pytest-fix-unstrable-exception-test.patch"))))
|
|
||||||
(build-system python-build-system)
|
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:phases
|
#:test-flags
|
||||||
#~(modify-phases %standard-phases
|
;; Tests requiring Pygment, introduces cycle.
|
||||||
(add-before 'build 'pretend-version
|
#~(list "-k" (string-append
|
||||||
;; The version string is usually derived via setuptools-scm, but
|
"not test_code_highlight"
|
||||||
;; without the git metadata available, the version string is set to
|
" and not test_code_highlight_continuation"
|
||||||
;; '0.0.0'.
|
" and not test_code_highlight_custom_theme"
|
||||||
(lambda _
|
" and not test_code_highlight_invalid_theme"
|
||||||
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
|
" and not test_code_highlight_invalid_theme_mode"
|
||||||
#$(package-version this-package))))
|
" and not test_code_highlight_simple"
|
||||||
(replace 'check
|
" and not test_color_yes"
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
" and not test_comparisons_handle_colors"
|
||||||
(setenv "TERM" "dumb") ;attempt disabling markup tests
|
" and not test_empty_NO_COLOR_and_FORCE_COLOR_ignored"
|
||||||
(if tests?
|
" and not test_remove_dir_prefix"))))
|
||||||
(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))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
|
;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
|
||||||
(list bash
|
(list bash
|
||||||
python-hypothesis
|
python-hypothesis
|
||||||
python-nose
|
python-nose
|
||||||
|
;; python-pygments ; introduces cycle
|
||||||
python-pytest-bootstrap
|
python-pytest-bootstrap
|
||||||
|
python-setuptools
|
||||||
python-setuptools-scm
|
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/")
|
(home-page "https://docs.pytest.org/en/latest/")
|
||||||
(synopsis "Python testing library")
|
(synopsis "Python testing library")
|
||||||
(description
|
(description
|
||||||
|
@ -1650,8 +1643,12 @@ and many external plugins.")
|
||||||
(package
|
(package
|
||||||
(inherit python-pytest)
|
(inherit python-pytest)
|
||||||
(name "python-pytest-bootstrap")
|
(name "python-pytest-bootstrap")
|
||||||
(native-inputs (list python-iniconfig python-setuptools-scm
|
(native-inputs
|
||||||
python-tomli))
|
(list python-iniconfig
|
||||||
|
python-setuptools
|
||||||
|
python-setuptools-scm
|
||||||
|
python-tomli
|
||||||
|
python-wheel))
|
||||||
(arguments `(#:tests? #f))))
|
(arguments `(#:tests? #f))))
|
||||||
|
|
||||||
(define-public python-pytest-assume
|
(define-public python-pytest-assume
|
||||||
|
|
|
@ -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:
|
|
Loading…
Add table
Add a link
Reference in a new issue