Skip to content

Commit

Permalink
logging to check on failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Nov 21, 2024
1 parent a7f749b commit 415bf7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions python_files/tests/pytestadapter/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def runner_with_cwd_env(
os.mkfifo(pipe_name)
#################

print("beginning run request")
completed = threading.Event()

result = [] # result is a string array to store the data during threading
Expand Down
1 change: 1 addition & 0 deletions python_files/tests/pytestadapter/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def test_config_sub_folder():
session node is correctly updated to the common path.
"""
folder_path = helpers.TEST_DATA_PATH / "config_sub_folder"
print("running test_config_sub_folder")
actual = helpers.runner_with_cwd(
[
"--collect-only",
Expand Down
4 changes: 4 additions & 0 deletions python_files/vscode_pytest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def pytest_load_initial_conftests(early_config, parser, args): # noqa: ARG001
# set the reruns value, -1 if not set
global FLAKY_MAX_RUNS
FLAKY_MAX_RUNS = get_reruns_value(args)
print("Plugin info[vscode-pytest]: global FLAKY_MAX_RUNS set to: ", FLAKY_MAX_RUNS)

# check if --rootdir is in the args
for arg in args:
Expand Down Expand Up @@ -198,6 +199,7 @@ def pytest_exception_interact(node, call, report):

# flaky_max_runs != -1 means test is flaky
if flaky_max_runs != -1 and exec_count <= flaky_max_runs:
print("flaky test rerun: ", exec_count)
return
elif flaky_max_runs != -1 and exec_count > flaky_max_runs:
print("Plugin info[vscode-pytest]: max reruns reached.")
Expand Down Expand Up @@ -709,6 +711,8 @@ def build_nested_folders(
counter = 0
max_iter = 100
while iterator_path != session_node_path:
print("iterator_path: ", iterator_path)
print("session_node_path: ", session_node_path)
curr_folder_name = iterator_path.name
try:
curr_folder_node: TestNode = created_files_folders_dict[os.fspath(iterator_path)]
Expand Down

0 comments on commit 415bf7f

Please sign in to comment.