From c0f52c41d86744537075229a9f0ec0f77ced0c75 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Thu, 23 Jul 2020 15:23:23 -0300 Subject: gnu: Add python-pytest-arraydiff. * gnu/packages/python-check.scm (python-pytest-arraydiff): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 2e3cfe05c5c..9d25753f70d 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2020 Julien Lepiller ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Edouard Klein +;;; Copyright © 2020 Vinicius Monego ;;; ;;; This file is part of GNU Guix. ;;; @@ -125,6 +126,32 @@ detect the absence of a cassette file and once again record all HTTP interactions, which will update them to correspond to the new API.") (license license:expat))) +(define-public python-pytest-arraydiff + (package + (name "python-pytest-arraydiff") + (version "0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-arraydiff" version)) + (sha256 + (base32 "05bcvhh2ycxa35znl8b3l9vkcmx7vwm5c3fpakbpw46c7vsn4bfy")))) + (build-system python-build-system) + (arguments + ;; Tests require python-astropy, which itself requires this package. + ;; Disable tests to avoid the circular dependency problem. + '(#:tests? #f)) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-six" ,python-six))) + (home-page "https://github.com/astropy/pytest-arraydiff") + (synopsis "Pytest plugin to help with comparing array output from tests") + (description + "This is a py.test plugin to facilitate the generation and comparison of +data arrays produced during tests, in particular in cases where the arrays +are too large to conveniently hard-code them in the tests.") + (license license:bsd-3))) + (define-public python-pytest-vcr ;; This commit fixes integration with pytest-5 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05") -- cgit v1.3 From 5bec698d47361c174c1d93a44500d498ff44644d Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Thu, 23 Jul 2020 15:23:24 -0300 Subject: gnu: Add python-pytest-doctestplus. * gnu/packages/python-check.scm (python-pytest-doctestplus): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 9d25753f70d..38f6501fb0c 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -152,6 +152,34 @@ data arrays produced during tests, in particular in cases where the arrays are too large to conveniently hard-code them in the tests.") (license license:bsd-3))) +(define-public python-pytest-doctestplus + (package + (name "python-pytest-doctestplus") + (version "0.7.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-doctestplus" version)) + (sha256 + (base32 "1ai9kvd7xbq2jg2h8gmkb8lqzyrxvdh4zg3vxndg149iwd1hyi7d")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make the installed plugin discoverable by Pytest. + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/astropy/pytest-doctestplus") + (synopsis "Pytest plugin with advanced doctest features") + (description + "This package contains a plugin for the Pytest framework that provides +advanced doctest support and enables the testing of reStructuredText files.") + (license license:bsd-3))) + (define-public python-pytest-vcr ;; This commit fixes integration with pytest-5 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05") -- cgit v1.3 From 4202af69b4e2ada5da3a8744dcd97d8a2fbf46e0 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Thu, 23 Jul 2020 15:23:25 -0300 Subject: gnu: Add python-pytest-filter-subpackage. * gnu/packages/python-check.scm (python-pytest-filter-subpackage): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 38f6501fb0c..5647de98c70 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -180,6 +180,41 @@ are too large to conveniently hard-code them in the tests.") advanced doctest support and enables the testing of reStructuredText files.") (license license:bsd-3))) +(define-public python-pytest-filter-subpackage + (package + (name "python-pytest-filter-subpackage") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-filter-subpackage" version)) + (sha256 + (base32 "1s4s2kd31yc65rfvl4xhy8xx806xhy59kc7668h6b6wq88xgrn5p")))) + (build-system python-build-system) + (arguments + '(;; One test is failing. There's an issue reported upstream. See + ;; https://github.com/astropy/pytest-filter-subpackage/issues/3. + ;; Disable it for now. + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make the installed plugin discoverable by Pytest. + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-k" "not test_with_rst")))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-doctestplus" + ,python-pytest-doctestplus))) + (home-page "https://github.com/astropy/pytest-filter-subpackage") + (synopsis "Pytest plugin for filtering based on sub-packages") + (description + "This package contains a simple plugin for the pytest framework that +provides a shortcut to testing all code and documentation for a given +sub-package.") + (license license:bsd-3))) + (define-public python-pytest-vcr ;; This commit fixes integration with pytest-5 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05") -- cgit v1.3 From 8974f7d0653a3f7e7ba0a1884d60da2442cf5eca Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Thu, 23 Jul 2020 15:23:26 -0300 Subject: gnu: Add python-pytest-openfiles. * gnu/packages/python-check.scm (python-pytest-openfiles): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 5647de98c70..5140057f916 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -215,6 +215,38 @@ provides a shortcut to testing all code and documentation for a given sub-package.") (license license:bsd-3))) +(define-public python-pytest-openfiles + (package + (name "python-pytest-openfiles") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-openfiles" version)) + (sha256 + (base32 "0n0a7fdc9m86360y96l23fvdmd6rw04bl6h5xqgl9qxfv08jk70p")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make the installed plugin discoverable by Pytest. + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-setuptools-scm" ,python-setuptools-scm) + ("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-psutil" ,python-psutil))) + (home-page "https://github.com/astropy/pytest-openfiles") + (synopsis "Pytest plugin for detecting inadvertent open file handles") + (description + "This package provides a plugin for the pytest framework that allows +developers to detect whether any file handles or other file-like objects +were inadvertently left open at the end of a unit test.") + (license license:bsd-3))) + (define-public python-pytest-vcr ;; This commit fixes integration with pytest-5 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05") -- cgit v1.3 From 04a3cb9984a81bbac2dc1f2ac8d00fc12cd4b96d Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Thu, 23 Jul 2020 15:23:27 -0300 Subject: gnu: Add python-pytest-remotedata. * gnu/packages/python-check.scm (python-pytest-remotedata): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 5140057f916..506b95556cf 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -247,6 +247,41 @@ developers to detect whether any file handles or other file-like objects were inadvertently left open at the end of a unit test.") (license license:bsd-3))) +(define-public python-pytest-remotedata + (package + (name "python-pytest-remotedata") + (version "0.3.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-remotedata" version)) + (sha256 + (base32 "1h6g6shib6z07azf12rnsa053470ggbd7hy3bnbw8nf3nza5h372")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make the installed plugin discoverable by Pytest. + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-k" + (string-append + ;; These tests require internet access. Disable them. + "not test_default_behavior" + " and not test_strict_with_decorator"))))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-six" ,python-six))) + (home-page "https://github.com/astropy/pytest-remotedata") + (synopsis "Pytest plugin for controlling remote data access") + (description + "This package provides a plugin for the Pytest framework that allows +developers to control unit tests that require access to data from the +internet.") + (license license:bsd-3))) + (define-public python-pytest-vcr ;; This commit fixes integration with pytest-5 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05") -- cgit v1.3 From 8ea5d35e5c96a8eba931b22d6318b542b74172ff Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Thu, 23 Jul 2020 15:23:28 -0300 Subject: gnu: Add python-pytest-mpl. * gnu/packages/python-check.scm (python-pytest-mpl): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 506b95556cf..687fe2c7783 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -282,6 +282,35 @@ developers to control unit tests that require access to data from the internet.") (license license:bsd-3))) +(define-public python-pytest-mpl + (package + (name "python-pytest-mpl") + (version "0.11") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-mpl" version)) + (sha256 + (base32 "1km202c1s5kcn52fx0266p06qb34va3warcby594dh6vixxa9i96")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-matplotlib" ,python-matplotlib) + ("python-pillow" ,python-pillow))) + (home-page "https://github.com/matplotlib/pytest-mpl") + (synopsis "Pytest plugin to help with testing figures output from Matplotlib") + (description + "This is a plugin to facilitate image comparison for Matplotlib figures +in Pytest.") + (license license:bsd-3))) + (define-public python-pytest-vcr ;; This commit fixes integration with pytest-5 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05") -- cgit v1.3 From ea4972e6dc1bdda288bebb120a07546fa915f133 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Fri, 24 Jul 2020 09:01:39 -0300 Subject: gnu: Add python-covdefaults. * gnu/packages/python-check.scm (python-covdefaults): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 687fe2c7783..f71eef0c921 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -311,6 +311,37 @@ internet.") in Pytest.") (license license:bsd-3))) +(define-public python-covdefaults + (package + (name "python-covdefaults") + (version "1.1.0") + (source + (origin + ;; The PyPI tarball does not include tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/asottile/covdefaults") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "11a24c0wzv01n55fy4kdpnyqna4m9k0mp58kmhiaks34xw4k37hq")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-coverage" ,python-coverage) + ("python-pytest" ,python-pytest))) + (home-page "https://github.com/asottile/covdefaults") + (synopsis "Coverage plugin to provide opinionated default settings") + (description + "Covdefaults is a coverage plugin to provide opinionated default + settings.") + (license license:expat))) + (define-public python-pytest-vcr ;; This commit fixes integration with pytest-5 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05") -- cgit v1.3 From a5d27dbe8e44f7d9054f88ee49963a290ee5be24 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Fri, 24 Jul 2020 09:01:43 -0300 Subject: gnu: Add python-pytest-env. * gnu/packages/python-check.scm (python-pytest-env): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index f71eef0c921..e96ce9e666d 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -673,6 +673,26 @@ service processes for your tests with pytest.") "This pytest plugin provides fixtures to simplify Flask app testing.") (license license:expat))) +(define-public python-pytest-env + (package + (name "python-pytest-env") + (version "0.6.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-env" version)) + (sha256 + (base32 "1hl0ln0cicdid4qjk7mv90lw9xkb0v71dlj7q7rn89vzxxm9b53y")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/MobileDynasty/pytest-env") + (synopsis "Pytest plugin that allows you to add environment variables") + (description + "This is a @code{py.test} plugin that enables you to set environment +variables in the @file{pytest.ini} file.") + (license license:expat))) + (define-public python-codacy-coverage (package (name "python-codacy-coverage") -- cgit v1.3 From e86b6ef07c1d7aebc5a848d9f914754d26cfb58d Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Mon, 27 Jul 2020 17:42:06 -0300 Subject: gnu: Add python-nbval. * gnu/packages/python-check.scm (python-nbval): New variable. Signed-off-by: Oleg Pykhalov --- gnu/packages/python-check.scm | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index e96ce9e666d..cf765e81063 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -650,6 +650,53 @@ service processes for your tests with pytest.") (description "This package provides a pytest plugin for aiohttp support.") (license license:asl2.0))) +(define-public python-nbval + (package + (name "python-nbval") + (version "0.9.5") + (source + (origin + (method url-fetch) + (uri (pypi-uri "nbval" version)) + (sha256 + (base32 "1xh2p7g5s5g06caaraf3dsz69bpj7dgw2h3ss67kci789aspnwp8")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'fix-test + (lambda _ + ;; This test fails because of a mismatch in the output of LaTeX + ;; equation environments. Seems OK to skip. + (delete-file "tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb") + #t)) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-k" + (string-append + ;; This only works with Pytest < 5. + "not nbdime_reporter" + ;; https://github.com/computationalmodelling/nbval/pull/148. + " and not test_timeouts"))))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-sympy" ,python-sympy))) + (propagated-inputs + `(("python-ipykernel" ,python-ipykernel) + ("python-jupyter-client" ,python-jupyter-client) + ("python-nbformat" ,python-nbformat) + ("python-six" ,python-six))) + (home-page "https://github.com/computationalmodelling/nbval") + (synopsis "Pytest plugin to validate Jupyter notebooks") + (description + "This plugin adds functionality to Pytest to recognise and collect Jupyter +notebooks. The intended purpose of the tests is to determine whether execution +of the stored inputs match the stored outputs of the @file{.ipynb} file. Whilst +also ensuring that the notebooks are running without errors.") + (license license:bsd-3))) + (define-public python-pytest-flask (package (name "python-pytest-flask") -- cgit v1.3 From f755bb0189e0f226c4422347decbf2487a8c3a08 Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Mon, 27 Jul 2020 10:00:43 +0200 Subject: gnu: Add python-mypy-extensions. * gnu/packages/python-check.scm (python-mypy-extensions): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index cf765e81063..0279a0a39bf 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2020 Vinicius Monego +;;; Copyright © 2020 Tanguy Le Carrour ;;; ;;; This file is part of GNU Guix. ;;; @@ -818,3 +819,23 @@ it, the declaration of a name's public export semantics are not separated from the implementation of that name.") (license (list license:asl2.0 license:lgpl3)))) ; only for setup_helpers.py + +(define-public python-mypy-extensions + (package + (name "python-mypy-extensions") + (version "0.4.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mypy_extensions" version)) + (sha256 + (base32 + "1a04qsk8hd1lqns8w1j7cr0vmvbhg450di5k1i16kqxkbf7q30id")))) + (build-system python-build-system) + (arguments `(#:tests? #f)); no tests + (home-page "https://github.com/python/mypy_extensions") + (synopsis "Experimental extensions for MyPy") + (description "The @code{python-mypy-extensions} module defines +experimental extensions to the standard @code{typing} module that are +supported by the MyPy typechecker.") + (license license:expat))) -- cgit v1.3 From 4fae4f9aab806451535db032b43cba558668cf64 Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Mon, 27 Jul 2020 10:00:51 +0200 Subject: gnu: Add python-mypy. * gnu/packages/python-check.scm (python-mypy): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python-check.scm | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 0279a0a39bf..51b864957ff 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -31,6 +31,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages web) + #:use-module (gnu packages xml) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -839,3 +840,52 @@ the implementation of that name.") experimental extensions to the standard @code{typing} module that are supported by the MyPy typechecker.") (license license:expat))) + +(define-public python-mypy + (package + (name "python-mypy") + (version "0.782") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mypy" version)) + (sha256 + (base32 + "030kn709515452n6gy2i1d9fg6fyrkmdz228lfpmbslybsld9xzg")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "./runtests.py") + #t))))) + (native-inputs + `(("python-attrs" ,python-attrs) + ("python-flake8" ,python-flake8) + ("python-flake8-bugbear" ,python-flake8-bugbear) + ("python-flake8-pyi" ,python-flake8-pyi) + ("python-importlib-metadata" ,python-importlib-metadata) + ("python-lxml" ,python-lxml) + ("python-psutil" ,python-psutil) + ("python-py" ,python-py) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-forked" ,python-pytest-forked) + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-virtualenv" ,python-virtualenv))) + (propagated-inputs + `(("python-mypy-extensions" ,python-mypy-extensions) + ("python-typing-extensions" ,python-typing-extensions) + ("python-typed-ast" ,python-typed-ast))) + (home-page "http://www.mypy-lang.org/") + (synopsis "Static type checker for Python") + (description "Mypy is an optional static type checker for Python that aims +to combine the benefits of dynamic (or 'duck') typing and static typing. Mypy combines +the expressive power and convenience of Python with a powerful type system and +compile-time type checking. Mypy type checks standard Python programs; run them using +any Python VM with basically no runtime overhead.") + ;; Most of the code is under MIT license; Some files are under Python Software + ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and + ;; mypyc/lib-rt/getargs.c + (license (list license:expat license:psfl)))) -- cgit v1.3 From 6364610174423b8c5a7d227bb274e799e3b965ef Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Fri, 31 Jul 2020 12:59:21 -0300 Subject: gnu: Add python-pytest-ordering. * gnu/packages/python-check.scm (python-pytest-ordering): New variable. Signed-off-by: Mathieu Othacehe --- gnu/packages/python-check.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 51b864957ff..7a84fe39f98 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -128,6 +128,40 @@ detect the absence of a cassette file and once again record all HTTP interactions, which will update them to correspond to the new API.") (license license:expat))) +(define-public python-pytest-ordering + (package + (name "python-pytest-ordering") + (version "0.6") + (source + (origin + ;; No tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/ftobia/pytest-ordering") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14msj5gyqza0gk3x7h1ivmjrwza82v84cj7jx3ks0fw9lpin7pjq")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-k" + ;; This test fails because of a type mismatch of an + ;; argument passed to @code{pytest.main}. + "not test_run_marker_registered")))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/ftobia/pytest-ordering") + (synopsis "Pytest plugin to run your tests in a specific order") + (description + "This plugin defines Pytest markers to ensure that some tests, or groups +of tests run in a specific order.") + (license license:expat))) + (define-public python-pytest-arraydiff (package (name "python-pytest-arraydiff") -- cgit v1.3 From 51431f0b9fe7a2b2aba12287fc9ec9a31cc1a36f Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Fri, 7 Aug 2020 10:24:16 -0300 Subject: gnu: Add python-pytest-trio. * gnu/packages/python-check.scm (python-pytest-trio): New variable. Signed-off-by: Efraim Flashner --- gnu/packages/python-check.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 7a84fe39f98..d0bde27e130 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -436,6 +436,39 @@ in Pytest.") of the project to ensure it renders properly.") (license license:expat))) +(define-public python-pytest-trio + (package + (name "python-pytest-trio") + (version "0.6.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-trio" version)) + (sha256 + (base32 "1zm8didm9h5jkqhghl9bvqs7kr7sjci282c7grhk6yhpzn8a9w4v")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-W" "error" "-ra" "-v" "--pyargs" + "pytest_trio" "--verbose" "--cov")))))) + (native-inputs + `(("python-hypothesis" ,python-hypothesis) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov))) + (propagated-inputs + `(("python-trio" ,python-trio))) + (home-page "https://github.com/python-trio/pytest-trio") + (synopsis "Pytest plugin for trio") + (description + "This is a pytest plugin to help you test projects that use Trio, a +friendly library for concurrency and async I/O in Python.") + ;; Either license applies. + (license (list license:expat license:asl2.0)))) + (define-public python-pytest-flake8 (package (name "python-pytest-flake8") -- cgit v1.3