I have a python
project, it has tests and I can execute them from the command line. I just read about .dir-locals.el
in the projectile
documentation and I want to execute tests from inside emacs using projectile
.
So I create a .dir-locals.el
file like:
((nil .
(
(projectile-project-test-cmd . "pytest --color=no")
)))
The variable is set, but when do C-c p P
(or M-x projectile-test-project
) It asks for the command with Test command:
(If I type there pytest --color=no
, it will execute perfectly)
The documentation says that it is possible to avoid the question setting the variable compilation-read-command
to no nil.
((nil .
((compilation-read-command . nil)
(projectile-project-test-cmd . "pytest --color=no")
)))
But if I do that, C-c p P
stops asking, but it doesn't execute the tests, it executes a Compilation
(!)
This is the result:
-*- mode: compilation; default-directory: "~/tmp/tsp/" -*-
Compilation started at Sat Oct 31 02:05:42
Compilation finished at Sat Oct 31 02:05:42
Would you mind to point me what I am doing wrong?