From f09948fd442c22f0b1873ff40b64827a0bbe8a2c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 6 Dec 2019 18:22:42 +0100 Subject: gnu: libfaketime: Fix failing test. * gnu/packages/check.scm (libfaketime)[arguments]: Set environment variable before building. --- gnu/packages/check.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index f61e96422b..7f548636a7 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2298,6 +2298,12 @@ portable to just about any platform.") (let ((out (assoc-ref outputs "out"))) (setenv "CC" "gcc") (setenv "PREFIX" out) + + ;; XXX: Without this flag, the CLOCK_REALTIME test hangs + ;; indefinitely. See README.packagers for more information. + ;; Try removing this for future versions of libfaketime. + (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX") + #t))) (add-before 'check 'pre-check (lambda _ -- cgit 1.4.1 From 5e1d6787f2b11c28e861de9314f4a76d50b935be Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 21:27:27 +0100 Subject: gnu: python-coverage: Update to 5.0.3. * gnu/packages/check.scm (python-coverage): Update to 5.0.3. --- gnu/packages/check.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 17d5fa6ba8..f6654e4e3b 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1348,14 +1348,14 @@ have failed since the last commit or what tests are currently failing."))) (define-public python-coverage (package (name "python-coverage") - (version "4.5.3") + (version "5.0.3") (source (origin (method url-fetch) (uri (pypi-uri "coverage" version)) (sha256 (base32 - "02f6m073qdispn96rc616hg0rnmw1pgqzw3bgxwiwza4zf9hirlx")))) + "1vrg8panqw79pswg52ygbrff3wdnxarrd9qz6c64ah0c4h2cmbvp")))) (build-system python-build-system) (arguments ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors. -- cgit 1.4.1 From dab41b95fb56631fe61b9d04dba59de88c95fd7c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 21:57:07 +0100 Subject: gnu: python-mock: Update to 3.0.5. * gnu/packages/check.scm (python-mock): Update to 3.0.5. [propagated-inputs]: Remove PYTHON-PBR-MINIMAL. [native-inputs]: Remove. [arguments]: Remove #:phases. Add #:tests?. --- gnu/packages/check.scm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index f6654e4e3b..a8d679cc83 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -642,26 +642,20 @@ doctest.") (define-public python-mock (package (name "python-mock") - (version "2.0.0") + (version "3.0.5") (source (origin (method url-fetch) (uri (pypi-uri "mock" version)) (sha256 (base32 - "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i")))) + "1hrp6j0yrx2xzylfv02qa8kph661m6yq4p0mc8fnimch9j4psrc3")))) (propagated-inputs - `(("python-pbr" ,python-pbr-minimal) - ("python-six" ,python-six))) + `(("python-six" ,python-six))) (build-system python-build-system) - (native-inputs - `(("python-unittest2" ,python-unittest2))) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (zero? (system* "unit2"))))))) + ;; FIXME: Tests require "pytest", which depends on this package. + '(#:tests? #f)) (home-page "https://github.com/testing-cabal/mock") (synopsis "Python mocking and patching library for testing") (description -- cgit 1.4.1 From 3b5378a87fd067dca07b35163e85056044d61cdf Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 22:01:41 +0100 Subject: gnu: python-hypothesis: Update to 5.1.5. * gnu/packages/check.scm (python-hypothesis): Update to 5.1.5. [native-inputs]: Remove. [arguments]: New field. [propagated-inputs]: Remove PYTHON-COVERAGE. Add PYTHON-SORTEDCONTAINERS. (python2-hypothesis): Update to 4.57.1. --- gnu/packages/check.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index a8d679cc83..684721c6f2 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1612,20 +1612,20 @@ instantly.") (define-public python-hypothesis (package (name "python-hypothesis") - (version "4.18.3") + (version "5.1.5") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "0a35nwqyjnm4cphi43xracqpkws0ip61mndvqb1iqq7gkva83lb1")))) + "1ady8cjwpwsicpkhpjd6qwnipjr1lf488sv23psksbxsbgffg7sz")))) (build-system python-build-system) - (native-inputs - `(("python-flake8" ,python-flake8) - ("python-pytest" ,python-pytest-bootstrap))) + (arguments + ;; XXX: Tests are not distributed with the PyPI archive. + '(#:tests? #f)) (propagated-inputs `(("python-attrs" ,python-attrs-bootstrap) - ("python-coverage" ,python-coverage))) + ("python-sortedcontainers" ,python-sortedcontainers))) (synopsis "Library for property based testing") (description "Hypothesis is a library for testing your Python code against a much larger range of examples than you would ever want to write by hand. It’s @@ -1635,10 +1635,18 @@ seamlessly into your existing Python unit testing work flow.") (license license:mpl2.0) (properties `((python2-variant . ,(delay python2-hypothesis)))))) +;; This is the last version of Hypothesis that supports Python 2. (define-public python2-hypothesis (let ((hypothesis (package-with-python2 (strip-python2-variant python-hypothesis)))) (package (inherit hypothesis) + (version "4.57.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "hypothesis" version)) + (sha256 + (base32 + "183gpxbfcdhdqzlahkji5a71n6lmvgqsbkcb0ihqad51n2j6jhrw")))) (propagated-inputs `(("python2-enum34" ,python2-enum34) ,@(package-propagated-inputs hypothesis)))))) -- cgit 1.4.1 From c5d399090e2a3f5a742fcdf4e514f0f8ab6fe491 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 22:03:00 +0100 Subject: gnu: python-pytest: Update to 5.3.2. * gnu/packages/check.scm (python-pytest): Update to 5.3.2. [propagated-inputs]: Add PYTHON-WCWIDTH and PYTHON-PACKAGING-BOOTSTRAP. [native-inputs]: Add PYTHON-XMLSCHEMA. [arguments]: Support overriding check phase with #:tests?. (python2-pytest): Stay on version 4.4.2. (python2-pytest-bootstrap): Inherit from PYTHON2-PYTEST instead of PYTHON-PYTEST-BOOTSTRAP. * gnu/packages/python-xyz.scm (python-packaging-bootstrap): New public variable. --- gnu/packages/check.scm | 96 ++++++++++++++++++++++++++++++++------------- gnu/packages/python-xyz.scm | 11 ++++++ 2 files changed, 79 insertions(+), 28 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 684721c6f2..c28e488a14 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -64,6 +64,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) + #:use-module (gnu packages xml) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -763,35 +764,40 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "4.4.2") + (version "5.3.2") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) (sha256 (base32 - "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2")))) + "1yi51ckkiywszz0qp67jisxzcp54acf57wqr3ysgk457nlai4mvb")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (invoke "pytest" "-vv" "-k" - (string-append - ;; These tests involve the /usr directory, and fails. - "not test_remove_dir_prefix" - " and not test_argcomplete" - ;; This test tries to override PYTHONPATH, and - ;; subsequently fails to locate the test libraries. - " and not test_collection"))))))) + (lambda* (#:key (tests? #t) #:allow-other-keys) + (if tests? + (invoke "pytest" "-vv" "-k" + (string-append + ;; These tests involve the /usr directory, and fails. + "not test_remove_dir_prefix" + " and not test_argcomplete" + ;; This test tries to override PYTHONPATH, and + ;; subsequently fails to locate the test libraries. + " and not test_collection")) + (format #t "test suite not run~%")) + #t))))) (propagated-inputs `(("python-atomicwrites" ,python-atomicwrites) ("python-attrs" ,python-attrs-bootstrap) ("python-more-itertools" ,python-more-itertools) + ("python-packaging" ,python-packaging-bootstrap) ("python-pluggy" ,python-pluggy) ("python-py" ,python-py) - ("python-six" ,python-six-bootstrap))) + ("python-six" ,python-six-bootstrap) + ("python-wcwidth" ,python-wcwidth))) (native-inputs `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`. ("bash" ,bash) @@ -799,7 +805,8 @@ standard library.") ("python-nose" ,python-nose) ("python-mock" ,python-mock) ("python-pytest" ,python-pytest-bootstrap) - ("python-setuptools-scm" ,python-setuptools-scm))) + ("python-setuptools-scm" ,python-setuptools-scm) + ("python-xmlschema" ,python-xmlschema))) (home-page "https://docs.pytest.org/en/latest/") (synopsis "Python testing library") (description @@ -809,15 +816,38 @@ and many external plugins.") (license license:expat) (properties `((python2-variant . ,(delay python2-pytest)))))) +;; Pytest 4.x are the last versions that support Python 2. (define-public python2-pytest - (let ((pytest (package-with-python2 - (strip-python2-variant python-pytest)))) - (package - (inherit pytest) - (propagated-inputs - `(("python2-funcsigs" ,python2-funcsigs) - ("python2-pathlib2" ,python2-pathlib2) - ,@(package-propagated-inputs pytest)))))) + (package + (inherit (strip-python2-variant python-pytest)) + (name "python2-pytest") + (version "4.4.2") + (source (origin + (method url-fetch) + (uri (pypi-uri "pytest" version)) + (sha256 + (base32 + "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + ,@(package-arguments python-pytest))) + (propagated-inputs + `(("python-atomicwrites" ,python2-atomicwrites) + ("python-attrs" ,python2-attrs-bootstrap) + ("python-funcsigs" ,python2-funcsigs) + ("python-more-itertools" ,python2-more-itertools) + ("python-pathlib2" ,python2-pathlib2) + ("python-pluggy" ,python2-pluggy) + ("python-py" ,python2-py) + ("python-six" ,python2-six-bootstrap))) + (native-inputs + `(("bash" ,bash) ;tests require 'compgen' + ("python-hypothesis" ,python2-hypothesis) + ("python-nose" ,python2-nose) + ("python-mock" ,python2-mock) + ("python-pytest" ,python2-pytest-bootstrap) + ("python-setuptools-scm" ,python2-setuptools-scm))))) (define-public python-pytest-bootstrap (package @@ -828,13 +858,23 @@ and many external plugins.") (properties `((python2-variant . ,(delay python2-pytest-bootstrap)))))) (define-public python2-pytest-bootstrap - (let ((pytest (package-with-python2 - (strip-python2-variant python-pytest-bootstrap)))) - (package (inherit pytest) - (propagated-inputs - `(("python2-funcsigs" ,python2-funcsigs-bootstrap) - ("python2-pathlib2" ,python2-pathlib2-bootstrap) - ,@(package-propagated-inputs pytest)))))) + (hidden-package + (package/inherit + python2-pytest + (name "python2-pytest-bootstrap") + (arguments + (substitute-keyword-arguments (package-arguments python2-pytest) + ((#:tests? _ #f) #f))) + (native-inputs + `(("python-setuptools-scm" ,python2-setuptools-scm))) + (propagated-inputs + `(("python-atomicwrites" ,python2-atomicwrites) + ("python-attrs" ,python2-attrs-bootstrap) + ("python-funcsigs" ,python2-funcsigs-bootstrap) + ("python-more-itertools" ,python2-more-itertools) + ("python-pathlib2" ,python2-pathlib2-bootstrap) + ("python-pluggy" ,python2-pluggy) + ("python-py" ,python2-py)))))) (define-public python-pytest-cov (package diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 9f37da99d5..618049e4bd 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13121,6 +13121,17 @@ information.") ;; licenses. (license (list license:asl2.0 license:bsd-2)))) +;; A variant with minimal dependencies, for bootstrapping Pytest. +(define-public python-packaging-bootstrap + (hidden-package + (package/inherit + python-packaging + (name "python-packaging-bootstrap") + (native-inputs '()) + (propagated-inputs + `(("python-pyparsing" ,python-pyparsing))) + (arguments '(#:tests? #f))))) + (define-public python2-packaging (package-with-python2 python-packaging)) -- cgit 1.4.1 From 0ae97f5dd1c6cc2ad8e9f27f62e5a72e0d5fbb4c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 16 Jan 2020 00:45:53 +0100 Subject: gnu: python2-pytest: Update to 4.6.9. * gnu/packages/check.scm (python2-pytest): Update to 4.6.9. (python2-pytest-bootstrap)[propagated-inputs]: Add PYTHON2-IMPORTLIB-METADATA-BOOTSTRAP, PYTHON2-PACKAGING-BOOTSTRAP, and PYTHON2-WCWIDTH. Replace PYTHON2-PLUGGY with PYTHON2-PLUGGY-BOOTSTRAP. * gnu/packages/python-compression.scm (python2-zipp-bootstrap): New public variable. * gnu/packages/python-xyz.scm (python2-importlib-resources-bootstrap): New public variable. (python-importlib-metadata)[native-inputs]: Change from PYTHON-PACKAGING to PYTHON-PACKAGING-BOOTSTRAP. [properties]: New field. (python2-importlib-metadata-bootstrap, python2-contextlib2-bootstrap, python2-pluggy-bootstrap): New public variables. (python-packaging)[arguments]: Allow overriding #:tests?. (python2-packaging-bootstrap): New public variable. --- gnu/packages/check.scm | 16 +++++--- gnu/packages/python-compression.scm | 12 ++++++ gnu/packages/python-xyz.scm | 78 ++++++++++++++++++++++++++++++++++--- 3 files changed, 96 insertions(+), 10 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index c28e488a14..941b4547b6 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -821,13 +821,13 @@ and many external plugins.") (package (inherit (strip-python2-variant python-pytest)) (name "python2-pytest") - (version "4.4.2") + (version "4.6.9") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) (sha256 (base32 - "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2")))) + "0fgkmpc31nzy97fxfrkqbzycigdwxwwmninx3qhkzp81migggs0r")))) (build-system python-build-system) (arguments `(#:python ,python-2 @@ -836,11 +836,14 @@ and many external plugins.") `(("python-atomicwrites" ,python2-atomicwrites) ("python-attrs" ,python2-attrs-bootstrap) ("python-funcsigs" ,python2-funcsigs) + ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap) ("python-more-itertools" ,python2-more-itertools) + ("python-packaging" ,python2-packaging-bootstrap) ("python-pathlib2" ,python2-pathlib2) ("python-pluggy" ,python2-pluggy) ("python-py" ,python2-py) - ("python-six" ,python2-six-bootstrap))) + ("python-six" ,python2-six-bootstrap) + ("python-wcwidth" ,python2-wcwidth))) (native-inputs `(("bash" ,bash) ;tests require 'compgen' ("python-hypothesis" ,python2-hypothesis) @@ -871,10 +874,13 @@ and many external plugins.") `(("python-atomicwrites" ,python2-atomicwrites) ("python-attrs" ,python2-attrs-bootstrap) ("python-funcsigs" ,python2-funcsigs-bootstrap) + ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap) ("python-more-itertools" ,python2-more-itertools) + ("python-packaging" ,python2-packaging-bootstrap) ("python-pathlib2" ,python2-pathlib2-bootstrap) - ("python-pluggy" ,python2-pluggy) - ("python-py" ,python2-py)))))) + ("python-pluggy" ,python2-pluggy-bootstrap) + ("python-py" ,python2-py) + ("python-wcwidth" ,python2-wcwidth)))))) (define-public python-pytest-cov (package diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm index 70abc7bad1..7924479185 100644 --- a/gnu/packages/python-compression.scm +++ b/gnu/packages/python-compression.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018, 2019 Efraim Flashner ;;; Copyright © 2020 Nicolas Goaziou +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -243,6 +244,17 @@ wrapper. It provides a backport of the @code{Path} object.") ("python-unittest2" ,python2-unittest2) ,@(package-native-inputs base)))))) +;; This package is used to bootstrap pytest, via importlib-metadata. +(define-public python2-zipp-bootstrap + (hidden-package + (package/inherit + python2-zipp + (arguments + `(#:tests? #f + ,@(package-arguments python2-zipp))) + (native-inputs + `(("python-setuptools-scm" ,python2-setuptools-scm)))))) + (define-public python-zstandard (package (name "python-zstandard") diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ea67be17ef..12faca73eb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5004,6 +5004,16 @@ older Python versions.") for older versions of Python.") (license license:asl2.0))) +;; For importlib-metadata-bootstrap below. +(define-public python2-importlib-resources-bootstrap + (hidden-package + (package/inherit + python2-importlib-resources + (name "python2-importlib-resources-bootstrap") + (propagated-inputs + `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap) + ("python-typing" ,python2-typing)))))) + (define-public python-importlib-metadata (package (name "python-importlib-metadata") @@ -5019,7 +5029,7 @@ for older versions of Python.") `(("python-zipp" ,python-zipp))) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm) - ("python-packaging" ,python-packaging))) + ("python-packaging" ,python-packaging-bootstrap))) (home-page "https://importlib-metadata.readthedocs.io/") (synopsis "Read metadata from Python packages") (description @@ -5045,6 +5055,22 @@ need to use the older and less efficient @code{pkg_resources} package.") ("python-pathlib2" ,python2-pathlib2) ,@(package-propagated-inputs base)))))) +;; This package is used by python2-pytest, and thus must not depend on it. +(define-public python2-importlib-metadata-bootstrap + (hidden-package + (package/inherit + python2-importlib-metadata + (name "python2-importlib-metadata-bootstrap") + (arguments + `(#:tests? #f + ,@(package-arguments python2-importlib-metadata))) + (propagated-inputs + `(("python-zipp" ,python2-zipp-bootstrap) + ("python-pathlib2" ,python2-pathlib2-bootstrap) + ("python-configparser" ,python2-configparser) + ("python-contextlib2" ,python2-contextlib2-bootstrap) + ("python-importlib-resources" ,python2-importlib-resources-bootstrap)))))) + (define-public python-jaraco-packaging (package (name "python-jaraco-packaging") @@ -8288,6 +8314,18 @@ the standard library.") (native-inputs `(("python2-unittest2" ,python2-unittest2)))))) +;; This package is used by python2-pytest via python2-importlib-metadata, +;; and thus can not depend on python-unittest2 (which depends on pytest). +(define-public python2-contextlib2-bootstrap + (hidden-package + (package/inherit + python2-contextlib2 + (name "python2-contextlib2-bootstrap") + (arguments + `(#:tests? #f + ,@(package-arguments python2-contextlib2))) + (native-inputs '())))) + (define-public python-texttable (package (name "python-texttable") @@ -8786,6 +8824,20 @@ Pytest but stripped of Pytest specific details.") (propagated-inputs `(("python-importlib-metadata" ,python2-importlib-metadata)))))) +;; This package requires python2-importlib-metadata, but that package +;; ends up needing python2-pluggy via python2-pytest, so we need this +;; variant to solve the circular dependency. +(define-public python2-pluggy-bootstrap + (hidden-package + (package/inherit + python2-pluggy + (name "python2-pluggy-bootstrap") + (arguments + `(#:tests? #f + ,@(package-arguments python2-pluggy))) + (propagated-inputs + `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)))))) + (define-public python-tox (package (name "python-tox") @@ -13107,7 +13159,11 @@ several utilities, as well as an API for building localization tools.") (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ (invoke "py.test" "-vv")))))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "py.test" "-vv") + (format #t "test suite not run~%")) + #t))))) (native-inputs `(("python-pretend" ,python-pretend) ("python-pytest" ,python-pytest))) @@ -13125,7 +13181,10 @@ information.") ;; licenses. (license (list license:asl2.0 license:bsd-2)))) -;; A variant with minimal dependencies, for bootstrapping Pytest. +(define-public python2-packaging + (package-with-python2 python-packaging)) + +;; Variants with minimal dependencies, for bootstrapping Pytest. (define-public python-packaging-bootstrap (hidden-package (package/inherit @@ -13136,8 +13195,17 @@ information.") `(("python-pyparsing" ,python-pyparsing))) (arguments '(#:tests? #f))))) -(define-public python2-packaging - (package-with-python2 python-packaging)) +(define-public python2-packaging-bootstrap + (hidden-package + (package/inherit + python2-packaging + (name "python2-packaging-bootstrap") + (native-inputs '()) + (propagated-inputs + `(("python-pyparsing" ,python2-pyparsing))) + (arguments + `(#:tests? #f + ,@(package-arguments python2-packaging)))))) (define-public python-relatorio (package -- cgit 1.4.1 From cc63d8cfd859a2ddc6018d8eac056203dc255c48 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 16 Jan 2020 09:29:10 +0100 Subject: gnu: python-pytest-cov: Update to 2.8.1. * gnu/packages/check.scm (python-pytest-cov): Update to 2.8.1. --- gnu/packages/check.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 941b4547b6..12c56d4a3e 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -885,13 +885,13 @@ and many external plugins.") (define-public python-pytest-cov (package (name "python-pytest-cov") - (version "2.6.1") + (version "2.8.1") (source (origin (method url-fetch) (uri (pypi-uri "pytest-cov" version)) (sha256 - (base32 "0cyxbbghx2l4p60w10k00j1j74q1ngfiffr0pxn73ababjr69dha")))) + (base32 "0avzlk9p4nc44k7lpx9109dybq71xqnggxb9f4hp0l64pbc44ryc")))) (build-system python-build-system) (arguments `(#:phases -- cgit 1.4.1 From 96af5dcf917853e40c6b17a2969fb44c161e096c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 17 Jan 2020 08:01:41 +0100 Subject: gnu: python-freezegun: Update to 0.3.13. * gnu/packages/check.scm (python-freezegun): Update to 0.3.13. --- gnu/packages/check.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 12c56d4a3e..5da3fdb5fd 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2219,13 +2219,13 @@ create data based on random numbers and yet remain repeatable.") (define-public python-freezegun (package (name "python-freezegun") - (version "0.3.12") + (version "0.3.13") (source (origin (method url-fetch) (uri (pypi-uri "freezegun" version)) (sha256 - (base32 "1rx57v8ryjncjimg8hys9kx1r3rknvwcl4y340g20jn0sf69qk9a")))) + (base32 "07lrb8ghng1y1jr278clvgi17dq1470gbr2lvbvwys6jkdg9c9b1")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) -- cgit 1.4.1 From e0a5693533f343423527f6fc79d398e4e4c6d730 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Jan 2020 00:03:47 +0100 Subject: gnu: python-hypothesis: Update to 5.3.0. * gnu/packages/check.scm (python-hypothesis): Update to 5.3.0. --- gnu/packages/check.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 5da3fdb5fd..8025ea1979 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1658,13 +1658,13 @@ instantly.") (define-public python-hypothesis (package (name "python-hypothesis") - (version "5.1.5") + (version "5.3.0") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "1ady8cjwpwsicpkhpjd6qwnipjr1lf488sv23psksbxsbgffg7sz")))) + "0aclww914la1s41jkjla10pm0qh88dpdv9x1riyqw7xzwczvbzf9")))) (build-system python-build-system) (arguments ;; XXX: Tests are not distributed with the PyPI archive. -- cgit 1.4.1 From 0eb2ce12c03d8608b8cace51132ef72c16d36ef2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Jan 2020 00:07:28 +0100 Subject: gnu: python-freezegun: Update to 0.3.14. * gnu/packages/check.scm (python-freezegun): Update to 0.3.14. --- gnu/packages/check.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 8025ea1979..b58349fb2e 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2219,13 +2219,13 @@ create data based on random numbers and yet remain repeatable.") (define-public python-freezegun (package (name "python-freezegun") - (version "0.3.13") + (version "0.3.14") (source (origin (method url-fetch) (uri (pypi-uri "freezegun" version)) (sha256 - (base32 "07lrb8ghng1y1jr278clvgi17dq1470gbr2lvbvwys6jkdg9c9b1")))) + (base32 "0al75mk829j1izxi760b7yjnknjihyfhp2mvi5qiyrxb9cpxwqk2")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) -- cgit 1.4.1 From 861a265959ca931bab38fe6c1266de8849016820 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Jan 2020 00:13:10 +0100 Subject: gnu: python-pytest-runner: Update to 5.2. * gnu/packages/check.scm (python-pytest-runner): Update to 5.2. [arguments]: New field. [native-inputs]: Remove PYTHON-PYTEST-BOOTSTRAP. --- gnu/packages/check.scm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index b58349fb2e..19147e1afd 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -920,18 +920,28 @@ supports coverage of subprocesses.") (define-public python-pytest-runner (package (name "python-pytest-runner") - (version "4.4") + (version "5.2") (source (origin (method url-fetch) (uri (pypi-uri "pytest-runner" version)) (sha256 (base32 - "1x0d9n40lsiphblbs61rdc0d5r31f6vh0vcahqdv0mffakbnrb80")))) + "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn")))) (build-system python-build-system) + (arguments + '(;; FIXME: The test suite requires 'python-flake8' and 'python-black', + ;; but that introduces a circular dependency. + #:tests? #f + #:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "pytest" "-vv") + (format #t "test suite not run~%")) + #t))))) (native-inputs - `(("python-pytest" ,python-pytest-bootstrap) - ("python-setuptools-scm" ,python-setuptools-scm))) + `(("python-setuptools-scm" ,python-setuptools-scm))) (home-page "https://github.com/pytest-dev/pytest-runner") (synopsis "Invoke py.test as a distutils command") (description -- cgit 1.4.1 From b8f4d3f4c504ac2a28d5e62552d1c46821f04060 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 1 Feb 2020 11:38:47 +0100 Subject: gnu: python-pytest: Update to 5.3.5. * gnu/packages/check.scm (python-pytest): Update to 5.3.5. --- gnu/packages/check.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 19147e1afd..4c8275cd67 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -764,14 +764,14 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "5.3.2") + (version "5.3.5") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) (sha256 (base32 - "1yi51ckkiywszz0qp67jisxzcp54acf57wqr3ysgk457nlai4mvb")))) + "139i9cjhrv5aici3skq8iihvfb3lq0d8xb5j7qycr2hlk8cfjpqd")))) (build-system python-build-system) (arguments `(#:phases -- cgit 1.4.1 From 916f1d552dd8ebfe73eabf699b32f1c4aa41f220 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 1 Feb 2020 11:39:05 +0100 Subject: gnu: python-hypothesis: Update to 5.4.1. * gnu/packages/check.scm (python-hypothesis): Update to 5.4.1. --- gnu/packages/check.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 4c8275cd67..32ef32abda 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1668,13 +1668,13 @@ instantly.") (define-public python-hypothesis (package (name "python-hypothesis") - (version "5.3.0") + (version "5.4.1") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "0aclww914la1s41jkjla10pm0qh88dpdv9x1riyqw7xzwczvbzf9")))) + "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p")))) (build-system python-build-system) (arguments ;; XXX: Tests are not distributed with the PyPI archive. -- cgit 1.4.1 From fb62edfc35fd6896bd30c06038718b630c1b92bd Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 3 Feb 2020 16:04:29 +0100 Subject: gnu: python-importlib-metadata: Update to 1.5.0. * gnu/packages/python-xyz.scm (python-importlib-metadata): Update to 1.5.0. [native-inputs]: Add PYTHON-PYFAKEFS. (python2-importlib-metadata)[native-inputs]: Add PYTHON2-PYFAKEFS-BOOTSTRAP. * gnu/packages/check.scm (python2-pyfakefs-bootstrap): New public variable. --- gnu/packages/check.scm | 13 +++++++++++++ gnu/packages/python-xyz.scm | 11 +++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 3c2bdaff3a..749bcc7831 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2547,3 +2547,16 @@ system. The code under test requires no modification to work with pyfakefs.") (define-public python2-pyfakefs (package-with-python2 python-pyfakefs)) + +;; This minimal variant is used to avoid a circular dependency between +;; python2-importlib-metadata, which requires pyfakefs for its tests, and +;; python2-pytest, which requires python2-importlib-metadata. +(define-public python2-pyfakefs-bootstrap + (hidden-package + (package + (inherit python2-pyfakefs) + (name "python2-pyfakefs-bootstrap") + (native-inputs '()) + (arguments + `(#:python ,python-2 + #:tests? #f))))) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b884b4eee1..2024d07d46 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5019,18 +5019,20 @@ for older versions of Python.") (define-public python-importlib-metadata (package (name "python-importlib-metadata") - (version "1.4.0") + (version "1.5.0") (source (origin (method url-fetch) (uri (pypi-uri "importlib_metadata" version)) (sha256 - (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i")))) + (base32 + "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86")))) (build-system python-build-system) (propagated-inputs `(("python-zipp" ,python-zipp))) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm) + ("python-pyfakefs" ,python-pyfakefs) ("python-packaging" ,python-packaging))) (home-page "https://importlib-metadata.readthedocs.io/") (synopsis "Read metadata from Python packages") @@ -5051,8 +5053,9 @@ need to use the older and less efficient @code{pkg_resources} package.") base (name "python2-importlib-metadata") (native-inputs - `(("python-packaging" ,python2-packaging-bootstrap) - ,@(alist-delete "python-packaging" (package-native-inputs base)))) + `(("python-setuptools-scm" ,python2-setuptools-scm) + ("python-pyfakefs" ,python2-pyfakefs-bootstrap) + ("python-packaging" ,python2-packaging-bootstrap))) (propagated-inputs `(("python-configparser" ,python2-configparser) ("python-contextlib2" ,python2-contextlib2) -- cgit 1.4.1 From fedce7b2b474251a7b7e0e4fb7cc80d89a2939bd Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 3 Feb 2020 09:24:34 +0100 Subject: gnu: libfaketime: Fix build with glibc 2.31. * gnu/packages/check.scm (libfaketime)[arguments]: Disable "deprecated-declarations" warnings before running the test suite. --- gnu/packages/check.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 6c809c7d7c..e819ca72cd 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2437,6 +2437,10 @@ portable to just about any platform.") (lambda _ (substitute* "test/functests/test_exclude_mono.sh" (("/bin/bash") (which "bash"))) + + ;; Do not fail due to use of 'ftime', which was deprecated in + ;; glibc 2.31. Remove this for later versions of libfaketime. + (setenv "FAKETIME_COMPILE_CFLAGS" "-Wno-deprecated-declarations") #t))) #:test-target "test")) (native-inputs -- cgit 1.4.1 From a8cb1e72ef351330d1521833c1b270dcc0da593f Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 2 May 2020 12:30:53 +0100 Subject: gnu: behave: Fix build with Python 3.8. Add a patch based on an upstream commit [1]. 1: c000c88eb5239b87f299c85e83b349b0ef387ae7 * gnu/packages/patches/behave-skip-a-couple-of-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/check.scm (behave)[source]: Use the patch. --- gnu/local.mk | 1 + gnu/packages/check.scm | 4 +- .../patches/behave-skip-a-couple-of-tests.patch | 462 +++++++++++++++++++++ 3 files changed, 466 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/behave-skip-a-couple-of-tests.patch (limited to 'gnu/packages/check.scm') diff --git a/gnu/local.mk b/gnu/local.mk index acfc5cec4d..f48c6803ee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -774,6 +774,7 @@ dist_patch_DATA = \ %D%/packages/patches/bc-fix-cross-compilation.patch \ %D%/packages/patches/beancount-disable-googleapis-fonts.patch \ %D%/packages/patches/beets-werkzeug-compat.patch \ + %D%/packages/patches/behave-skip-a-couple-of-tests.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/benchmark-unbundle-googletest.patch \ %D%/packages/patches/biber-fix-encoding-write.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 05a796a3e3..2629e88323 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2107,7 +2107,9 @@ backported from Python 2.7 for Python 2.4+.") (uri (pypi-uri "behave" version)) (sha256 (base32 - "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr")))) + "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr")) + (patches (search-patches + "behave-skip-a-couple-of-tests.patch")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) diff --git a/gnu/packages/patches/behave-skip-a-couple-of-tests.patch b/gnu/packages/patches/behave-skip-a-couple-of-tests.patch new file mode 100644 index 0000000000..e3d4e15241 --- /dev/null +++ b/gnu/packages/patches/behave-skip-a-couple-of-tests.patch @@ -0,0 +1,462 @@ +Fix build with Python 3.8, this is a patch based on upstream commit [1]. + +1: c000c88eb5239b87f299c85e83b349b0ef387ae7 + + +diff --git a/behave.ini b/behave.ini +index 45c0f0d7..952240d6 100644 +--- a/behave.ini ++++ b/behave.ini +@@ -15,8 +15,9 @@ show_skipped = false + format = rerun + progress3 + outfiles = rerun.txt +- reports/report_progress3.txt ++ build/behave.reports/report_progress3.txt + junit = true ++junit_directory = build/behave.reports + logging_level = INFO + # logging_format = LOG.%(levelname)-8s %(name)-10s: %(message)s + # logging_format = LOG.%(levelname)-8s %(asctime)s %(name)-10s: %(message)s +diff --git a/features/environment.py b/features/environment.py +index 4744e89a..3769ee40 100644 +--- a/features/environment.py ++++ b/features/environment.py +@@ -1,5 +1,7 @@ + # -*- coding: UTF-8 -*- ++# FILE: features/environemnt.py + ++from __future__ import absolute_import, print_function + from behave.tag_matcher import ActiveTagMatcher, setup_active_tag_values + from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave + import platform +@@ -20,6 +22,15 @@ + } + active_tag_matcher = ActiveTagMatcher(active_tag_value_provider) + ++ ++def print_active_tags_summary(): ++ active_tag_data = active_tag_value_provider ++ print("ACTIVE-TAG SUMMARY:") ++ print("use.with_python.version=%s" % active_tag_data.get("python.version")) ++ # print("use.with_os=%s" % active_tag_data.get("os")) ++ print() ++ ++ + # ----------------------------------------------------------------------------- + # HOOKS: + # ----------------------------------------------------------------------------- +@@ -30,11 +41,14 @@ def before_all(context): + setup_python_path() + setup_context_with_global_params_test(context) + setup_command_shell_processors4behave() ++ print_active_tags_summary() ++ + + def before_feature(context, feature): + if active_tag_matcher.should_exclude_with(feature.tags): + feature.skip(reason=active_tag_matcher.exclude_reason) + ++ + def before_scenario(context, scenario): + if active_tag_matcher.should_exclude_with(scenario.effective_tags): + scenario.skip(reason=active_tag_matcher.exclude_reason) +diff --git a/features/step.duplicated_step.feature b/features/step.duplicated_step.feature +index 59888b0f..396cca27 100644 +--- a/features/step.duplicated_step.feature ++++ b/features/step.duplicated_step.feature +@@ -32,11 +32,11 @@ Feature: Duplicated Step Definitions + AmbiguousStep: @given('I call Alice') has already been defined in + existing step @given('I call Alice') at features/steps/alice_steps.py:3 + """ +- And the command output should contain: +- """ +- File "features/steps/alice_steps.py", line 7, in +- @given(u'I call Alice') +- """ ++ # -- DISABLED: Python 3.8 traceback line numbers differ w/ decorators (+1). ++ # And the command output should contain: ++ # """ ++ # File "features/steps/alice_steps.py", line 7, in ++ # """ + + + Scenario: Duplicated Step Definition in another File +@@ -70,11 +70,11 @@ Feature: Duplicated Step Definitions + AmbiguousStep: @given('I call Bob') has already been defined in + existing step @given('I call Bob') at features/steps/bob1_steps.py:3 + """ +- And the command output should contain: +- """ +- File "features/steps/bob2_steps.py", line 3, in +- @given('I call Bob') +- """ ++ # -- DISABLED: Python 3.8 traceback line numbers differ w/ decorators (+1). ++ # And the command output should contain: ++ # """ ++ # File "features/steps/bob2_steps.py", line 3, in ++ # """ + + @xfail + Scenario: Duplicated Same Step Definition via import from another File +diff --git a/issue.features/environment.py b/issue.features/environment.py +index 2dfec751..7e48ee03 100644 +--- a/issue.features/environment.py ++++ b/issue.features/environment.py +@@ -1,5 +1,5 @@ + # -*- coding: UTF-8 -*- +-# FILE: features/environment.py ++# FILE: issue.features/environemnt.py + # pylint: disable=unused-argument + """ + Functionality: +@@ -7,17 +7,20 @@ + * active tags + """ + +-from __future__ import print_function ++ ++from __future__ import absolute_import, print_function + import sys + import platform + import os.path + import six + from behave.tag_matcher import ActiveTagMatcher + from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave +-# PREPARED: +-# from behave.tag_matcher import setup_active_tag_values ++# PREPARED: from behave.tag_matcher import setup_active_tag_values + + ++# --------------------------------------------------------------------------- ++# TEST SUPPORT: For Active Tags ++# --------------------------------------------------------------------------- + def require_tool(tool_name): + """Check if a tool (an executable program) is provided on this platform. + +@@ -45,12 +48,14 @@ def require_tool(tool_name): + # print("TOOL-NOT-FOUND: %s" % tool_name) + return False + ++ + def as_bool_string(value): + if bool(value): + return "yes" + else: + return "no" + ++ + def discover_ci_server(): + # pylint: disable=invalid-name + ci_server = "none" +@@ -67,11 +72,17 @@ def discover_ci_server(): + return ci_server + + ++# --------------------------------------------------------------------------- ++# BEHAVE SUPPORT: Active Tags ++# --------------------------------------------------------------------------- + # -- MATCHES ANY TAGS: @use.with_{category}={value} + # NOTE: active_tag_value_provider provides category values for active tags. ++python_version = "%s.%s" % sys.version_info[:2] + active_tag_value_provider = { ++ "platform": sys.platform, + "python2": str(six.PY2).lower(), + "python3": str(six.PY3).lower(), ++ "python.version": python_version, + # -- python.implementation: cpython, pypy, jython, ironpython + "python.implementation": platform.python_implementation().lower(), + "pypy": str("__pypy__" in sys.modules).lower(), +@@ -82,17 +92,33 @@ def discover_ci_server(): + } + active_tag_matcher = ActiveTagMatcher(active_tag_value_provider) + ++ ++def print_active_tags_summary(): ++ active_tag_data = active_tag_value_provider ++ print("ACTIVE-TAG SUMMARY:") ++ print("use.with_python.version=%s" % active_tag_data.get("python.version")) ++ # print("use.with_platform=%s" % active_tag_data.get("platform")) ++ # print("use.with_os=%s" % active_tag_data.get("os")) ++ print() ++ ++ ++# --------------------------------------------------------------------------- ++# BEHAVE HOOKS: ++# --------------------------------------------------------------------------- + def before_all(context): + # -- SETUP ACTIVE-TAG MATCHER (with userdata): + # USE: behave -D browser=safari ... +- # NOT-NEEDED: setup_active_tag_values(active_tag_value_provider, +- # context.config.userdata) ++ # NOT-NEEDED: ++ # setup_active_tag_values(active_tag_value_provider, context.config.userdata) + setup_command_shell_processors4behave() ++ print_active_tags_summary() ++ + + def before_feature(context, feature): + if active_tag_matcher.should_exclude_with(feature.tags): + feature.skip(reason=active_tag_matcher.exclude_reason) + ++ + def before_scenario(context, scenario): + if active_tag_matcher.should_exclude_with(scenario.effective_tags): + scenario.skip(reason=active_tag_matcher.exclude_reason) +diff --git a/issue.features/issue0330.feature b/issue.features/issue0330.feature +index dc1ebe75..81cb6e29 100644 +--- a/issue.features/issue0330.feature ++++ b/issue.features/issue0330.feature +@@ -70,6 +70,7 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s + And note that "bob.feature is skipped" + + ++ @not.with_python.version=3.8 + Scenario: Junit report for skipped feature is created with --show-skipped + When I run "behave --junit -t @tag1 --show-skipped @alice_and_bob.featureset" + Then it should pass with: +@@ -83,6 +84,23 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s + + """ + ++ @use.with_python.version=3.8 ++ Scenario: Junit report for skipped feature is created with --show-skipped ++ When I run "behave --junit -t @tag1 --show-skipped @alice_and_bob.featureset" ++ Then it should pass with: ++ """ ++ 1 feature passed, 0 failed, 1 skipped ++ """ ++ And a file named "test_results/TESTS-alice.xml" exists ++ And a file named "test_results/TESTS-bob.xml" exists ++ And the file "test_results/TESTS-bob.xml" should contain: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # ++ ++ @not.with_python.version=3.8 + Scenario: Junit report for skipped scenario is neither shown nor counted with --no-skipped + When I run "behave --junit -t @tag1 --no-skipped" + Then it should pass with: +@@ -102,7 +120,30 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s + """ + And note that "Charly2 is the skipped scenarion in charly.feature" + ++ @use.with_python.version=3.8 ++ Scenario: Junit report for skipped scenario is neither shown nor counted with --no-skipped ++ When I run "behave --junit -t @tag1 --no-skipped" ++ Then it should pass with: ++ """ ++ 2 features passed, 0 failed, 1 skipped ++ 2 scenarios passed, 0 failed, 2 skipped ++ """ ++ And a file named "test_results/TESTS-alice.xml" exists ++ And a file named "test_results/TESTS-charly.xml" exists ++ And the file "test_results/TESTS-charly.xml" should contain: ++ """ ++ " + + ++ @use.with_python.version=3.8 ++ Scenario: Hook error in before_scenario() ++ When I run "behave -f plain --junit features/before_scenario_failure.feature" ++ Then it should fail with: ++ """ ++ 0 scenarios passed, 1 failed, 0 skipped ++ """ ++ And the command output should contain: ++ """ ++ HOOK-ERROR in before_scenario: RuntimeError: OOPS ++ """ ++ And the file "reports/TESTS-before_scenario_failure.xml" should contain: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # ++ And the file "reports/TESTS-before_scenario_failure.xml" should contain: ++ """ ++ File "features/environment.py", line 6, in before_scenario ++ cause_hook_failure() ++ File "features/environment.py", line 2, in cause_hook_failure ++ raise RuntimeError("OOPS") ++ """ ++ And note that "the traceback is contained in the XML element " ++ ++ ++ @not.with_python.version=3.8 + Scenario: Hook error in after_scenario() + When I run "behave -f plain --junit features/after_scenario_failure.feature" + Then it should fail with: +@@ -114,3 +149,38 @@ Feature: Issue #446 -- Support scenario hook-errors with JUnitReporter + raise RuntimeError("OOPS") + """ + And note that "the traceback is contained in the XML element " ++ ++ ++ @use.with_python.version=3.8 ++ Scenario: Hook error in after_scenario() ++ When I run "behave -f plain --junit features/after_scenario_failure.feature" ++ Then it should fail with: ++ """ ++ 0 scenarios passed, 1 failed, 0 skipped ++ """ ++ And the command output should contain: ++ """ ++ Scenario: B1 ++ Given another step passes ... passed ++ HOOK-ERROR in after_scenario: RuntimeError: OOPS ++ """ ++ And the file "reports/TESTS-after_scenario_failure.xml" should contain: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # ++ And the file "reports/TESTS-after_scenario_failure.xml" should contain: ++ """ ++ File "features/environment.py", line 10, in after_scenario ++ cause_hook_failure() ++ File "features/environment.py", line 2, in cause_hook_failure ++ raise RuntimeError("OOPS") ++ """ ++ And note that "the traceback is contained in the XML element " +diff --git a/issue.features/issue0457.feature b/issue.features/issue0457.feature +index f80640e9..46f96e9c 100644 +--- a/issue.features/issue0457.feature ++++ b/issue.features/issue0457.feature +@@ -24,6 +24,7 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports + """ + + ++ @not.with_python.version=3.8 + Scenario: Use failing assertation in a JUnit XML report + Given a file named "features/fails1.feature" with: + """ +@@ -44,6 +45,31 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports + ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # I am ++ ''' ++ """ ++ When I run "behave --junit features/fails2.feature" ++ Then it should fail with: ++ """ ++ 0 scenarios passed, 1 failed, 0 skipped ++ """ ++ And the file "reports/TESTS-fails2.xml" should contain: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ #