diff --git a/tests/test_image.py b/tests/test_image.py
index 80423b7ec43dddff70ee780e75d9ea63594627e2..e2e7f213f0d7c791737c62ceb9eaa57a75f42344 100644
--- a/tests/test_image.py
+++ b/tests/test_image.py
@@ -150,8 +150,7 @@ def test_load():
         # Not raising an error means the test passes
         for fname in shouldPass:
             fslimage.Image(op.join(testdir, fname))
-            testpath = Path(testdir) / fname
-            fslimage.Image(testpath)
+            fslimage.Image(Path(testdir) / fname)
 
         # These should raise an error
         for fname, exc in shouldRaise: