Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions python_files/vscode_pytest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self, message):
ERRORS = []
IS_DISCOVERY = False
map_id_to_path = {}
collected_tests_so_far = []
collected_tests_so_far = set()
TEST_RUN_PIPE = os.getenv("TEST_RUN_PIPE")
SYMLINK_PATH = None
INCLUDE_BRANCHES = False
Expand Down Expand Up @@ -175,7 +175,7 @@ def pytest_exception_interact(node, call, report):
report_value = "failure"
node_id = get_absolute_test_id(node.nodeid, get_node_path(node))
if node_id not in collected_tests_so_far:
collected_tests_so_far.append(node_id)
collected_tests_so_far.add(node_id)
item_result = create_test_outcome(
node_id,
report_value,
Expand Down Expand Up @@ -300,7 +300,7 @@ def pytest_report_teststatus(report, config): # noqa: ARG001
# Calculate the absolute test id and use this as the ID moving forward.
absolute_node_id = get_absolute_test_id(report.nodeid, node_path)
if absolute_node_id not in collected_tests_so_far:
collected_tests_so_far.append(absolute_node_id)
collected_tests_so_far.add(absolute_node_id)
item_result = create_test_outcome(
absolute_node_id,
report_value,
Expand Down Expand Up @@ -334,7 +334,7 @@ def pytest_runtest_protocol(item, nextitem): # noqa: ARG001
report_value = "skipped"
cwd = pathlib.Path.cwd()
if absolute_node_id not in collected_tests_so_far:
collected_tests_so_far.append(absolute_node_id)
collected_tests_so_far.add(absolute_node_id)
item_result = create_test_outcome(
absolute_node_id,
report_value,
Expand Down