我正在尝试在Visual中运行单个unittest方法 工作室代码。但是,每次单击测试方法名称上方的“调试”突出显示时,当它开始运行visualstudio_py_testlauncher.py时,它都会出错。
因此,当我尝试运行测试时:
在这里我得到一个错误:
完整的堆栈跟踪:
Exception has occurred: TypeError
format_exception() missing 3 required positional arguments: 'etype', 'value', and 'tb'
File "C:\Users\ranni\.vscode\extensions\ms-python.python-2019.3.6558\pythonFiles\visualstudio_py_testlauncher.py", line 304, in main
errorMessage = traceback.format_exception()
File "C:\Users\ranni\.vscode\extensions\ms-python.python-2019.3.6558\pythonFiles\visualstudio_py_testlauncher.py", line 347, in <module>
main()
File "C:\Python37\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python37\Lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Python37\Lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
有人建议吗?