VSCode-Python/unittest module invoking wrong TestCase? #10972
Labels
area-testing
bug
Issue identified by VS Code Team member as probable bug
verified
Verification succeeded
Milestone
Environment data
Expected behaviour
As a User, in the Test Panel of VSCode, with the 3 TestCases USER_STORY_1_8_1, USER_STORY_1_8_10, and USER_STORY_1_8_11 present, when I click the run or debug icon associated with a TestCase named USER_STORY_1_8_1, TestCase USER_STORY_1_8_1 is run/debugged.
Actual behaviour
As a User, in the Test Panel of VSCode, with the 3 TestCases USER_STORY_1_8_1, USER_STORY_1_8_10, and USER_STORY_1_8_11 present , when I click the run or debug icon associated with a TestCase named USER_STORY_1_8_1, TestCase USER_STORY_1_8_11 is run/debugged. If USER_STORY_1_8_11 is unavailable (e.g. commented out), USER_STORY_1_8_10 is run/debugged. And if neither is available, only then is USER_STORY_1_8_1 run/debugged.
Steps to reproduce:
test.py
Configure VSCode to use a python interpreter for execution and the unittest framework for testing.
When configuring the unittest framework, configure auto-discover to search for files with the pattern test*.py
On the left sidebar click the Chemistry flask icon to open the Test Panel of VSCode. The 3 unit tests will be auto-discovered and populated in the list under test.py
Go to the TestCase named USER_STORY_1_8_1 and click the run icon or debug icon associated with it to attempt to run it or debug it
Issue is encountered: TestCase USER_STORY_1_8_11 will be run or debugged instead of the target USER_STORY_1_8_1 TestCase
I have a corresponding stackoverflow question open here: https://stackoverflow.com/questions/61048113/python-unittest-module-invoking-wrong-class where another user confirmed seeing the same behavior and proposed opening an Issue Report
The text was updated successfully, but these errors were encountered: