Closed MalteBecker closed 5 months ago
Hello! Could your include your full logs from the python
output channel with the log level at trace? With these I can better help figure out what might be going wrong. Thanks
Hello! Could your include your full logs from the
python
output channel with the log level at trace? With these I can better help figure out what might be going wrong. Thanks
Hey, thanks for your answer. Here are the logs:
Please let me know if you need more information.
Hi! From your logs I see 2024-03-28 08:31:11.723 [info] > "C:\Program Files\Python311\python.exe" ~\.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear test.py
which is pointing towards our non-rewrite code. Could you try it in the rewrite and let me know if that fixes the problem:
To try it yourself, add this setting to your users settings.json
: "python.experiments.optInto": ["pythonTestAdapter"]
.
You can confirm you have the rewrite enabled by setting "python.analysis.logLevel": "Trace",
in your user settings then check for Experiment 'pythonTestAdapter'
is active in your python logs.
Thanks
Hello! I am closing this issue since we have not heard back on the above question, please comment with the requested information if you are still experiencing this problem and I can re-open it. Thanks
Type: Bug
Behaviour
Expected vs. Actual
I get the Error
TypeError: Cannot read properties of null (reading 'testsuites')
when using the debug option in the test explorer and using the multiprocessing module. If I just execute the test, I don´t get the error.I first created this bug at debugpy, but they ask to create it here because it looks like a typescript error: https://github.com/microsoft/debugpy/issues/1537
Steps to reproduce:
VALUES = [1, 2, 3, 4]
def do_something(bla: int): time.sleep(bla)
def test_multi(): with Pool() as pool: pool.map(do_something, VALUES)
def test_for(): for val in VALUES: do_something(val)
2024-03-13 08:40:33.923 [info] Telemetry level is off 2024-03-13 08:40:33.923 [info] Experiments are disabled, only manually opted experiments are active. 2024-03-13 08:40:33.923 [info] Default formatter is set to ms-python.black-formatter for workspace d:\git\pytest_error 2024-03-13 08:40:33.923 [info] Test server listening. 2024-03-13 08:40:33.924 [info] Python interpreter path: C:\Program Files\Python39\python.exe 2024-03-13 08:40:36.605 [info] Starting Pylance language server. 2024-03-13 08:41:09.657 [info] Discover tests for workspace name: pytest_error - uri: d:\git\pytest_error\test.py 2024-03-13 08:41:09.698 [info] > "C:\Program Files\Python39\python.exe" ~.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear test.py 2024-03-13 08:41:09.698 [info] cwd: . 2024-03-13 08:41:13.459 [info] Discover tests for workspace name: pytest_error - uri: d:\git\pytest_error\test.py 2024-03-13 08:41:13.487 [info] > "C:\Program Files\Python39\python.exe" ~.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear test.py 2024-03-13 08:41:13.488 [info] cwd: . 2024-03-13 08:47:18.574 [info] Discover tests for workspace name: pytest_error - uri: d:\git\pytest_error\test.py 2024-03-13 08:47:18.622 [info] > "C:\Program Files\Python39\python.exe" ~.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear test.py 2024-03-13 08:47:18.622 [info] cwd: . 2024-03-13 08:47:19.942 [info] Discover tests for workspace name: pytest_error - uri: d:\git\pytest_error 2024-03-13 08:47:19.994 [info] > "C:\Program Files\Python39\python.exe" ~.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\testing_tools\run_adapter.py discover pytest -- --rootdir . -s --cache-clear test.py 2024-03-13 08:47:19.994 [info] cwd: . 2024-03-13 08:47:22.587 [info] Using launch configuration in launch.json file. 2024-03-13 08:47:25.084 [info] Send text to terminal: & 'C:\Program Files\Python39\python.exe' 'c:\Users\MalteB.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '56011' '--' 'c:\Users\MalteB.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\testlauncher.py' 'd:\git\pytest_error' 'pytest' '--rootdir' 'd:\git\pytest_error' '--override-ini' 'junit_family=xunit1' '--junit-xml=C:\Users\MalteB\AppData\Local\Temp\tmp-24632zzJXToPkg4FX.xml' '--capture' 'no' './test.py::test_multi'
languageServer: "Pylance"
testing • pytestArgs: ""
• pytestEnabled: true