move paths calculation out one loop

This commit is contained in:
Chris MacNaughton
2019-01-30 11:50:10 +01:00
parent 774a49faef
commit a49dfb79c9
+5 -2
View File
@@ -45,9 +45,12 @@ def _add_tests():
for name, attributes in files.items():
# Lets make sure to only add tests for deployed applications
if name in deployed_applications:
paths = [
file['path'] for
file in attributes['files']
if "*" not in file["path"]
]
for file in attributes['files']:
paths = [file['path'] for file in attributes['files']]
paths = [path for path in paths if path[-1] is not "*"]
test_func = _make_test_function(name, file, paths=paths)
setattr(
cls,