reddit / emacs

How to run python tests if you are using eglot?

nanounanue · 2022-06-09 18:11
Hi I am using eglot for python (and yaml, latex). Today I was fixing some big python code base, and I realize that I have no simple way of running the tests. I did a quick search in the Emacs web site, but they recommend `python-pytest` or `pytest` or `elpy`, I discarded the first one since it depends on `projectile` (and I prefer `project.el`) the second one was updated four years ago and `elpy` seems to overlap with `eglot`. So I am assumming that I am doing something wrong... Currently I am using `eglot` AND `elpy`, but only using `elpy` for run tests ... Any advice?
wargxs · 2022-06-09 18:28
Use projectile? Probably you could also use it together with project.el
nanounanue · 2022-06-09 19:13
Maybe, but I don't want to install that dependency (I am using `GUIX`)
nanounanue · 2022-06-09 19:14
Also, maybe `anaconda-mode` is a lighter version of `elpy`?
carnivorousdrew · 2022-06-09 19:45
Are these tests you could run simply by running pytest in the terminal? If so you could just use eshell, or if you have some kind of "configuration" in mind (running the pytest command plus some specific flags, in a specific dir using a given virtual environment) I have recently made a package (`pyconf`) that allows you to run such configurations like on pycharm.
nanounanue · 2022-06-09 20:12
I would love to try `pyconf`! Mind to share the url?
carnivorousdrew · 2022-06-09 20:18
https://github.com/andcarnivorous/pyconf You can find in the elisp file in the initial comment section some example configurations