Closed fnune closed 1 month ago
I have an issue that is possibly related, also involving nested paths.
If I have files like this, then pytest from the command line will run and pass, but with the runner in nvim-dap will not be able to find the correct method.
class TestConverter(object):
def test_something(self, monkeypatch):
def mock_something(msg):
return "AAAA"
monkeypatch.setattr(Converter, "something", mock_something)
converter = Converter()
assert converter.to_shout() == "AAAA"
class Converter(object):
def something(self, msg):
return msg.upper()
The error message is similar:
ERROR: not found: /tmp/testnest/tests/test_conv.py::Converter::something
(no name '/tmp/testnest/tests/test_main.py::Converter::something' in any of [<Module tests/test_conv.py>])
I think both of these cases should be fixed with https://github.com/mfussenegger/nvim-dap-python/pull/140
Hi!
Here's my keybinding:
Top-level test
If I run it on a test like this, it works fine:
Issues
path::test_a
correctlyNested (n=1) test
Issues
path::TestB::test_b
correctlyNested (n>1) test
Issues
path::TestC::test_c
incorrectly: notice the missing::TestC1
Expected vs actual
Error reads: