Skip to content

Commit 485a18c

Browse files
committed
Migrate packages test files to packages root
1 parent 73a3972 commit 485a18c

14 files changed

+7
-6
lines changed

packages/core/python/itkwasm/test/test_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88

99
def test_image():
10-
data = Path(__file__).absolute().parent / "input" / "cthead1.png"
10+
data = Path(__file__).absolute().parent.parent.parent.parent / "test" / "data" / "input" / "cthead1.png"
1111
itk_image = itk.imread(data, itk.UC)
1212
itk_image_dict = itk.dict_from_image(itk_image)
1313
itkwasm_image = Image(**itk_image_dict)
@@ -35,4 +35,4 @@ def test_image_defaults():
3535
assert image.size[1] == 1
3636

3737
assert isinstance(image.metadata, dict)
38-
assert image.data == None
38+
assert image.data == None

packages/core/python/itkwasm/test/test_mesh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88

99
def test_mesh():
10-
data = Path(__file__).absolute().parent / "input" / "cow.vtk"
10+
data = Path(__file__).absolute().parent.parent.parent.parent / "test" / "data" / "input" / "cow.vtk"
1111
itk_mesh = itk.meshread(data)
1212

1313
itk_mesh_dict = itk.dict_from_mesh(itk_mesh)
@@ -43,4 +43,4 @@ def test_mesh():
4343
assert itk_mesh_dict["cellBufferSize"] == itk_mesh_roundtrip_dict["cellBufferSize"]
4444

4545
assert itk_mesh_dict["numberOfCellPixels"] == itk_mesh_roundtrip_dict["numberOfCellPixels"]
46-
assert np.array_equal(itk_mesh_dict["cellData"], itk_mesh_roundtrip_dict["cellData"])
46+
assert np.array_equal(itk_mesh_dict["cellData"], itk_mesh_roundtrip_dict["cellData"])

packages/core/python/itkwasm/test/test_pipeline.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
from itkwasm import InterfaceTypes, TextStream, BinaryStream, PipelineInput, PipelineOutput, Pipeline, TextFile, BinaryFile, Image, Mesh
1212

13-
test_input_dir = Path(__file__).resolve().parent / 'input'
14-
test_baseline_dir = Path(__file__).resolve().parent / 'baseline'
13+
test_data_dir = Path(__file__).resolve().parent.parent.parent.parent / 'test' / 'data'
14+
test_input_dir = test_data_dir / 'input'
15+
test_baseline_dir = test_data_dir / 'baseline'
1516

1617

1718
def test_stdout_stderr():

0 commit comments

Comments
 (0)