forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-testingfeature-requestRequest for new features or functionalityRequest for new features or functionalityverifiedVerification succeededVerification succeeded
Milestone
Description
Environment data
- VS Code version: 1.33.1
- Extension version (available under the Extensions sidebar): master
- OS and version: Any
- Python version (& distribution if applicable, e.g. Anaconda): Any
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
- Relevant/affected Python packages and their versions: N/A
Expected behavior
I have 2.7 and 3.7. If I have pytests
in only in 3.7. If i was using 3.7 discovered tests then switched environments then the test explorer should be empty. Also there should be some indication of why the test discovery failed. Pytest not installed.
In the case of ptvsd, test discovery fails because of a issue in conftest.py (only on 2.7). But this is not clear, because the tests are not re-discovered when switching between 3.7 and 2.7.
ImportError while loading conftest 'c:\GIT\ptvsd\tests\conftest.py'.
C:\Users\kanadig\AppData\Roaming\Python\Python27\site-packages\six.py:709: in exec_
exec("""exec _code_ in _globs_, _locs_""")
tests\conftest.py:16: in <module>
from . import helpers
tests\helpers\__init__.py:92: in <module>
from .printer import print
C:\Users\kanadig\AppData\Roaming\Python\Python27\site-packages\six.py:709: in exec_
exec("""exec _code_ in _globs_, _locs_""")
tests\helpers\printer.py:10: in <module>
from .ptvsd.compat import queue
E ImportError: No module named ptvsd.compat
Actual behavior
Test explorer retains the discovered test from the previous environment.
Steps to reproduce:
-
Open ptvsd project with 3.7
-
Discover tests
-
Open test explorer
-
Change python to 2.7
-
Test should be rediscovered (should be empty for ptvsd due to a issue with detecting tests)
WSLUser
Metadata
Metadata
Assignees
Labels
area-testingfeature-requestRequest for new features or functionalityRequest for new features or functionalityverifiedVerification succeededVerification succeeded