Added support for test hierarchies (nested test suites) // Resolve #4135

This commit is contained in:
Ivan Kravets committed 2022-04-22 15:19:12 +03:00
1 parent 8edb5ffe20
commit e3533dcb01
3 files changed
+90 -18

No files matched your search

+4 -3
View File
@@ -171,9 +171,10 @@ def get_test_names(config):
if not os.path.isdir(test_dir):
raise TestDirNotExistsError(test_dir)
names = []
for item in sorted(os.listdir(test_dir)):
if os.path.isdir(os.path.join(test_dir, item)):
names.append(item)
for root, _, __ in os.walk(test_dir):
if not os.path.basename(root).startswith("test_"):
continue
names.append(os.path.relpath(root, test_dir))
if not names:
names = ["*"]
return names