guix-commits
[Top][All Lists]
Advanced

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

02/02: gnu: python-tox: Build with tests.


From: guix-commits
Subject: 02/02: gnu: python-tox: Build with tests.
Date: Thu, 1 Sep 2022 07:47:36 -0400 (EDT)

lilyp pushed a commit to branch master
in repository guix.

commit 58974e7b1971c9795ab6365b8e80e5140ceba9e5
Author: Nicolas Graves <ngraves@ngraves.fr>
AuthorDate: Sun Aug 21 00:33:53 2022 +0200

    gnu: python-tox: Build with tests.
    
    * gnu/packages/python-check.scm (python-tox)[arguments]: Convert to list of
    G-Expressions.  Drop #:tests?.  Add #:phases.
    [native-inputs]: Add python-flaky, python-pathlib2, python-pytest-freezegun,
    and python-pytest-timeout.
    
    Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
 gnu/packages/python-check.scm | 46 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 41 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index dc2e474c34..5ee1d41f34 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2300,9 +2300,42 @@ which make writing and running functional and 
integration tests easier.")
          "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
     (build-system python-build-system)
     (arguments
-     ;; FIXME: Tests require pytest-timeout, which itself requires
-     ;; pytest>=2.8.0 for installation.
-     '(#:tests? #f))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "pytest" "-vv" "-k"
+                        (string-join
+                         (map (lambda (test)
+                                (string-append "not test_" test))
+                              '("invocation_error"
+                                "create_KeyboadInterrupt"
+                                "exit_code"
+                                "tox_get_python_executable"
+                                "find_alias_on_path"
+                                "get_executable"
+                                "get_executable_no_exist"
+                                "get_sitepackagesdir_error"
+                                "spinner_stdout_not_unicode"
+                                "provision_non_canonical_dep"
+                                "package_setuptools"
+                                "package_poetry"
+                                "parallel_interrupt"
+                                "provision_missing"
+                                "provision_from_pyvenv"
+                                "provision_interrupt_child"
+                                "create"
+                                "run_custom_install_command"
+                                "toxuone_env"
+                                "different_config_cwd"
+                                "test_usedevelop"
+                                "build_backend_without_submodule"
+                                "parallel"
+                                "parallel_live"
+                                "tox_env_var_flags_inserted_isolated"))
+                         " and "))))))))
     (propagated-inputs
      (list python-filelock
            python-packaging
@@ -2312,8 +2345,11 @@ which make writing and running functional and 
integration tests easier.")
            python-toml
            python-virtualenv))
     (native-inputs
-     (list ; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
-           python-pytest ; >= 2.3.5
+     (list python-flaky
+           python-pathlib2
+           python-pytest                ; >= 2.3.5
+           python-pytest-freezegun
+           python-pytest-timeout
            python-setuptools-scm))
     (home-page "https://tox.readthedocs.io";)
     (synopsis "Virtualenv-based automation of test activities")



reply via email to

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