Skip to content

Commit 44c3741

Browse files
- switched to simply disabling tests that fail, as BadTestsFinder
apparently needs further work to function reliably;
1 parent 93c4f87 commit 44c3741

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/coverup/coverup.py

+13-11
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,21 @@ def disable_interfering_tests() -> dict:
161161
except subprocess.CalledProcessError as e:
162162
failing_test = parse_failed_tests(args.tests_dir, e)[0]
163163

164-
btf = BadTestsFinder(tests_dir=args.tests_dir, pytest_args=args.pytest_args,
165-
trace=(print if args.debug else None))
166-
167-
# print(f"{failing_test} is failing, disabling it.")
168-
# failing_test.rename(failing_test.parent / ("disabled_" + failing_test.name))
169-
170-
print(f"{failing_test} is failing, looking for culprit(s)...")
171-
172-
if btf.run_tests({failing_test}) is not None:
173-
print(f"{failing_test} fails by itself(!)")
164+
if True:
165+
# just disable failing test(s) while we work on BTF
166+
print("test failed")
174167
culprits = {failing_test}
168+
175169
else:
176-
culprits = btf.find_culprit(failing_test, test_set=test_set)
170+
print(f"{failing_test} is failing, looking for culprit(s)...")
171+
btf = BadTestsFinder(tests_dir=args.tests_dir, pytest_args=args.pytest_args,
172+
trace=(print if args.debug else None))
173+
174+
if btf.run_tests({failing_test}) == {failing_test}:
175+
print(f"{failing_test} fails by itself(!)")
176+
culprits = {failing_test}
177+
else:
178+
culprits = btf.find_culprit(failing_test, test_set=test_set)
177179

178180
for c in culprits:
179181
print(f"Disabling {c}")

0 commit comments

Comments
 (0)