PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

The result of Test discovery was incorrect.

Open ttSpace opened this issue 3 years ago • 2 comments

Describe the bug

image

Steps to Reproduce

  1. Create Python application project.
  2. Right-click project, select Add > New Item …, then select "Python Unit Test" followed by "Add".
  3. 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()

  1. Set Test framework as "unittest" in python project properties page.
  2. 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.

MicrosoftTeams-image

ttSpace avatar Jun 09 '22 07:06 ttSpace

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

StellaHuang95 avatar Jun 09 '22 18:06 StellaHuang95

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

StellaHuang95 avatar Jun 24 '22 16:06 StellaHuang95