Skip to content

Fail to found unittest in hello-stackoverflow folder. #11264

@linette-zyy

Description

@linette-zyy

Environment data

Build of Visual Studio Code - Insiders: 1.45.0-insider
Build of python-insider: 2020.5.74187-dev

Repro steps

  1. Git clone https://github.com/qubitron/pydemo
  2. Open Anaconda Prompt window
  3. Cd pydemo
  4. Run py -3 setup.py
  5. Open hello-stackoverflow folder
  6. Press "Ctrl+Shift+p" to select "Run All Tests"
  7. Make sure a prompt is popup
  8. Click "Enable and configure a Test Framework"
  9. From the menus select "Unittest framework->Tests folder->Test_*.py" file

Expected behaviour

The unittest should be found successfully.

Actual behaviour

No test discovered error message pops up.
image

Others

I try to create a new folder and add an new test,py.
Input some code:

import unittest
class PassingTests(unittest.TestCase):
    def test_passing(self):
        self.assertEqual(42, 42)
    def test_passing_still(self):
        self.assertEqual("silly walk", "silly walk")
class FailingTests(unittest.TestCase):
    def test_failure(self):
        self.assertEqual(42, -13)
    def test_failure_still(self):
        self.assertEqual("I'm right!", "no, I am!")

It can find unittest successfully.
image

Metadata

Metadata

Assignees

Labels

area-testingbugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions