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
The Python extension has run into an unexpected situation
while processing a pytest node during test discovery. Please
Please open an issue at:
https://github.com/microsoft/vscode-python/issues
and paste the following output there.
traceback:
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/run_adapter.py", line 22, in
main(tool, cmd, subargs, toolargs)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/main.py", line 100, in main
parents, result = run(toolargs, **subargs)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 30, in discover
ec = _pytest_main(pytestargs, [_plugin])
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/config/init.py", line 162, in main
ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main
return wrap_session(config, _main)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 269, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 322, in _main
config.hook.pytest_collection(session=session)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 333, in pytest_collection
session.perform_collect()
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 641, in perform_collect
hook.pytest_collection_finish(session=self)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 107, in pytest_collection_finish
test, parents = self.parse_item(item)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 77, in parse_item
return parse_item(item)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 161, in parse_item
(nodeid, parents, fileid, testfunc, parameterized) = _parse_node_id(
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 144, in
_parse_node_id=(lambda *a: _parse_node_id(*a)),
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 382, in _parse_node_id
testid, name, kind = next(nodes)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 479, in _iter_nodes
raise should_never_reach_here(
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 132, in should_never_reach_here
traceback.print_stack()
The text was updated successfully, but these errors were encountered:
Environment data
python.languageServer
setting: Pylance v2021.10.3Expected behaviour
Can discover python test case
Actual behaviour
Fail to discover python test case
Steps to reproduce:
The python code
validparentheses.py
The test code
Logs
nodeid: ./problem/20/test_validparentheses.py::test_validparentheses[(]-False]
traceback:
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/run_adapter.py", line 22, in
main(tool, cmd, subargs, toolargs)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/main.py", line 100, in main
parents, result = run(toolargs, **subargs)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 30, in discover
ec = _pytest_main(pytestargs, [_plugin])
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/config/init.py", line 162, in main
ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main
return wrap_session(config, _main)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 269, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 322, in _main
config.hook.pytest_collection(session=session)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 333, in pytest_collection
session.perform_collect()
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/_pytest/main.py", line 641, in perform_collect
hook.pytest_collection_finish(session=self)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/opt/pyenv/versions/leetcode/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 107, in pytest_collection_finish
test, parents = self.parse_item(item)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 77, in parse_item
return parse_item(item)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 161, in parse_item
(nodeid, parents, fileid, testfunc, parameterized) = _parse_node_id(
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 144, in
_parse_node_id=(lambda *a: _parse_node_id(*a)),
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 382, in _parse_node_id
testid, name, kind = next(nodes)
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 479, in _iter_nodes
raise should_never_reach_here(
File "/home/yaekee/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/testing_tools/adapter/pytest/_pytest_item.py", line 132, in should_never_reach_here
traceback.print_stack()
The text was updated successfully, but these errors were encountered: