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