Closed julianolf closed 1 month ago
I was wondering if adding this complexity to look for Pytest configurations in different files is something you would be willing to incorporate into the plugin?
I don't want to go too overboard with the detection, but I added pyproject.toml
with https://github.com/mfussenegger/nvim-dap-python/pull/144 seeing how pyproject.toml
has full core backing with PEPs and all.
It works perfect for me. Thanks for the addition!
First of all, I just wanted to say thanks for the awesome plugin! It just makes configuring a debugger for Python on nvim as easy as it can be.
Going on the topic, I recently started working on a project that moved all tooling configurations to the
pyproject.toml
file, including Pytest's. Because of this, debugging tests required manually setting up the test runner.I tried to create an empty
pytest.ini
file as a workaround, but then Pytest stopped reading thepyproject.toml
file. According to the documentation,pytest.ini
and.pytest.ini
files take precedence over other configuration files. https://docs.pytest.org/en/8.2.x/reference/customize.html#configuration-file-formatsI like the way I used to move between projects with different test runners without having to do anything special or complicated—just open files, hit a few keys, and start debugging.
To regain that convenience, I wrote a function that searches for Pytest configurations in various files (
pytest.ini
,.pytest.ini
,pyproject.toml
,tox.ini
, andsetup.cfg
), as described in the documentation.I was wondering if adding this complexity to look for Pytest configurations in different files is something you would be willing to incorporate into the plugin?