Skip to content
Snippets Groups Projects
Commit 93b0ab27 authored by Eugine Blikh's avatar Eugine Blikh
Browse files

fixing broken version of find_tests. remove commented code

parent 9b9d9cc6
No related branches found
No related tags found
No related merge requests found
......@@ -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), [])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment