pytest-describe icon indicating copy to clipboard operation
pytest-describe copied to clipboard

DescribeBlocks not supported out of the box in VSCode Testing

Open jcampbell05 opened this issue 2 years ago • 0 comments

VSCode seems to have an issue with describe blocks, it doesn't know what to do with them and so won't add them to the list of tests (it uses pytest's --collect-only output to discover them).

However it understands test case classes, so there might be a way to get them to work without relying on support from any IDE by wrapping any describe function as a test class ?

So that this:

def describe_me():
    def test_it_works():
       pass

Would look the same as :

class describe_me(unittest.TestCase):
    def test_it_works(self):
       pass

jcampbell05 avatar Oct 23 '23 11:10 jcampbell05