If I have a python file like foo.py that does not end or start with test_ but contains test methods that start with test_, is there a way to just run pytest on the current buffer, like what !pytest "%" would do basically, but via Neotest. I understand I could provide my own is_test_file function that scans python files for test_ method but wondering if there is a way to force Neotest to consider the active buffer a test file and just run pytest on it on an as-needed basis.
If I have a python file like
foo.pythat does not end or start withtest_but contains test methods that start withtest_, is there a way to just run pytest on the current buffer, like what!pytest "%"would do basically, but via Neotest. I understand I could provide my ownis_test_filefunction that scans python files fortest_method but wondering if there is a way to force Neotest to consider the active buffer a test file and just runpyteston it on an as-needed basis.