guix-commits
[Top][All Lists]
Advanced

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

33/150: gnu: python-pylama: Fix tests.


From: guix-commits
Subject: 33/150: gnu: python-pylama: Fix tests.
Date: Sun, 24 Apr 2022 05:12:19 -0400 (EDT)

lbraun pushed a commit to branch wip-python-pep517
in repository guix.

commit 59daf47238d6da34ab8733573b9290d2f4ea9f7b
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Wed Dec 8 14:20:17 2021 +0100

    gnu: python-pylama: Fix tests.
    
    Fetch source from git origin, which has tests and disable tests for removed 
module.
    
    * gnu/packages/python-check.scm (python-pylama)[source]: Change to 
git-fetch.
    [arguments]: Add #:test-flags.
    [native-arguments]: Add git.
---
 gnu/packages/python-check.scm | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 811f33816e..15d37a2b39 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -1741,15 +1742,19 @@ any Python VM with basically no runtime overhead.")
     (name "python-pylama")
     (version "7.7.1")
     (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "pylama" version))
+      (origin
+       ;; The PyPi tarball lacks dummy.py for tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/klen/pylama.git";)
+             (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "13vx7daqz2918y9s8q3v2i3xaq3ah43a9p58srqi6hqskkpm7blv"))))
+        (base32 "1hza43s8b3znq2vcihyvsyw6j19lm42rjn87i056j8kgrmkfil8w"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
+     `(#:test-flags '("tests" "-k" "not test_eradicate")
+       #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'disable-failing-tests
                     (lambda _
                       ;; Fails with: "ImportError: cannot import name
@@ -1760,7 +1765,7 @@ any Python VM with basically no runtime overhead.")
                       ;; https://github.com/PyCQA/astroid/issues/881).
                       (delete-file "pylama/lint/pylama_pylint.py"))))))
     (native-inputs
-     (list python-py python-pytest python-radon))
+     (list python-py python-pytest python-radon git))
     (propagated-inputs
      `(("python-mccabe" ,python-mccabe)
        ("python-mypy", python-mypy-minimal)



reply via email to

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