Skip to content

Commit

Permalink
Test helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ogenstad committed Oct 26, 2016
1 parent c8ebe3d commit a1777eb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/ntc_template_test_helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Helper functions for testing."""
import glob


def return_test_files():
"""Return a list of all the *.raw files to run tests against."""
platform_dirs = glob.glob('tests/*')

platforms = []
for platform in platform_dirs:
platforms.append(glob.glob('%s/*' % platform))

template_dirs = [item for sublist in platforms for item in sublist]

test_commands = []
for template_dir in template_dirs:
test_commands.append(glob.glob('%s/*.raw' % template_dir))

return [item for sublist in test_commands for item in sublist]

0 comments on commit a1777eb

Please sign in to comment.