From 6b5ab2328e17275e2887b3d5288ba920b0a8168f Mon Sep 17 00:00:00 2001 From: Evan Edmond <evan.edmond@ndcn.ox.ac.uk> Date: Wed, 31 Mar 2021 07:35:38 +0100 Subject: [PATCH] ENH: test creating images with Path objects --- tests/test_image.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_image.py b/tests/test_image.py index b7de2def2..80423b7ec 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -12,6 +12,8 @@ import json import os.path as op import itertools as it +from pathlib import Path + import pytest import numpy as np @@ -148,6 +150,8 @@ 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) # These should raise an error for fname, exc in shouldRaise: -- GitLab