diff options
Diffstat (limited to 'tests/roof/utils.py')
-rw-r--r-- | tests/roof/utils.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/roof/utils.py b/tests/roof/utils.py new file mode 100644 index 0000000..eb389ed --- /dev/null +++ b/tests/roof/utils.py @@ -0,0 +1,13 @@ +import glob +import logging +import math +import os + +def get_filenames(path): + """Get all filenams from *path*, which could be a directory or a pattern + for matching files in a directory. + """ + if os.path.isdir(path): + path = os.path.join(path, '*') + + return sorted(glob.glob(path)) |