gnu: ranger: More test tweaks.

There's no functional difference between 'make test_pytest' and running
'py.test' directly, but there may be in future.

This follows up on commit 14173b3c6765bd8fcb2b12ea28fc27226645c7e1.

* gnu/packages/disk.scm (ranger)[arguments]: Use #:test-target to run
the (same) tests through 'make'.
[native-inputs]: Remove left-over python-flake8 and python-pylint.
This commit is contained in:
Tobias Geerinckx-Rice 2018-10-10 22:28:40 +02:00
parent 47f9fb18a3
commit 43c97cceae
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -528,13 +528,15 @@ Duperemove can also take input from the @command{fdupes} program.")
(build-system python-build-system) (build-system python-build-system)
(inputs (inputs
`(("w3m" ,w3m))) `(("w3m" ,w3m)))
(native-inputs ;for tests (native-inputs
`(("python-flake8" ,python-flake8) `(("which" ,which)
("python-pylint" ,python-pylint)
("python-pytest" ,python-pytest) ;; For tests.
("which" ,which))) ("python-pytest" ,python-pytest)))
(arguments (arguments
'(#:phases '( ;; The 'test' target runs developer tools like pylint, which fail.
#:test-target "test_pytest"
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'configure 'wrap-program (add-after 'configure 'wrap-program
;; Tell 'ranger' where 'w3mimgdisplay' is. ;; Tell 'ranger' where 'w3mimgdisplay' is.
@ -548,9 +550,9 @@ Duperemove can also take input from the @command{fdupes} program.")
`("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay))) `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
#t))) #t)))
(replace 'check (replace 'check
;; Running 'make test' simply prints 'Ran 0 tests in 0.000s'. ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
(lambda _ (lambda* (#:key test-target #:allow-other-keys)
(invoke "py.test" "tests")))))) (invoke "make" test-target))))))
(home-page "https://ranger.github.io/") (home-page "https://ranger.github.io/")
(synopsis "Console file manager") (synopsis "Console file manager")
(description "ranger is a console file manager with Vi key bindings. It (description "ranger is a console file manager with Vi key bindings. It