guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 03/10] gnu: Add python-pytest-pep8.


From: Ben Woodcroft
Subject: Re: [PATCH 03/10] gnu: Add python-pytest-pep8.
Date: Sun, 24 Apr 2016 23:21:23 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0



On 22/04/16 04:26, Hartmut Goebel wrote:
Am 21.04.2016 um 15:21 schrieb Ben Woodcroft:
+         (add-after 'install 'post-install-check
+           ;; 'setup.py test' does not run tests
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "PYTHONPATH"
+                       (string-append
+                        (getenv "PYTHONPATH")
+                        ":"
+                        out
+                        "/lib/python"
+                        (string-take (string-take-right
+                                      (assoc-ref inputs "python") 5) 3)
+                        "/site-packages"))
+               (zero?
+                (system*
+                 (string-append out "/bin/py.test") "test_pep8.py"))))))))

Have you tried if the tests are run when moving the test-file into a new subdirectory "tests/"? This would result in much less code.

I'm afraid not. I'm no pythonista, but these tests are written for pytest, not in the more vanilla unittest which setup.py expects, I think. I tested moving it to tests out as you suggest, to no avail.

Thanks,
ben

reply via email to

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