diff --git a/tests/test_fsl_utils_path.py b/tests/test_fsl_utils_path.py
index 7016bfb9ab2ae3823d18894069982f31ec8da140..6bb54fcd8b55ab2b78225b5d2d2d26a9e1e8ac2a 100644
--- a/tests/test_fsl_utils_path.py
+++ b/tests/test_fsl_utils_path.py
@@ -121,8 +121,10 @@ def test_allFiles():
     ]
 
     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]
+        assert (sorted(fslpath.allFiles('.')) ==
+                sorted([op.join('.', c) for c in create]))
+        assert (sorted(fslpath.allFiles(td))  ==
+                sorted([op.join(td,  c) for c in create]))
 
 
 def test_hasExt():