Closed BrendanSimon closed 2 years ago
So I switched branches and things started working with Python Test Explorer. All tests pass now except for 1 (with the same symptoms of greyed out result - not red, not greed).
I have switched back and forth between the prior branch and made sure the vscode settings were the same, and I now get the same partial test results (but everything passes in the native python test explorer).
SOLVED !!
I noticed that the debug output had references to files stored in /mnt/brendansimon/...
My home directory was on a separate (virtual) disk, mouted to /mnt/brendansimon
and then symlinked from /home/brendansimon
.
The symlink was causing an issue with my build so I removed that mounted directly to /home/brendansimon
via /etc/fstab
, and the build works.
Seems there are some references to ../../../../../mnt/brendansimon/....../pytest/xxx_test.py
in the debug output, and ultimately the pytest cache, which seems to cause havoc with Python Test Explorer (in run mode only - debug seems ok).
Anyway, removing the cache directory fixed things so that Python Test Explorer now works as expected.
rm -rf .pytest_cache
Sorry for all the noise :-/
Mind you, removing the cache files/directories doesn't explain why all tests passed with native python test explorer but failed with Python Test Adapter (at least it's not clear to me).
SOLVED !!
I noticed that the debug output had references to files stored in
/mnt/brendansimon/...
My home directory was on a separate (virtual) disk, mouted to
/mnt/brendansimon
and then symlinked from/home/brendansimon
.The symlink was causing an issue with my build so I removed that mounted directly to
/home/brendansimon
via/etc/fstab
, and the build works.Seems there are some references to
../../../../../mnt/brendansimon/....../pytest/xxx_test.py
in the debug output, and ultimately the pytest cache, which seems to cause havoc with Python Test Explorer (in run mode only - debug seems ok).Anyway, removing the cache directory fixed things so that Python Test Explorer now works as expected.
rm -rf .pytest_cache
Sorry for all the noise :-/
Thanks, it works~~
I have tests that run and pass but I do not get the green tick icon. When running I get the blue working icon, but then after the test completes it returns to the grey "untested" icon.
vscode Environment
Running vscode on Windows 10 Pro, connecting to Debian 10 Buster Linux VM running in VirtualBox.
Test
Debug Output:
vscode Result
More Info (2022-03-02)
Even though when running in debug mode where the output says it passed, the tests do not complete. The vscode ui states the tests are still running ("Running tests...") - even a simple test that just asserts true.
So looks like something is waiting indefinitely with Python Test Explorer.
NOTE: running with the same tests with the vscode native python test framework is ok. I do get green ticks (check marks).