Tests: recurse into directories for finding OpenGL draw test .blends.

This commit is contained in:
Brecht Van Lommel
2018-09-28 14:09:42 +02:00
parent b030277e79
commit 6dd047c333
2 changed files with 6 additions and 5 deletions

View File

@@ -51,10 +51,11 @@ def print_message(message, type=None, status=''):
def blend_list(dirpath):
for filename in os.listdir(dirpath):
if filename.lower().endswith(".blend"):
filepath = os.path.join(dirpath, filename)
yield filepath
for root, dirs, files in os.walk(dirpath):
for filename in files:
if filename.lower().endswith(".blend"):
filepath = os.path.join(root, filename)
yield filepath
def test_get_name(filepath):