Debugging tests is returning errors due to "unsupported status"
See original GitHub issueEnvironment data
- VS Code version: 1.54.3
- Extension version (available under the Extensions sidebar): v2021.4.668904848-dev
- OS and version: Windows 10
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.8.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
- Relevant/affected Python packages and their versions: pytest 6.2.2
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Actual behaviour
Debugging tests shows an error notification even though the test passes:
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Clone this project: https://github.com/luabud/pvscc-logo
- Create a virtual environment and install the dependencies
- Run
Python: Configure Tests
, selectpytest
and then.
for root directory. - Open tests.py and change line 13 to
str
instead ofio.BytesIO
- Run the test and see that it passes
- Now click to debug this test
- Watch the error notification pop up even though the debugger session started properly and everything.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonaa'
User belongs to experiment group 'pythonJoinMailingListVar3'
User belongs to experiment group 'pythonSendEntireLineToREPL'
User belongs to experiment group 'pythonNotDisplayLinterPrompt'
User belongs to experiment group 'pythonDiscoveryModule'
User belongs to experiment group 'pythonTensorboardExperimentcf'
User belongs to experiment group 'DeprecatePythonPath - experiment'
User belongs to experiment group 'ShowExtensionSurveyPrompt - enabled'
User belongs to experiment group 'CollectLSRequestTiming - control'
> python c:\Users\luabud\.vscode\extensions\ms-python.python-2021.4.668904848-dev\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python c:\Users\luabud\.vscode\extensions\ms-python.python-2021.4.668904848-dev\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python c:\Users\luabud\.vscode\extensions\ms-python.python-2021.4.668904848-dev\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python c:\Users\luabud\.vscode\extensions\ms-python.python-2021.4.668904848-dev\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
Python interpreter path: .\env\Scripts\python.exe
Starting Jedi language server.
> c:\Users\luabud\Apps\pvscc-logo\env\Scripts\python.exe c:\Users\luabud\.vscode\extensions\ms-python.python-2021.4.668904848-dev\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir c:\Users\luabud\Apps\pvscc-logo -s --cache-clear .
cwd: c:\Users\luabud\Apps\pvscc-logo
> c:\Users\luabud\Apps\pvscc-logo\env\Scripts\python.exe c:\Users\luabud\.vscode\extensions\ms-python.python-2021.4.668904848-dev\pythonFiles\pyvsc-run-isolated.py pytest --override-ini junit_family=xunit1 --rootdir c:\Users\luabud\Apps\pvscc-logo --junit-xml=C:\Users\luabud\AppData\Local\Temp\tmp-34824nVG8ptp2l1BN.xml .
cwd: c:\Users\luabud\Apps\pvscc-logo
Output for Python Test Log
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
python c:\Users\luabud\.vscode\extensions\ms-python.python-2021.4.668904848-dev\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir c:\Users\luabud\Apps\pvscc-logo -s --cache-clear .
============================= test session starts =============================
platform win32 -- Python 3.8.8, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: c:\Users\luabud\Apps\pvscc-logo, configfile: pytest.ini
collected 1 item
tests.py . [100%]
- generated xml file: C:\Users\luabud\AppData\Local\Temp\tmp-34824nVG8ptp2l1BN.xml -
============================== 1 passed in 6.66s ==============================
Error: Error: unsupported status (Running)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:20
- Comments:14 (1 by maintainers)
Top Results From Across the Web
VSCode pytest test discovery fails - python - Stack Overflow
I spent ages trying to decipher this unhelpful error after creating a test that had import errors. Verify that your test suite can...
Read more >Error: Unable to Start Debugging on the Web Server
When you try to debug an ASP.NET application running on a Web server, you may get this error message: Unable to start debugging...
Read more >The debugger cannot continue running the process. Operation ...
Click "Continue execution" in the "Break Mode" window; Error Dialog "The debugger cannot continue running the process. Operation not supported.
Read more >How to Debug Web API Problems in 4 Steps - Kill All Defects
In my experience, the most helpful thing to do is to determine where the error is occurring – if the client is sending...
Read more >Debugging JTAG - Texas Instruments
This page talks about how to properly debug JTAG connection issues with Texas Instruments XDS Debug Probes by providing a step-by-step ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m running version 1.56.0 and I’m getting this error every time I try to run a single test. When I try to “run all tests” it does work. Pytest version is 6.2.2.
Not here, I still have that error.