You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to open tests folder in file explorer after the test rescan, when using a pytest framework #6554
Can you please right click tests directory and select Reveal file in explorer option. If the files are still there, this maybe a VSC issue as we do not control what to show in the test folder contents.
I did a couple tests; it looks like when the "Test" tab is open (the one with the erlenmeyer flask) to display the tests tree, this blocks the File Explorer tab from retrieving the files in the tests folder.
When reloading VSCode with the tests folder open in the Windows explorer, the tests folder opens correctly in the Explorer tab.
However, if I close the folder in the Explorer tab, open the Test tab, and open a test function inside the Test interface,
Then comes back to the Explorer tab, then I cannot open the tests folder anymore, and is displayed as if empty by the interface.
Would that point out to a VSC issue, rather than a Python extension issue?
Romain Mondon Cancel (@skasch) Thanks for dissecting the issue. Unfortunately, I am not able to reproduce the problem with this info. Can you please provide a minimal setup to reproduce it? (i.e with file directory structure, file contents)
I made a small, reproducible example of a Python project with tests for pytest here: testing_pytest_framework
Here below are the three steps that lead to the tests folder becoming invisible:
The problem actually arises whenever we open a test file from the "Test" tab directly.
EDIT: from the look of the third screenshot, looking at the full path (c:\users...) of the opened test file, it may be VSCode does not recognize that the file is inside the opened folder.
changed the title [-]The tests folder becomes empty after the test rescan, when using a pytest framework[/-][+]Unable to open tests folder in file explorer after the test rescan, when using a pytest framework[/+]on Jul 31, 2019
Activity
karrtikr commentedon Jul 16, 2019
Can you please right click
testsdirectory and selectReveal file in exploreroption. If the files are still there, this maybe a VSC issue as we do not control what to show in the test folder contents.skasch commentedon Jul 17, 2019
I have the same issue.
I did a couple tests; it looks like when the "Test" tab is open (the one with the erlenmeyer flask) to display the tests tree, this blocks the File Explorer tab from retrieving the files in the tests folder.
Would that point out to a VSC issue, rather than a Python extension issue?
karrtikr commentedon Jul 18, 2019
Romain Mondon Cancel (@skasch) Thanks for dissecting the issue. Unfortunately, I am not able to reproduce the problem with this info. Can you please provide a minimal setup to reproduce it? (i.e with file directory structure, file contents)
Screenshots and possibly GIF would help.
skasch commentedon Jul 19, 2019
I made a small, reproducible example of a Python project with tests for pytest here: testing_pytest_framework
Here below are the three steps that lead to the tests folder becoming invisible:
The problem actually arises whenever we open a test file from the "Test" tab directly.
EDIT: from the look of the third screenshot, looking at the full path (c:\users...) of the opened test file, it may be VSCode does not recognize that the file is inside the opened folder.
karrtikr commentedon Jul 31, 2019
Thanks for the info. The issue will be fixed along with fixing #6758.
[-]The tests folder becomes empty after the test rescan, when using a pytest framework[/-][+]Unable to open tests folder in file explorer after the test rescan, when using a pytest framework[/+]karrtikr commentedon Jul 31, 2019
Closing in favor of #6758