From c0d70785a6033327ac0f785fff598d3676c6ae13 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 5 Nov 2024 12:42:41 -0800 Subject: [PATCH 01/10] Attempting to fix the type check error We seem to be getting intermittent type check error around `attr`. --- launchable/utils/sax.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launchable/utils/sax.py b/launchable/utils/sax.py index 8687101e7..9ed952e5f 100644 --- a/launchable/utils/sax.py +++ b/launchable/utils/sax.py @@ -3,7 +3,7 @@ from typing import Callable, Dict, List, Optional from xml.sax import make_parser from xml.sax.handler import ContentHandler - +from xml.sax.xmlreader import AttributesImpl import click @@ -22,7 +22,7 @@ class Element: # tags captured at this context # tags: Dict[str,object] - def __init__(self, parent: 'Element', name: str, attrs): + def __init__(self, parent: 'Element', name: str, attrs: AttributesImpl): self.name = name self.attrs = attrs self.parent = parent @@ -52,7 +52,7 @@ def __init__(self, element: str, attr: str, var: str): self.attr = attr self.var = var - def matches(self, e: Element) -> str: + def matches(self, e: Element) -> Optional[str]: return e.attrs.get( self.attr) if self.element == e.name or self.element == "*" else None From 2df6616fe716fd892db744d8fa1694a503da4f1b Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 5 Nov 2024 14:11:12 -0800 Subject: [PATCH 02/10] Attempting to track down the flakiness --- tests/commands/test_split_subset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/commands/test_split_subset.py b/tests/commands/test_split_subset.py index 71114126e..0a129ea22 100644 --- a/tests/commands/test_split_subset.py +++ b/tests/commands/test_split_subset.py @@ -189,9 +189,11 @@ def test_split_by_group_names(self): self.assert_success(result) # this test is flaky -- let's see what's going on + print("println debugging of a flaky test---") print(result.stdout) for item in os.listdir(tmpdir): print(item) + print("--- till here") with open(os.path.join(tmpdir, "subset-e2e.txt")) as f: self.assertEqual(f.read(), "e2e-aaa.py\ne2e-bbb.py") From 570eb9e507ea63e8e405c4a0bf522b6da341e7cf Mon Sep 17 00:00:00 2001 From: Ryosuke Yabuki Date: Wed, 6 Nov 2024 11:37:32 +0900 Subject: [PATCH 03/10] add comments --- tests/commands/test_split_subset.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tests/commands/test_split_subset.py b/tests/commands/test_split_subset.py index 0a129ea22..f99da4381 100644 --- a/tests/commands/test_split_subset.py +++ b/tests/commands/test_split_subset.py @@ -166,20 +166,18 @@ def test_split_by_group_names(self): with open("{}/subset-e2e.txt".format(tmpdir)) as f: self.assertEqual(f.read(), "e2e-aaa.py\ne2e-bbb.py") - self.assertFalse(os.path.exists("{}/rest-e2e.txt".format(tmpdir))) - - self.assertFalse(os.path.exists("{}/subset-unit-test.txt".format(tmpdir))) - - self.assertFalse(os.path.exists("{}/rest-unit-test.txt".format(tmpdir))) - with open("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME)) as f: self.assertEqual(f.read(), "aaa.py\nbbb.py") - self.assertFalse(os.path.exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME))) - with open("{}/{}".format(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME)) as f: self.assertEqual(f.read(), "e2e") + # server doesn't return subset of unit-test + self.assertFalse(os.path.exists("{}/subset-unit-test.txt".format(tmpdir))) + # doesn't set the --rest option + self.assertFalse(os.path.exists("{}/rest-e2e.txt".format(tmpdir))) + self.assertFalse(os.path.exists("{}/rest-unit-test.txt".format(tmpdir))) + self.assertFalse(os.path.exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME))) self.assertFalse(os.path.exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME))) # with rest option @@ -200,7 +198,7 @@ def test_split_by_group_names(self): with open(os.path.join(tmpdir, "rest-e2e.txt")) as f: self.assertEqual(f.read(), "e2e-ccc.py\ne2e-ddd.py") - + # server doesn't return subset of unit-test self.assertFalse(os.path.exists("{}/subset-unit-test.txt".format(tmpdir))) with open(os.path.join(tmpdir, "rest-unit-test.txt")) as f: @@ -215,6 +213,7 @@ def test_split_by_group_names(self): with open(os.path.join(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME)) as f: self.assertEqual(f.read(), "e2e") + # TODO(Konboi): Why wasn't e2e included in the rest file? with open(os.path.join(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME)) as f: self.assertEqual(f.read(), "unit-test") @@ -275,19 +274,22 @@ def test_split_by_group_names_output_exclusion_rules(self): "--split-by-groups", "--split-by-groups-output-dir", tmpdir, '--output-exclusion-rules', "file") self.assert_success(result) + + # --output-exclusion-rules is enabled, thus switched subset and rest with open("{}/subset-e2e.txt".format(tmpdir)) as f: self.assertCountEqual(f.read().splitlines(), ["e2e-ccc.py", "e2e-ddd.py", ]) - self.assertFalse(os.path.exists("{}/rest-e2e.txt".format(tmpdir))) - with open("{}/subset-unit-test.txt".format(tmpdir)) as f: self.assertCountEqual(f.read().splitlines(), ["unit-test-111.py", "unit-test-222.py"]) - self.assertFalse(os.path.exists("{}/rest-unit-test.txt".format(tmpdir))) with open("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME)) as f: self.assertCountEqual(f.read().splitlines(), ["111.py", "222.py"]) - self.assertFalse(os.path.exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME))) with open("{}/{}".format(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME)) as f: self.assertEqual(f.read(), "unit-test") + + # doesn't set the --rest option + self.assertFalse(os.path.exists("{}/rest-e2e.txt".format(tmpdir))) + self.assertFalse(os.path.exists("{}/rest-unit-test.txt".format(tmpdir))) + self.assertFalse(os.path.exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME))) self.assertFalse(os.path.exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME))) From 147330a02d25d424ae5594b0a44806c498802b8f Mon Sep 17 00:00:00 2001 From: Ryosuke Yabuki Date: Wed, 6 Nov 2024 11:51:31 +0900 Subject: [PATCH 04/10] refactor tests --- tests/cli_test_case.py | 7 +++ tests/commands/test_split_subset.py | 74 +++++++++++------------------ 2 files changed, 34 insertions(+), 47 deletions(-) diff --git a/tests/cli_test_case.py b/tests/cli_test_case.py index e3e2561d6..9fe24536a 100644 --- a/tests/cli_test_case.py +++ b/tests/cli_test_case.py @@ -216,6 +216,13 @@ def assert_success(self, result: click.testing.Result): def assert_exit_code(self, result: click.testing.Result, expected: int): self.assertEqual(result.exit_code, expected, result.stdout) + def assert_contents(self, file_path: str, content: str): + with open(file_path) as f: + self.assertEqual(f.read(), content) + + def assert_file_exists(self, file_path: str, exists: bool = True): + self.assertEqual(Path(file_path).exists(), exists) + def find_request(self, url_suffix: str, n: int = 0): '''Find the first (or n-th, if specified) request that matches the given suffix''' for call in responses.calls: diff --git a/tests/commands/test_split_subset.py b/tests/commands/test_split_subset.py index f99da4381..914f537fe 100644 --- a/tests/commands/test_split_subset.py +++ b/tests/commands/test_split_subset.py @@ -163,22 +163,19 @@ def test_split_by_group_names(self): "--split-by-groups", "--split-by-groups-output-dir", tmpdir, "file") self.assert_success(result) - with open("{}/subset-e2e.txt".format(tmpdir)) as f: - self.assertEqual(f.read(), "e2e-aaa.py\ne2e-bbb.py") - - with open("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME)) as f: - self.assertEqual(f.read(), "aaa.py\nbbb.py") - - with open("{}/{}".format(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME)) as f: - self.assertEqual(f.read(), "e2e") + self.assert_contents("{}/subset-e2e.txt".format(tmpdir), "e2e-aaa.py\ne2e-bbb.py") + self.assert_contents("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME), "aaa.py\nbbb.py") + # check the group file + self.assert_contents("{}/{}".format(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME), "e2e") # server doesn't return subset of unit-test - self.assertFalse(os.path.exists("{}/subset-unit-test.txt".format(tmpdir))) + self.assert_file_exists("{}/subset-unit-test.txt".format(tmpdir), False) + # doesn't set the --rest option - self.assertFalse(os.path.exists("{}/rest-e2e.txt".format(tmpdir))) - self.assertFalse(os.path.exists("{}/rest-unit-test.txt".format(tmpdir))) - self.assertFalse(os.path.exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME))) - self.assertFalse(os.path.exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME))) + self.assert_file_exists("{}/rest-e2e.txt".format(tmpdir), False) + self.assert_file_exists("{}/rest-unit-test.txt".format(tmpdir), False) + self.assert_file_exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME), False) + self.assert_file_exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME), False) # with rest option with tempfile.TemporaryDirectory() as tmpdir: @@ -193,29 +190,19 @@ def test_split_by_group_names(self): print(item) print("--- till here") - with open(os.path.join(tmpdir, "subset-e2e.txt")) as f: - self.assertEqual(f.read(), "e2e-aaa.py\ne2e-bbb.py") + self.assert_contents("{}/subset-e2e.txt".format(tmpdir), "e2e-aaa.py\ne2e-bbb.py") + self.assert_contents("{}/rest-e2e.txt".format(tmpdir), "e2e-ccc.py\ne2e-ddd.py") - with open(os.path.join(tmpdir, "rest-e2e.txt")) as f: - self.assertEqual(f.read(), "e2e-ccc.py\ne2e-ddd.py") # server doesn't return subset of unit-test - self.assertFalse(os.path.exists("{}/subset-unit-test.txt".format(tmpdir))) - - with open(os.path.join(tmpdir, "rest-unit-test.txt")) as f: - self.assertEqual(f.read(), "unit-test-111.py\nunit-test-222.py") - - with open(os.path.join(tmpdir, "subset-{}.txt".format(SPLIT_BY_GROUPS_NO_GROUP_NAME))) as f: - self.assertEqual(f.read(), "aaa.py\nbbb.py") + self.assert_file_exists("{}/subset-unit-test.txt".format(tmpdir), False) + self.assert_contents("{}/rest-unit-test.txt".format(tmpdir), "unit-test-111.py\nunit-test-222.py") - with open(os.path.join(tmpdir, "rest-{}.txt".format(SPLIT_BY_GROUPS_NO_GROUP_NAME))) as f: - self.assertEqual(f.read(), "111.py\n222.py") + self.assert_contents("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME), "aaa.py\nbbb.py") + self.assert_contents("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME), "111.py\n222.py") - with open(os.path.join(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME)) as f: - self.assertEqual(f.read(), "e2e") - - # TODO(Konboi): Why wasn't e2e included in the rest file? - with open(os.path.join(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME)) as f: - self.assertEqual(f.read(), "unit-test") + # check the group file + self.assert_contents("{}/{}".format(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME), "e2e") + self.assert_contents("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME), "unit-test") @responses.activate @mock.patch.dict(os.environ, {"LAUNCHABLE_TOKEN": CliTestCase.launchable_token}) @@ -276,20 +263,13 @@ def test_split_by_group_names_output_exclusion_rules(self): self.assert_success(result) # --output-exclusion-rules is enabled, thus switched subset and rest - with open("{}/subset-e2e.txt".format(tmpdir)) as f: - self.assertCountEqual(f.read().splitlines(), ["e2e-ccc.py", "e2e-ddd.py", ]) - - with open("{}/subset-unit-test.txt".format(tmpdir)) as f: - self.assertCountEqual(f.read().splitlines(), ["unit-test-111.py", "unit-test-222.py"]) - - with open("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME)) as f: - self.assertCountEqual(f.read().splitlines(), ["111.py", "222.py"]) - - with open("{}/{}".format(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME)) as f: - self.assertEqual(f.read(), "unit-test") + self.assert_contents("{}/subset-e2e.txt".format(tmpdir), "e2e-ccc.py\ne2e-ddd.py") + self.assert_contents("{}/subset-unit-test.txt".format(tmpdir), "unit-test-111.py\nunit-test-222.py") + self.assert_contents("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME), "111.py\n222.py") + self.assert_contents("{}/{}".format(tmpdir, SPLIT_BY_GROUP_SUBSET_GROUPS_FILE_NAME), "unit-test") # doesn't set the --rest option - self.assertFalse(os.path.exists("{}/rest-e2e.txt".format(tmpdir))) - self.assertFalse(os.path.exists("{}/rest-unit-test.txt".format(tmpdir))) - self.assertFalse(os.path.exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME))) - self.assertFalse(os.path.exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME))) + self.assert_file_exists("{}/rest-e2e.txt".format(tmpdir), False) + self.assert_file_exists("{}/rest-unit-test.txt".format(tmpdir), False) + self.assert_file_exists("{}/rest-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME), False) + self.assert_file_exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME), False) From 266e3c1038d9137189c0c444d458c9acb100ba49 Mon Sep 17 00:00:00 2001 From: Ryosuke Yabuki Date: Wed, 6 Nov 2024 11:58:41 +0900 Subject: [PATCH 05/10] for debug --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2ce4fbb93..457f7f847 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -11,7 +11,7 @@ on: - 'WORKSPACE' - 'src/**' pull_request: - branches: [ main ] + branches: [ main, type-error-fix ] paths-ignore: - 'WORKSPACE' - 'src/**' From 1b821d4eb6b8f52d1ca121ce9513909ed8d7a45a Mon Sep 17 00:00:00 2001 From: Ryosuke Yabuki Date: Wed, 6 Nov 2024 12:04:44 +0900 Subject: [PATCH 06/10] add prefix to avoid conflict --- tests/commands/test_split_subset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/commands/test_split_subset.py b/tests/commands/test_split_subset.py index 914f537fe..37b3d1b7a 100644 --- a/tests/commands/test_split_subset.py +++ b/tests/commands/test_split_subset.py @@ -178,7 +178,7 @@ def test_split_by_group_names(self): self.assert_file_exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME), False) # with rest option - with tempfile.TemporaryDirectory() as tmpdir: + with tempfile.TemporaryDirectory(prefix="rest") as tmpdir: result = self.cli("split-subset", "--subset-id", "subset/{}".format(self.subsetting_id), "--split-by-groups-with-rest", "--split-by-groups-output-dir", tmpdir, "file") From 20dd6aad476bb69a8970f594bd968fcdd9e9d251 Mon Sep 17 00:00:00 2001 From: Ryosuke Yabuki Date: Wed, 6 Nov 2024 12:08:50 +0900 Subject: [PATCH 07/10] Don't know the cause, but in the Python 3.10 environment, we need to call responses.replace each time. --- tests/commands/test_split_subset.py | 45 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/tests/commands/test_split_subset.py b/tests/commands/test_split_subset.py index 37b3d1b7a..c2ab4f7c9 100644 --- a/tests/commands/test_split_subset.py +++ b/tests/commands/test_split_subset.py @@ -1,4 +1,5 @@ import os +import pprint import tempfile from unittest import mock @@ -146,23 +147,31 @@ def test_split_by_group_names(self): ] } - responses.replace( - responses.POST, - "{base_url}/intake/organizations/{organization}/workspaces/{workspace}/subset/{subset_id}/split-by-groups".format( - base_url=get_base_url(), - organization=self.organization, - workspace=self.workspace, - subset_id=self.subsetting_id, - ), - json=mock_json_response, - status=200 - ) + """ + Note(Konboi): + Don't know the cause, but in the Python 3.10 environment, + the settings configured with responses.replace disappear on the second call. + see: https://github.com/launchableinc/cli/actions/runs/11697720998/job/32576899978#step:10:88 + So, to call it each time, `replace_response` was defined. + """ + def replace_response(): + responses.replace( + responses.POST, + "{base_url}/intake/organizations/{organization}/workspaces/{workspace}/subset/{subset_id}/split-by-groups".format( + base_url=get_base_url(), + organization=self.organization, + workspace=self.workspace, + subset_id=self.subsetting_id, + ), + json=mock_json_response, + status=200 + ) with tempfile.TemporaryDirectory() as tmpdir: + replace_response() result = self.cli("split-subset", "--subset-id", "subset/{}".format(self.subsetting_id), "--split-by-groups", "--split-by-groups-output-dir", tmpdir, "file") - self.assert_success(result) self.assert_contents("{}/subset-e2e.txt".format(tmpdir), "e2e-aaa.py\ne2e-bbb.py") self.assert_contents("{}/subset-{}.txt".format(tmpdir, SPLIT_BY_GROUPS_NO_GROUP_NAME), "aaa.py\nbbb.py") # check the group file @@ -178,18 +187,12 @@ def test_split_by_group_names(self): self.assert_file_exists("{}/{}".format(tmpdir, SPLIT_BY_GROUP_REST_GROUPS_FILE_NAME), False) # with rest option - with tempfile.TemporaryDirectory(prefix="rest") as tmpdir: + with tempfile.TemporaryDirectory() as tmpdir: + replace_response() result = self.cli("split-subset", "--subset-id", "subset/{}".format(self.subsetting_id), - "--split-by-groups-with-rest", "--split-by-groups-output-dir", tmpdir, "file") + "--split-by-groups-with-rest", "--split-by-groups-output-dir", tmpdir, "file", mix_stderr=False) self.assert_success(result) - # this test is flaky -- let's see what's going on - print("println debugging of a flaky test---") - print(result.stdout) - for item in os.listdir(tmpdir): - print(item) - print("--- till here") - self.assert_contents("{}/subset-e2e.txt".format(tmpdir), "e2e-aaa.py\ne2e-bbb.py") self.assert_contents("{}/rest-e2e.txt".format(tmpdir), "e2e-ccc.py\ne2e-ddd.py") From c92a645d20f8e9c0fd0eade7ec31cd34f1711b32 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Wed, 6 Nov 2024 07:48:04 -0800 Subject: [PATCH 08/10] Removing this as instructed by Konboi --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 457f7f847..2ce4fbb93 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -11,7 +11,7 @@ on: - 'WORKSPACE' - 'src/**' pull_request: - branches: [ main, type-error-fix ] + branches: [ main ] paths-ignore: - 'WORKSPACE' - 'src/**' From e7ded9a3c0000ea707e1665507a0d1ff351505d2 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 5 Nov 2024 12:42:41 -0800 Subject: [PATCH 09/10] Attempting to fix the type check error We seem to be getting intermittent type check error around `attr`. --- launchable/utils/sax.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launchable/utils/sax.py b/launchable/utils/sax.py index 8687101e7..9ed952e5f 100644 --- a/launchable/utils/sax.py +++ b/launchable/utils/sax.py @@ -3,7 +3,7 @@ from typing import Callable, Dict, List, Optional from xml.sax import make_parser from xml.sax.handler import ContentHandler - +from xml.sax.xmlreader import AttributesImpl import click @@ -22,7 +22,7 @@ class Element: # tags captured at this context # tags: Dict[str,object] - def __init__(self, parent: 'Element', name: str, attrs): + def __init__(self, parent: 'Element', name: str, attrs: AttributesImpl): self.name = name self.attrs = attrs self.parent = parent @@ -52,7 +52,7 @@ def __init__(self, element: str, attr: str, var: str): self.attr = attr self.var = var - def matches(self, e: Element) -> str: + def matches(self, e: Element) -> Optional[str]: return e.attrs.get( self.attr) if self.element == e.name or self.element == "*" else None From a12625cf61085b82edbbcc8ff29d2b04f4903638 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 5 Nov 2024 14:11:12 -0800 Subject: [PATCH 10/10] Attempting to track down the flakiness --- tests/commands/test_split_subset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/commands/test_split_subset.py b/tests/commands/test_split_subset.py index 71114126e..0a129ea22 100644 --- a/tests/commands/test_split_subset.py +++ b/tests/commands/test_split_subset.py @@ -189,9 +189,11 @@ def test_split_by_group_names(self): self.assert_success(result) # this test is flaky -- let's see what's going on + print("println debugging of a flaky test---") print(result.stdout) for item in os.listdir(tmpdir): print(item) + print("--- till here") with open(os.path.join(tmpdir, "subset-e2e.txt")) as f: self.assertEqual(f.read(), "e2e-aaa.py\ne2e-bbb.py")