forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Environment data
- VS Code version: 1.25.1
- Extension version (available under the Extensions sidebar): 2018.6.0
- OS and version: OSX 10.13.3
- Python version (& distribution if applicable, e.g. Anaconda): 2.7.14
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): n/a
- Relevant/affected Python packages and their versions: unittest (part of python)
Actual behavior
This documentation says that I can use:
"python.unitTest.unittestArgs": [
"-t",
"../../",
"-s",
"python/tests/",
"-p",
"*_test.py",
]
Unfortunately, -t has no affect...
Also, I suspect python.unitTest.cwd does nothing...
I verified that by looking into this file in the repo
Expected behavior
-t should be propagate to unittest and set the top level directory as described in python unittest
cwd should also affect the directory that the unittest was launched
Steps to reproduce:
- Create a multi-root workspace of:
Root
|- package A (workspace 1)
|- package B (workspace 2)
|- tests
- Create a test that depends (relative import) on package A
- configure unit tests specifically for the workspace 2 directory
- Run the tests and you'll get "ValueError: Attempted relative import in non-package"
- add -t and see that it has no affect
- change cwd and also doesn't make any affect
Logs
Nothing in Output or in Dev tools...
Metadata
Metadata
Assignees
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug