I'm setting up my python lsp using this video tutorial.
My emacs init.el configuration file is here
projectile-project-test-cmd runs the command
python -m unittest discover. I want to change it to
pytest instead as explained by tutor.
I followed the below steps -
1. M-x add-dir-local-variable RET 2. choose mode 'python-mode' 3. Add local-variable 'projectile-project-test-cmd'. 4. Add local variable value "pytest".
It creates .dir-locals.el file with below contents -
((python-mode . ((projectile-project-test-cmd . "pytest"))))
Now when I run
M-x projectile-test-project it runs pytest command.
But when I close emacs and reopen it, it stops running pytest and runs
python -m unittest discover instead.
How to fix this issue?