From b0f22a54c4c6f45f173b91d051b34d176cbab629 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 11 Jan 2019 14:53:15 +0100 Subject: uitest: fail early in case a test file would be ignored So the mistake I did in commit 457acbfa304ac8bda0755c9ca8f1e1e22e490ac8 (UITest_writer_tests: split this into 4 parts, 2018-07-03) does not happen again. Change-Id: Ia28ed1fe9909d9c46ebe95d3a1926b0dced46140 Reviewed-on: https://gerrit.libreoffice.org/66180 Reviewed-by: Markus Mohrhard Tested-by: Jenkins Reviewed-by: Miklos Vajna --- uitest/test_main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'uitest') diff --git a/uitest/test_main.py b/uitest/test_main.py index 934b27790961..bbfb8ad57072 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -45,9 +45,9 @@ def find_test_files(dir_path): if not os.path.isfile(file_path): continue - # ignore any non .py files + # fail on any non .py files if not os.path.splitext(file_path)[1] == ".py": - continue + raise Exception("file with an extension which is not .py: " + file_path) # ignore the __init__.py file # it is obviously not a test file -- cgit