From 934e368896fc09913bc6dc9277863ba4a4cb036b Mon Sep 17 00:00:00 2001 From: Paula Camargo Date: Thu, 29 Jun 2023 16:33:45 -0700 Subject: [PATCH 1/2] Fix append in discovery.py --- pythonFiles/unittestadapter/discovery.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pythonFiles/unittestadapter/discovery.py b/pythonFiles/unittestadapter/discovery.py index ffcd2671addb..bf2a59523878 100644 --- a/pythonFiles/unittestadapter/discovery.py +++ b/pythonFiles/unittestadapter/discovery.py @@ -12,13 +12,10 @@ script_dir = pathlib.Path(__file__).parent.parent sys.path.append(os.fspath(script_dir)) -sys.path.append(os.fspath(script_dir / "lib" / "python")) +sys.path.insert(0, os.fspath(script_dir / "lib" / "python")) -from typing_extensions import Literal # Add the path to pythonFiles to sys.path to find testing_tools.socket_manager. -PYTHON_FILES = pathlib.Path(__file__).parent.parent -sys.path.insert(0, os.fspath(PYTHON_FILES)) from testing_tools import socket_manager @@ -26,9 +23,8 @@ from unittestadapter.utils import TestNode, build_test_tree, parse_unittest_args # Add the lib path to sys.path to find the typing_extensions module. -sys.path.insert(0, os.path.join(PYTHON_FILES, "lib", "python")) -from typing_extensions import NotRequired, TypedDict +from typing_extensions import NotRequired, TypedDict, Literal DEFAULT_PORT = "45454" From 9e209e0527ad4d0af10a0825aa22d32431eab57e Mon Sep 17 00:00:00 2001 From: Paula Camargo Date: Thu, 29 Jun 2023 16:38:30 -0700 Subject: [PATCH 2/2] remoce comments --- pythonFiles/unittestadapter/discovery.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pythonFiles/unittestadapter/discovery.py b/pythonFiles/unittestadapter/discovery.py index bf2a59523878..cbad40ad1838 100644 --- a/pythonFiles/unittestadapter/discovery.py +++ b/pythonFiles/unittestadapter/discovery.py @@ -14,16 +14,11 @@ sys.path.append(os.fspath(script_dir)) sys.path.insert(0, os.fspath(script_dir / "lib" / "python")) - -# Add the path to pythonFiles to sys.path to find testing_tools.socket_manager. - from testing_tools import socket_manager # If I use from utils then there will be an import error in test_discovery.py. from unittestadapter.utils import TestNode, build_test_tree, parse_unittest_args -# Add the lib path to sys.path to find the typing_extensions module. - from typing_extensions import NotRequired, TypedDict, Literal DEFAULT_PORT = "45454"