This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Description
Environment data
- VS Code version: 1.35.1
- Extension version: 1.35.1
- OS and version: macOS 10.14.5
- Python version: 3.7.3
- Relevant/affected Python packages and their versions: pytest 4.6.3
- Jedi or Language Server? Jedi
Expected behaviour
Test results when running with debugger are identical to the results from a run without debugger.
Actual behaviour
Tests fail because subprocess can not be successfully executed when running tests with the debugger attached.
Steps to reproduce:
- Write a simple pytest (haven't tested with others) using
subprocesses and it's shell argument set to True
import subprocess
def test_subprocess():
result = subprocess.run(
' '.join(['echo', 'hello']),
shell=True
)
assert result.returncode == 0
- Run that test using the test explorer without debugging
- Result is green
- Run the same test again with debugger
- Result is red because
returncode is 2 (also stdout and stderr are empty)
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)