-
Notifications
You must be signed in to change notification settings - Fork 6k
python extension fails to discover test files #1613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's very unlikely that this is a problem with code-server. My guess is that there is an issue with the python configuration within your Docker container. |
Yes, please try to reproduce with normal VS Code and if it's not an issue there, I'll reopen. |
I tried the same python file on 3 different environment, and here is what I have: I tried several actions to understand what can be the problem, and I think with unittest framework on ARM there is an issue with the discovery function: make a simple test test_hello.py |
I'd recommend filing a bug with unittest. |
Not sure, as reloading prove it works, and it is the automatic refresh that does not work. |
Can you record a video or show how to reproduce it step by step? |
Like what's in |
Closing for inactivity. Highly recommend filing a bug report against unittest as it's very unlikely to be a code-server bug. |
code-server: 3.5.0 on CentOs7 Offline environment I have the same issue. I try to creat a helloWorld.py and helloWorld_test.py to test the available of unittest. Python testing in Visual Studio Code creat but it's worked in my vscode on win10 |
When I try to run tests I get this error: #1837 (but the activation works) so that might be why the discovery isn't working. |
i give up, use another test framwork pytest replaced |
I have the last version of code-servfer installed on ARM64 machine inside a Docker image based on Debian.
Everything look working fine.
Python extension is working fine except for unit tests:
inside a new folder, i created a sub folder 'test'
inside this sub folder, I create a simple testAbc.py
import unittest
import unittest
class TestAbc(unittest.TestCase):
def test1(self):
self.assertEqual(0,0)
if name == 'main':
unittest.main()
Then I run the command Python: Configure tests , choose unittest, I choose folder test, and tests like that: test*.py
The test icon on the panel is not displayed (it is displayed on studio code)
then I run the command: Python: Discover tests => no results
What is strange is by changing the test api to pytest, i succeed to have the test icon displayed, but again no tests found using command Discover tests.
please can you help?
The text was updated successfully, but these errors were encountered: