Skip to content

Commit 3ae7562

Browse files
committed
fix: remove pytest/xfail test marks
1 parent 053a8b5 commit 3ae7562

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

nitransforms/io/fsl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def from_string(cls, string):
6868
if not lines or len(lines) < 4:
6969
raise TransformFileError
7070

71-
print(lines)
7271
sa["parameters"] = np.genfromtxt(
7372
["\n".join(lines)], dtype=cls.dtype["parameters"]
7473
)

nitransforms/tests/test_io.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def test_LT_conversions(data_path, fname):
165165
assert np.allclose(r2r_m, v2v_m, rtol=1e-04)
166166

167167

168-
@pytest.mark.xfail(raises=(FileNotFoundError, NotImplementedError))
169168
@pytest.mark.parametrize(
170169
"image_orientation",
171170
[
@@ -177,6 +176,9 @@ def test_LT_conversions(data_path, fname):
177176
)
178177
@pytest.mark.parametrize("sw", ["afni", "fsl", "fs", "itk"])
179178
def test_Linear_common(tmpdir, data_path, sw, image_orientation, get_testdata):
179+
if (image_orientation, sw) == ("oblique", "afni"):
180+
pytest.skip("AFNI Deoblique unsupported.")
181+
180182
tmpdir.chdir()
181183

182184
moving = get_testdata[image_orientation]

nitransforms/tests/test_linear.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@ def test_loadsave(tmp_path, data_path, testdata_path, fmt):
139139
assert xfm == nitl.load(fname, fmt=fmt, reference=ref_file)
140140

141141

142-
@pytest.mark.xfail(reason="Not fully implemented")
143142
@pytest.mark.parametrize("image_orientation", ["RAS", "LAS", "LPS", "oblique"])
144143
@pytest.mark.parametrize("sw_tool", ["itk", "fsl", "afni", "fs"])
145144
def test_linear_save(tmpdir, data_path, get_testdata, image_orientation, sw_tool):
146145
"""Check implementation of exporting affines to formats."""
146+
if (image_orientation, sw_tool) == ("oblique", "afni"):
147+
pytest.skip("AFNI Deoblique unsupported.")
148+
147149
tmpdir.chdir()
148150
img = get_testdata[image_orientation]
149151
# Generate test transform

nitransforms/tests/test_nonlinear.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ def test_itk_disp_load_intent():
4949
assert field.header.get_intent()[0] == "vector"
5050

5151

52-
@pytest.mark.xfail(reason="Oblique datasets not fully implemented")
5352
@pytest.mark.parametrize("image_orientation", ["RAS", "LAS", "LPS", "oblique"])
5453
@pytest.mark.parametrize("sw_tool", ["itk", "afni"])
5554
@pytest.mark.parametrize("axis", [0, 1, 2, (0, 1), (1, 2), (0, 1, 2)])
5655
def test_displacements_field1(tmp_path, get_testdata, image_orientation, sw_tool, axis):
5756
"""Check a translation-only field on one or more axes, different image orientations."""
57+
if (image_orientation, sw_tool) == ("oblique", "afni") and axis in ((1, 2), (0, 1, 2)):
58+
pytest.skip("AFNI Deoblique unsupported.")
5859
os.chdir(str(tmp_path))
5960
nii = get_testdata[image_orientation]
6061
nii.to_filename("reference.nii.gz")

0 commit comments

Comments
 (0)