lsp.py: Add missing check for non-interactive

This commit is contained in:
Marenz 2022-06-02 16:45:25 +02:00
parent 95f22db175
commit 9c4ea1dc68

View File

@ -643,7 +643,7 @@ class FileTestRunner:
finally: finally:
self.close_all_open_files() self.close_all_open_files()
def user_interaction_failed_method_test(self, testcase, actual, expected): def user_interaction_failed_method_test(self, testcase, actual, expected) -> TestResult:
actual_pretty = self.suite.replace_ranges_with_tags(actual, self.sub_dir) actual_pretty = self.suite.replace_ranges_with_tags(actual, self.sub_dir)
if expected is None: if expected is None:
@ -654,6 +654,9 @@ class FileTestRunner:
"\nbut got:\n" + actual_pretty "\nbut got:\n" + actual_pretty
) )
if self.suite.non_interactive:
return self.TestResult.SuccessOrIgnored
while True: while True:
print("(u)pdate/(r)etry/(i)gnore?") print("(u)pdate/(r)etry/(i)gnore?")
user_response = getCharFromStdin() user_response = getCharFromStdin()