diff --git a/test/lib/tarantool_server.py b/test/lib/tarantool_server.py index f1cfc5b3a62b94932eb8d4c90692011d8983ad1c..a70c4db89b0f2455d38e3fdd0cb0d3cf7fcdf749 100644 --- a/test/lib/tarantool_server.py +++ b/test/lib/tarantool_server.py @@ -467,21 +467,12 @@ class TarantoolServer(Server): def find_tests(self, test_suite, suite_path): def patterned(test, patterns): + answer = [] for i in patterns: if test.name.find(i) != -1: - return True - return False - - for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test.py"))): - for test_pattern in test_suite.args.tests: - if test_name.find(test_pattern) != -1: - test_suite.tests.append(PythonTest(test_name, test_suite.args, test_suite.ini)) - - for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test.lua"))): - for test_pattern in test_suite.args.tests: - if test_name.find(test_pattern) != -1: - test_suite.tests.append(LuaTest(test_name, test_suite.args, test_suite.ini)) - -# tests = [PythonTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.py" )))] -# tests += [LuaTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.lua")))] -# test_suite.tests = filter((lambda x: patterned(x, test_suite.args.tests)), tests) + answer.append(test) + return answer + + tests = [PythonTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.py" )))] + tests += [LuaTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.lua")))] + test_suite.tests = sum(map((lambda x: patterned(x, test_suite.args.tests)), tests), [])