PTVS
PTVS copied to clipboard
The result of Test discovery was incorrect.
Describe the bug

Steps to Reproduce
- Create Python application project.
- Right-click project, select Add > New Item …, then select "Python Unit Test" followed by "Add".
- Add test_1.py file with code
import unittest
class Test_test_1(unittest.TestCase):
def test_A(self):
self.fail("Not implemented")
if __name__ == '__main__':
unittest.main()
- Set Test framework as "unittest" in python project properties page.
- Open TE with the Test > Windows > Test Explorer menu command
Expected behavior
The result of Test discovery was correct.
Additional context and screenshots
The result of Test discovery was incorrect. There is only one test but it shows that two were found.

I am seeing the same behavior now after updating my VS, seems like start test discovery is called twice when test explorer is opened.

Might have to do with parallel test discovery that was introduced in preview 2. Filed an internal ticket and can be tracked here: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1560000