From fbec4cbe44fb17fba52047db1682dd537f2c78ab Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Sat, 7 Jul 2018 12:49:13 +0100
Subject: [PATCH] TEST: Unit test for allFiles

---
 tests/test_fsl_utils_path.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/test_fsl_utils_path.py b/tests/test_fsl_utils_path.py
index 9a567396f..7016bfb9a 100644
--- a/tests/test_fsl_utils_path.py
+++ b/tests/test_fsl_utils_path.py
@@ -110,6 +110,21 @@ def test_shallowest():
         assert fslpath.shallowest(path, suffixes) == output
 
 
+def test_allFiles():
+    create = [
+        'a/1',
+        'a/2',
+        'a/b/1',
+        'a/b/2',
+        'a/b/c/1',
+        'a/b/d/1',
+    ]
+
+    with testdir(create) as td:
+        assert fslpath.allFiles('.') == [op.join('.', c) for c in create]
+        assert fslpath.allFiles(td)  == [op.join(td,  c) for c in create]
+
+
 def test_hasExt():
 
     tests = [
-- 
GitLab