You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failure details in unittest discovery are not always logged. #5889
I'm pretty sure that the fix for #5313 is incomplete. It does the right thing for pytest, but not for unittest. I'm opening a new issue (rather than re-opening #5313) since the old issue has already been closed.
The main problem is that in src/client/testing/unittest/services/discoveryService.ts, failures are ignored in the script that gets run (see getDiscoveryScript()). They should be logged and dealt with.
One possible solution could be to update the adapter script to handle unittest (in addition to the current pytest support).
If we have an invalid test to load, say test_2.py.
"""This unit test module can not be discovered."""importunittestx=y+2# Invalid line as `y` is not definedclassTest_ImportOuterModule(unittest.TestCase):
deftest_2_1(self):
self.assertEqual(1, 2)
returndeftest_2_2(self):
self.assertEqual(1, 1)
returnif__name__=="__main__":
unittest.main()
Activity
karrtikr commentedon Jul 29, 2021
If we have an invalid test to load, say
test_2.py.The testing script
returns
The last 2 entries indicate that the test nodes
test_1andtest_2were not loaded, this should probably be surfaced.karthiknadig commentedon Aug 3, 2021
With the latest test-UI this is addressed:
