Closed chaselal closed 5 years ago
Can you provide the command-line that you use which does discover and run the tests normally? Otherwise I suspect unittest
itself cannot discover a file named foo.test.py
as that is not a name Python can import.
I only tried the extension's test runner. I did not know the file name format was incompatible with Python imports. I am new to Python. Sounds like this issue can be closed.
On Thu, May 23, 2019, 1:38 PM Brett Cannon notifications@github.com wrote:
Can you provide the command-line that you use which does discover and run the tests normally? Otherwise I suspect unittest itself cannot discover a file named foo.test.py as that is not a name Python can import.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-python/issues/5738?email_source=notifications&email_token=AA57GK54FXHBS6VKQVNLAWLPW3JA3A5CNFSM4HPA4E7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWC6OTY#issuecomment-495314767, or mute the thread https://github.com/notifications/unsubscribe-auth/AA57GKYWXIUCOSFBTSMP4K3PW3JA3ANCNFSM4HPA4E7A .
Yes, in order to resolve the import foo.test.py
, python will look for a module named foo
, which does not exist. Hence discovery will fail, closing this issue.
Environment data
VS Code information:
Extension information:
Expected behaviour
The extension discovers
unittest
tests named likefoo.test.py
.Actual behaviour
The extension fails to discover the tests.
Steps to reproduce:
Repro project: vscode-python-bug.zip
unittest
tests. Name the filefoo.test.py
.*test*.py
Logs
Nothing for
Python
. ForPython Test
, I get logs like this when I try to run all tests or click the Discover Tests button repeatedly: