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
Extension version (available under the Extensions sidebar): 2020.2.64397
OS and version: MacOS 10.15.3
Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.4 (Conda 4.8.1)
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Docker Desktop for Mac 2.2.0
Relevant/affected Python packages and their versions: pytest 5.3.5
Relevant/affected Python-related VS Code extensions and their versions: Remote - Containers 0.101.1 Remote - SSH 0.49.0
Expected behaviour
Discovers pytest tests.
Actual behaviour
Test discovery fails. Pytest succeeds in CLI.
Steps to reproduce:
Suspects the problem occurs when some dependency module's API __del__ returns None
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Traceback (most recent call last):
File "/root/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/testing_tools/run_adapter.py", line 15, in <module>
main(tool, cmd, subargs, toolargs)
File "/root/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/testing_tools/adapter/__main__.py", line 87, in main
parents, result = run(toolargs, **subargs)
File "/root/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 39, in discover
raise Exception("pytest discovery failed (exit code {})".format(ec))
Exception: pytest discovery failed (exit code 2)
Exception ignored in: <function DepedencyApi.__del__ at 0x7fe187dea9e0>
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/dependency/module.py", line 179, in __del__
File "/opt/conda/lib/python3.7/site-packages/dependency/module.py", line 210, in close
TypeError: 'NoneType' object is not callable
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)
Traceback (most recent call last):
File "/root/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/testing_tools/run_adapter.py", line 15, in <module>
main(tool, cmd, subargs, toolargs)
File "/root/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/testing_tools/adapter/__main__.py", line 87, in main
parents, result = run(toolargs, **subargs)
File "/root/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 39, in discover
raise Exception("pytest discovery failed (exit code {})".format(ec))
Exception: pytest discovery failed (exit code 2)
Exception ignored in: <function DepedencyApi.__del__ at 0x7fe187dea9e0>
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/dependency/module.py", line 179, in __del__
File "/opt/conda/lib/python3.7/site-packages/dependency/module.py", line 210, in close
TypeError: 'NoneType' object is not callable
at ChildProcess.<anonymous> (/root/.vscode-server/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:455844)
at Object.onceWrapper (events.js:288:20)
at ChildProcess.emit (events.js:200:13)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Socket.emit (events.js:200:13)
at Pipe.<anonymous> (net.js:586:12)]
The text was updated successfully, but these errors were encountered:
@lseongjoo, anything written to stderr while discovery is running will cause it to fail. (Unlike pytest itself, the extension does not ignore failures.)
We have plans for making extraneous output a non-issue. See #6594. Until then, there isn't much we can do about this problem.
Environment data
Expected behaviour
Discovers pytest tests.
Actual behaviour
Test discovery fails. Pytest succeeds in CLI.
Steps to reproduce:
__del__
returns NoneLogs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: