From b53daf110bc43eb3296f4e9ac71bd1ea1d470cbf Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Thu, 29 Jun 2023 15:22:19 -0700 Subject: [PATCH] fix bug where session path is undefined --- pythonFiles/vscode_pytest/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pythonFiles/vscode_pytest/__init__.py b/pythonFiles/vscode_pytest/__init__.py index 2aa2f6052d79..d699706dbbcf 100644 --- a/pythonFiles/vscode_pytest/__init__.py +++ b/pythonFiles/vscode_pytest/__init__.py @@ -399,9 +399,10 @@ def create_session_node(session: pytest.Session) -> TestNode: Keyword arguments: session -- the pytest session. """ + session_path = session.path if session.path else pathlib.Path.cwd() return { "name": session.name, - "path": session.path, + "path": session_path, "type_": "folder", "children": [], "id_": os.fspath(session.path),