Closed jaesbit closed 6 years ago
This is because the call is "context aware". It depends on the position of your cursor searching backwards. In this case it should work:
class TestFoo(object):
def test_foo(self):
assert True
<cursor position here>
But this would not work:
class TestFoo(object):
<cursor position here>
def test_foo(self):
assert True
If that is not the case, then could you show me some examples of the code you are trying to test and where your cursor is at the moment of invocation?
I'm using pytest, and not defining class like with unit test, maybe is for that, I attach you a test file test_files.txt
@atgiovannini you are using a function, not a class, so you would need to do:
:Pytest function
Alternatively, to run the whole file:
:Pytest file
Yeah, I'm using :Pytest file
now, and I'm sorry, I didn't read about :Pytest function
in README.
Then, can close issue ;)
On every try to execute
:Pytest method
getUnable to find a matching method for testing