Fail to found unittest in hello-stackoverflow folder.
See original GitHub issueEnvironment data
Build of Visual Studio Code - Insiders: 1.45.0-insider Build of python-insider: 2020.5.74187-dev
Repro steps
- Git clone https://github.com/qubitron/pydemo
- Open Anaconda Prompt window
- Cd pydemo
- Run py -3 setup.py
- Open hello-stackoverflow folder
- Press “Ctrl+Shift+p” to select “Run All Tests”
- Make sure a prompt is popup
- Click “Enable and configure a Test Framework”
- 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.
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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Python Unittest: Fail due to import from same folder
Notice that I'm running the command from a directory where from src.xxx ... which should execute the main function found in src.file1 ....
Read more >Get started with unit testing - Visual Studio (Windows)
Create unit tests; Run unit tests; View live unit test results (Visual ... In the new project dialog box, find the unit test...
Read more >unittest | Python in Visual Studio Code
This section outlines the details necessary to get you up and started with using the python unittest testing framework with Visual Studio Code....
Read more >matlab.unittest.fixtures.TemporaryFolderFixture class
Create Temporary Folder Fixture Persisting Through Test Failure. Create the following anotherTempFolderFixtureTest class definition on your MATLAB path. For the ...
Read more >Python Tutorial: Unit Testing Your Code with the unittest Module
In this Python Programming Tutorial, we will be learning how to unit-test our code using the unittest module. Unit testing will allow you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @mdevin0,
Here’s the gif counterpart to @fcakyon explanation:
Yes, 2020.3.71113 is the latest stable version at the moment. No estimate for now, we’re on it 👷♀️
Hey, thank you very much for your help! @kimadeline @fcakyon