From d4a1657b2e1dfcf24481d86856b00ddc1d6d1658 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 26 Dec 2020 04:03:19 +0100 Subject: [PATCH] Better error reporting --- test/refactor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/refactor.py b/test/refactor.py index 582beeb6..d9b5bc7f 100644 --- a/test/refactor.py +++ b/test/refactor.py @@ -82,9 +82,9 @@ def _collect_file_tests(code, path, lines_to_execute): yield RefactoringCase(name, first, line_nr, index, path, kwargs, type_, second) if match is None: - raise Exception("Didn't match any test") + raise Exception(f"Didn't match any test for {path}") if match.end() != len(code): - raise Exception("Didn't match until the end of the file in %s" % path) + raise Exception(f"Didn't match until the end of the file in {path}") def collect_dir_tests(base_dir, test_files):