diff --git a/.gitattributes b/.gitattributes index 9d1380127..66063d773 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,12 +12,12 @@ *.pbz2 binary # ignore files from MSC.Marc in language statistics -install/MarcMentat/** linguist-vendored -src/Marc/include/* linguist-vendored +install/MarcMentat/** linguist-vendored +src/Marc/include/* linguist-vendored install/MarcMentat/MSC_modifications.py linguist-vendored=false # ignore reference files for tests in language statistics -python/tests/reference/** linguist-vendored +python/tests/resources/** linguist-vendored # ignore deprecated scripts -processing/legacy/** linguist-vendored +processing/legacy/** linguist-vendored diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 15495f9b8..dc4b44a6a 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -60,9 +60,9 @@ def update(request): @pytest.fixture -def ref_path_base(): - """Directory containing reference results.""" - return Path(__file__).parent/'reference' +def res_path_base(): + """Directory containing testing resources.""" + return Path(__file__).parent/'resources' @pytest.fixture diff --git a/python/tests/reference/Colormap/binary.json b/python/tests/resources/Colormap/binary.json similarity index 100% rename from python/tests/reference/Colormap/binary.json rename to python/tests/resources/Colormap/binary.json diff --git a/python/tests/reference/Colormap/binary.legend b/python/tests/resources/Colormap/binary.legend similarity index 100% rename from python/tests/reference/Colormap/binary.legend rename to python/tests/resources/Colormap/binary.legend diff --git a/python/tests/reference/Colormap/binary.msh b/python/tests/resources/Colormap/binary.msh similarity index 100% rename from python/tests/reference/Colormap/binary.msh rename to python/tests/resources/Colormap/binary.msh diff --git a/python/tests/reference/Colormap/binary.txt b/python/tests/resources/Colormap/binary.txt similarity index 100% rename from python/tests/reference/Colormap/binary.txt rename to python/tests/resources/Colormap/binary.txt diff --git a/python/tests/reference/Colormap/shade_None.png b/python/tests/resources/Colormap/shade_None.png similarity index 100% rename from python/tests/reference/Colormap/shade_None.png rename to python/tests/resources/Colormap/shade_None.png diff --git a/python/tests/reference/Colormap/shade_[2, 10].png b/python/tests/resources/Colormap/shade_[2, 10].png similarity index 100% rename from python/tests/reference/Colormap/shade_[2, 10].png rename to python/tests/resources/Colormap/shade_[2, 10].png diff --git a/python/tests/reference/ConfigMaterial/2phase_irregularGrid.dream3d b/python/tests/resources/ConfigMaterial/2phase_irregularGrid.dream3d similarity index 100% rename from python/tests/reference/ConfigMaterial/2phase_irregularGrid.dream3d rename to python/tests/resources/ConfigMaterial/2phase_irregularGrid.dream3d diff --git a/python/tests/reference/ConfigMaterial/2phase_irregularGrid.json b/python/tests/resources/ConfigMaterial/2phase_irregularGrid.json similarity index 100% rename from python/tests/reference/ConfigMaterial/2phase_irregularGrid.json rename to python/tests/resources/ConfigMaterial/2phase_irregularGrid.json diff --git a/python/tests/reference/ConfigMaterial/2phase_irregularGrid.xdmf b/python/tests/resources/ConfigMaterial/2phase_irregularGrid.xdmf similarity index 100% rename from python/tests/reference/ConfigMaterial/2phase_irregularGrid.xdmf rename to python/tests/resources/ConfigMaterial/2phase_irregularGrid.xdmf diff --git a/python/tests/reference/ConfigMaterial/material.yaml b/python/tests/resources/ConfigMaterial/material.yaml similarity index 100% rename from python/tests/reference/ConfigMaterial/material.yaml rename to python/tests/resources/ConfigMaterial/material.yaml diff --git a/python/tests/reference/ConfigMaterial/measured.dream3d b/python/tests/resources/ConfigMaterial/measured.dream3d similarity index 100% rename from python/tests/reference/ConfigMaterial/measured.dream3d rename to python/tests/resources/ConfigMaterial/measured.dream3d diff --git a/python/tests/reference/ConfigMaterial/measured.material.yaml b/python/tests/resources/ConfigMaterial/measured.material.yaml similarity index 100% rename from python/tests/reference/ConfigMaterial/measured.material.yaml rename to python/tests/resources/ConfigMaterial/measured.material.yaml diff --git a/python/tests/reference/ConfigMaterial/measured.xdmf b/python/tests/resources/ConfigMaterial/measured.xdmf similarity index 100% rename from python/tests/reference/ConfigMaterial/measured.xdmf rename to python/tests/resources/ConfigMaterial/measured.xdmf diff --git a/python/tests/reference/Grid/2phase_irregularGrid.dream3d b/python/tests/resources/Grid/2phase_irregularGrid.dream3d similarity index 100% rename from python/tests/reference/Grid/2phase_irregularGrid.dream3d rename to python/tests/resources/Grid/2phase_irregularGrid.dream3d diff --git a/python/tests/reference/Grid/2phase_irregularGrid.json b/python/tests/resources/Grid/2phase_irregularGrid.json similarity index 100% rename from python/tests/reference/Grid/2phase_irregularGrid.json rename to python/tests/resources/Grid/2phase_irregularGrid.json diff --git a/python/tests/reference/Grid/2phase_irregularGrid.xdmf b/python/tests/resources/Grid/2phase_irregularGrid.xdmf similarity index 100% rename from python/tests/reference/Grid/2phase_irregularGrid.xdmf rename to python/tests/resources/Grid/2phase_irregularGrid.xdmf diff --git a/python/tests/reference/Grid/clean_1.0_1+2+3_False.vti b/python/tests/resources/Grid/clean_1.0_1+2+3_False.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.0_1+2+3_False.vti rename to python/tests/resources/Grid/clean_1.0_1+2+3_False.vti diff --git a/python/tests/reference/Grid/clean_1.0_1+2+3_True.vti b/python/tests/resources/Grid/clean_1.0_1+2+3_True.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.0_1+2+3_True.vti rename to python/tests/resources/Grid/clean_1.0_1+2+3_True.vti diff --git a/python/tests/reference/Grid/clean_1.0_1_False.vti b/python/tests/resources/Grid/clean_1.0_1_False.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.0_1_False.vti rename to python/tests/resources/Grid/clean_1.0_1_False.vti diff --git a/python/tests/reference/Grid/clean_1.0_1_True.vti b/python/tests/resources/Grid/clean_1.0_1_True.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.0_1_True.vti rename to python/tests/resources/Grid/clean_1.0_1_True.vti diff --git a/python/tests/reference/Grid/clean_1.0_None_False.vti b/python/tests/resources/Grid/clean_1.0_None_False.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.0_None_False.vti rename to python/tests/resources/Grid/clean_1.0_None_False.vti diff --git a/python/tests/reference/Grid/clean_1.0_None_True.vti b/python/tests/resources/Grid/clean_1.0_None_True.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.0_None_True.vti rename to python/tests/resources/Grid/clean_1.0_None_True.vti diff --git a/python/tests/reference/Grid/clean_1.7320508075688772_1+2+3_False.vti b/python/tests/resources/Grid/clean_1.7320508075688772_1+2+3_False.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.7320508075688772_1+2+3_False.vti rename to python/tests/resources/Grid/clean_1.7320508075688772_1+2+3_False.vti diff --git a/python/tests/reference/Grid/clean_1.7320508075688772_1+2+3_True.vti b/python/tests/resources/Grid/clean_1.7320508075688772_1+2+3_True.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.7320508075688772_1+2+3_True.vti rename to python/tests/resources/Grid/clean_1.7320508075688772_1+2+3_True.vti diff --git a/python/tests/reference/Grid/clean_1.7320508075688772_1_False.vti b/python/tests/resources/Grid/clean_1.7320508075688772_1_False.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.7320508075688772_1_False.vti rename to python/tests/resources/Grid/clean_1.7320508075688772_1_False.vti diff --git a/python/tests/reference/Grid/clean_1.7320508075688772_1_True.vti b/python/tests/resources/Grid/clean_1.7320508075688772_1_True.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.7320508075688772_1_True.vti rename to python/tests/resources/Grid/clean_1.7320508075688772_1_True.vti diff --git a/python/tests/reference/Grid/clean_1.7320508075688772_None_False.vti b/python/tests/resources/Grid/clean_1.7320508075688772_None_False.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.7320508075688772_None_False.vti rename to python/tests/resources/Grid/clean_1.7320508075688772_None_False.vti diff --git a/python/tests/reference/Grid/clean_1.7320508075688772_None_True.vti b/python/tests/resources/Grid/clean_1.7320508075688772_None_True.vti similarity index 100% rename from python/tests/reference/Grid/clean_1.7320508075688772_None_True.vti rename to python/tests/resources/Grid/clean_1.7320508075688772_None_True.vti diff --git a/python/tests/reference/Grid/flip_directions_x-y-z.vti b/python/tests/resources/Grid/flip_directions_x-y-z.vti similarity index 100% rename from python/tests/reference/Grid/flip_directions_x-y-z.vti rename to python/tests/resources/Grid/flip_directions_x-y-z.vti diff --git a/python/tests/reference/Grid/flip_directions_x.vti b/python/tests/resources/Grid/flip_directions_x.vti similarity index 100% rename from python/tests/reference/Grid/flip_directions_x.vti rename to python/tests/resources/Grid/flip_directions_x.vti diff --git a/python/tests/reference/Grid/flip_directions_y-z.vti b/python/tests/resources/Grid/flip_directions_y-z.vti similarity index 100% rename from python/tests/reference/Grid/flip_directions_y-z.vti rename to python/tests/resources/Grid/flip_directions_y-z.vti diff --git a/python/tests/reference/Grid/flip_directions_z-x-y.vti b/python/tests/resources/Grid/flip_directions_z-x-y.vti similarity index 100% rename from python/tests/reference/Grid/flip_directions_z-x-y.vti rename to python/tests/resources/Grid/flip_directions_z-x-y.vti diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20.vti b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20.vti similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20.vti rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20.vti diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_x_False.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_x_False.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_x_False.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_x_False.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_x_True.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_x_True.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_x_True.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_x_True.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xy_False.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xy_False.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xy_False.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xy_False.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xy_True.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xy_True.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xy_True.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xy_True.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xyz_False.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xyz_False.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xyz_False.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xyz_False.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xyz_True.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xyz_True.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xyz_True.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xyz_True.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xz_False.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xz_False.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xz_False.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xz_False.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xz_True.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xz_True.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_xz_True.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_xz_True.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_y_False.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_y_False.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_y_False.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_y_False.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_y_True.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_y_True.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_y_True.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_y_True.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_z_False.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_z_False.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_z_False.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_z_False.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_z_True.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_z_True.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_z_True.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_z_True.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_zy_False.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_zy_False.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_zy_False.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_zy_False.vtu diff --git a/python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_zy_True.vtu b/python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_zy_True.vtu similarity index 100% rename from python/tests/reference/Grid/get_grain_boundaries_8g12x15x20_zy_True.vtu rename to python/tests/resources/Grid/get_grain_boundaries_8g12x15x20_zy_True.vtu diff --git a/python/tests/reference/Grid/measured.dream3d b/python/tests/resources/Grid/measured.dream3d similarity index 100% rename from python/tests/reference/Grid/measured.dream3d rename to python/tests/resources/Grid/measured.dream3d diff --git a/python/tests/reference/Grid/measured.vti b/python/tests/resources/Grid/measured.vti similarity index 100% rename from python/tests/reference/Grid/measured.vti rename to python/tests/resources/Grid/measured.vti diff --git a/python/tests/reference/Grid/measured.xdmf b/python/tests/resources/Grid/measured.xdmf similarity index 100% rename from python/tests/reference/Grid/measured.xdmf rename to python/tests/resources/Grid/measured.xdmf diff --git a/python/tests/reference/Grid/mirror_directions_x+reflect_False.vti b/python/tests/resources/Grid/mirror_directions_x+reflect_False.vti similarity index 100% rename from python/tests/reference/Grid/mirror_directions_x+reflect_False.vti rename to python/tests/resources/Grid/mirror_directions_x+reflect_False.vti diff --git a/python/tests/reference/Grid/mirror_directions_x-y-z+reflect_True.vti b/python/tests/resources/Grid/mirror_directions_x-y-z+reflect_True.vti similarity index 100% rename from python/tests/reference/Grid/mirror_directions_x-y-z+reflect_True.vti rename to python/tests/resources/Grid/mirror_directions_x-y-z+reflect_True.vti diff --git a/python/tests/reference/Grid/mirror_directions_y-z+reflect_False.vti b/python/tests/resources/Grid/mirror_directions_y-z+reflect_False.vti similarity index 100% rename from python/tests/reference/Grid/mirror_directions_y-z+reflect_False.vti rename to python/tests/resources/Grid/mirror_directions_y-z+reflect_False.vti diff --git a/python/tests/reference/Grid/mirror_directions_z-x-y+reflect_False.vti b/python/tests/resources/Grid/mirror_directions_z-x-y+reflect_False.vti similarity index 100% rename from python/tests/reference/Grid/mirror_directions_z-x-y+reflect_False.vti rename to python/tests/resources/Grid/mirror_directions_z-x-y+reflect_False.vti diff --git a/python/tests/reference/Grid/n10-id1_scaled.vti b/python/tests/resources/Grid/n10-id1_scaled.vti similarity index 100% rename from python/tests/reference/Grid/n10-id1_scaled.vti rename to python/tests/resources/Grid/n10-id1_scaled.vti diff --git a/python/tests/reference/Grid/n10-id1_scaled.vtk b/python/tests/resources/Grid/n10-id1_scaled.vtk similarity index 100% rename from python/tests/reference/Grid/n10-id1_scaled.vtk rename to python/tests/resources/Grid/n10-id1_scaled.vtk diff --git a/python/tests/reference/Grid/rotate_Eulers_0.0-32.0-240.0.vti b/python/tests/resources/Grid/rotate_Eulers_0.0-32.0-240.0.vti similarity index 100% rename from python/tests/reference/Grid/rotate_Eulers_0.0-32.0-240.0.vti rename to python/tests/resources/Grid/rotate_Eulers_0.0-32.0-240.0.vti diff --git a/python/tests/reference/Grid/rotate_Eulers_32.0-68.0-21.0.vti b/python/tests/resources/Grid/rotate_Eulers_32.0-68.0-21.0.vti similarity index 100% rename from python/tests/reference/Grid/rotate_Eulers_32.0-68.0-21.0.vti rename to python/tests/resources/Grid/rotate_Eulers_32.0-68.0-21.0.vti diff --git a/python/tests/reference/Grid/scale_grid_10-10-10.vti b/python/tests/resources/Grid/scale_grid_10-10-10.vti similarity index 100% rename from python/tests/reference/Grid/scale_grid_10-10-10.vti rename to python/tests/resources/Grid/scale_grid_10-10-10.vti diff --git a/python/tests/reference/Grid/scale_grid_10-11-10.vti b/python/tests/resources/Grid/scale_grid_10-11-10.vti similarity index 100% rename from python/tests/reference/Grid/scale_grid_10-11-10.vti rename to python/tests/resources/Grid/scale_grid_10-11-10.vti diff --git a/python/tests/reference/Grid/scale_grid_10-13-10.vti b/python/tests/resources/Grid/scale_grid_10-13-10.vti similarity index 100% rename from python/tests/reference/Grid/scale_grid_10-13-10.vti rename to python/tests/resources/Grid/scale_grid_10-13-10.vti diff --git a/python/tests/reference/Grid/scale_grid_10-20-2.vti b/python/tests/resources/Grid/scale_grid_10-20-2.vti similarity index 100% rename from python/tests/reference/Grid/scale_grid_10-20-2.vti rename to python/tests/resources/Grid/scale_grid_10-20-2.vti diff --git a/python/tests/reference/Grid/scale_grid_5-4-20.vti b/python/tests/resources/Grid/scale_grid_5-4-20.vti similarity index 100% rename from python/tests/reference/Grid/scale_grid_5-4-20.vti rename to python/tests/resources/Grid/scale_grid_5-4-20.vti diff --git a/python/tests/reference/Grid/scale_grid_8-10-12.vti b/python/tests/resources/Grid/scale_grid_8-10-12.vti similarity index 100% rename from python/tests/reference/Grid/scale_grid_8-10-12.vti rename to python/tests/resources/Grid/scale_grid_8-10-12.vti diff --git a/python/tests/reference/Orientation/cF_Bain.txt b/python/tests/resources/Orientation/cF_Bain.txt similarity index 100% rename from python/tests/reference/Orientation/cF_Bain.txt rename to python/tests/resources/Orientation/cF_Bain.txt diff --git a/python/tests/reference/Orientation/cF_GT.txt b/python/tests/resources/Orientation/cF_GT.txt similarity index 100% rename from python/tests/reference/Orientation/cF_GT.txt rename to python/tests/resources/Orientation/cF_GT.txt diff --git a/python/tests/reference/Orientation/cF_GT_prime.txt b/python/tests/resources/Orientation/cF_GT_prime.txt similarity index 100% rename from python/tests/reference/Orientation/cF_GT_prime.txt rename to python/tests/resources/Orientation/cF_GT_prime.txt diff --git a/python/tests/reference/Orientation/cF_KS.txt b/python/tests/resources/Orientation/cF_KS.txt similarity index 100% rename from python/tests/reference/Orientation/cF_KS.txt rename to python/tests/resources/Orientation/cF_KS.txt diff --git a/python/tests/reference/Orientation/cF_NW.txt b/python/tests/resources/Orientation/cF_NW.txt similarity index 100% rename from python/tests/reference/Orientation/cF_NW.txt rename to python/tests/resources/Orientation/cF_NW.txt diff --git a/python/tests/reference/Orientation/cF_Pitsch.txt b/python/tests/resources/Orientation/cF_Pitsch.txt similarity index 100% rename from python/tests/reference/Orientation/cF_Pitsch.txt rename to python/tests/resources/Orientation/cF_Pitsch.txt diff --git a/python/tests/reference/Orientation/cF_slip.txt b/python/tests/resources/Orientation/cF_slip.txt similarity index 100% rename from python/tests/reference/Orientation/cF_slip.txt rename to python/tests/resources/Orientation/cF_slip.txt diff --git a/python/tests/reference/Orientation/cF_twin.txt b/python/tests/resources/Orientation/cF_twin.txt similarity index 100% rename from python/tests/reference/Orientation/cF_twin.txt rename to python/tests/resources/Orientation/cF_twin.txt diff --git a/python/tests/reference/Orientation/cI_Bain.txt b/python/tests/resources/Orientation/cI_Bain.txt similarity index 100% rename from python/tests/reference/Orientation/cI_Bain.txt rename to python/tests/resources/Orientation/cI_Bain.txt diff --git a/python/tests/reference/Orientation/cI_GT.txt b/python/tests/resources/Orientation/cI_GT.txt similarity index 100% rename from python/tests/reference/Orientation/cI_GT.txt rename to python/tests/resources/Orientation/cI_GT.txt diff --git a/python/tests/reference/Orientation/cI_GT_prime.txt b/python/tests/resources/Orientation/cI_GT_prime.txt similarity index 100% rename from python/tests/reference/Orientation/cI_GT_prime.txt rename to python/tests/resources/Orientation/cI_GT_prime.txt diff --git a/python/tests/reference/Orientation/cI_KS.txt b/python/tests/resources/Orientation/cI_KS.txt similarity index 100% rename from python/tests/reference/Orientation/cI_KS.txt rename to python/tests/resources/Orientation/cI_KS.txt diff --git a/python/tests/reference/Orientation/cI_NW.txt b/python/tests/resources/Orientation/cI_NW.txt similarity index 100% rename from python/tests/reference/Orientation/cI_NW.txt rename to python/tests/resources/Orientation/cI_NW.txt diff --git a/python/tests/reference/Orientation/cI_Pitsch.txt b/python/tests/resources/Orientation/cI_Pitsch.txt similarity index 100% rename from python/tests/reference/Orientation/cI_Pitsch.txt rename to python/tests/resources/Orientation/cI_Pitsch.txt diff --git a/python/tests/reference/Orientation/cI_slip.txt b/python/tests/resources/Orientation/cI_slip.txt similarity index 100% rename from python/tests/reference/Orientation/cI_slip.txt rename to python/tests/resources/Orientation/cI_slip.txt diff --git a/python/tests/reference/Orientation/cI_twin.txt b/python/tests/resources/Orientation/cI_twin.txt similarity index 100% rename from python/tests/reference/Orientation/cI_twin.txt rename to python/tests/resources/Orientation/cI_twin.txt diff --git a/python/tests/reference/Orientation/hP_slip.txt b/python/tests/resources/Orientation/hP_slip.txt similarity index 100% rename from python/tests/reference/Orientation/hP_slip.txt rename to python/tests/resources/Orientation/hP_slip.txt diff --git a/python/tests/reference/Orientation/hP_twin.txt b/python/tests/resources/Orientation/hP_twin.txt similarity index 100% rename from python/tests/reference/Orientation/hP_twin.txt rename to python/tests/resources/Orientation/hP_twin.txt diff --git a/python/tests/reference/Orientation/unitcell_cubic_0_0_0.pdf b/python/tests/resources/Orientation/unitcell_cubic_0_0_0.pdf similarity index 100% rename from python/tests/reference/Orientation/unitcell_cubic_0_0_0.pdf rename to python/tests/resources/Orientation/unitcell_cubic_0_0_0.pdf diff --git a/python/tests/reference/Orientation/unitcell_cubic_0_45_0.pdf b/python/tests/resources/Orientation/unitcell_cubic_0_45_0.pdf similarity index 100% rename from python/tests/reference/Orientation/unitcell_cubic_0_45_0.pdf rename to python/tests/resources/Orientation/unitcell_cubic_0_45_0.pdf diff --git a/python/tests/reference/Orientation/unitcell_cubic_180_45_180.pdf b/python/tests/resources/Orientation/unitcell_cubic_180_45_180.pdf similarity index 100% rename from python/tests/reference/Orientation/unitcell_cubic_180_45_180.pdf rename to python/tests/resources/Orientation/unitcell_cubic_180_45_180.pdf diff --git a/python/tests/reference/Orientation/unitcell_cubic_45_0_0.pdf b/python/tests/resources/Orientation/unitcell_cubic_45_0_0.pdf similarity index 100% rename from python/tests/reference/Orientation/unitcell_cubic_45_0_0.pdf rename to python/tests/resources/Orientation/unitcell_cubic_45_0_0.pdf diff --git a/python/tests/reference/Orientation/unitcell_cubic_90_45_270.pdf b/python/tests/resources/Orientation/unitcell_cubic_90_45_270.pdf similarity index 100% rename from python/tests/reference/Orientation/unitcell_cubic_90_45_270.pdf rename to python/tests/resources/Orientation/unitcell_cubic_90_45_270.pdf diff --git a/python/tests/reference/Result/12grains6x7x8.material.yaml b/python/tests/resources/Result/12grains6x7x8.material.yaml similarity index 100% rename from python/tests/reference/Result/12grains6x7x8.material.yaml rename to python/tests/resources/Result/12grains6x7x8.material.yaml diff --git a/python/tests/reference/Result/12grains6x7x8.vti b/python/tests/resources/Result/12grains6x7x8.vti similarity index 100% rename from python/tests/reference/Result/12grains6x7x8.vti rename to python/tests/resources/Result/12grains6x7x8.vti diff --git a/python/tests/reference/Result/12grains6x7x8_tensionY.hdf5 b/python/tests/resources/Result/12grains6x7x8_tensionY.hdf5 similarity index 100% rename from python/tests/reference/Result/12grains6x7x8_tensionY.hdf5 rename to python/tests/resources/Result/12grains6x7x8_tensionY.hdf5 diff --git a/python/tests/reference/Result/4grains2x4x3.material.yaml b/python/tests/resources/Result/4grains2x4x3.material.yaml similarity index 100% rename from python/tests/reference/Result/4grains2x4x3.material.yaml rename to python/tests/resources/Result/4grains2x4x3.material.yaml diff --git a/python/tests/reference/Result/4grains2x4x3.vti b/python/tests/resources/Result/4grains2x4x3.vti similarity index 100% rename from python/tests/reference/Result/4grains2x4x3.vti rename to python/tests/resources/Result/4grains2x4x3.vti diff --git a/python/tests/reference/Result/4grains2x4x3_compressionY.hdf5 b/python/tests/resources/Result/4grains2x4x3_compressionY.hdf5 similarity index 100% rename from python/tests/reference/Result/4grains2x4x3_compressionY.hdf5 rename to python/tests/resources/Result/4grains2x4x3_compressionY.hdf5 diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase.material.yaml b/python/tests/resources/Result/6grains6x7x8_single_phase.material.yaml similarity index 100% rename from python/tests/reference/Result/6grains6x7x8_single_phase.material.yaml rename to python/tests/resources/Result/6grains6x7x8_single_phase.material.yaml diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase.vti b/python/tests/resources/Result/6grains6x7x8_single_phase.vti similarity index 100% rename from python/tests/reference/Result/6grains6x7x8_single_phase.vti rename to python/tests/resources/Result/6grains6x7x8_single_phase.vti diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 b/python/tests/resources/Result/6grains6x7x8_single_phase_tensionY.hdf5 similarity index 100% rename from python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 rename to python/tests/resources/Result/6grains6x7x8_single_phase_tensionY.hdf5 diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.xdmf b/python/tests/resources/Result/6grains6x7x8_single_phase_tensionY.xdmf similarity index 100% rename from python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.xdmf rename to python/tests/resources/Result/6grains6x7x8_single_phase_tensionY.xdmf diff --git a/python/tests/reference/Result/check_compile_job1.hdf5 b/python/tests/resources/Result/check_compile_job1.hdf5 similarity index 100% rename from python/tests/reference/Result/check_compile_job1.hdf5 rename to python/tests/resources/Result/check_compile_job1.hdf5 diff --git a/python/tests/reference/Result/compressionY.yaml b/python/tests/resources/Result/compressionY.yaml similarity index 100% rename from python/tests/reference/Result/compressionY.yaml rename to python/tests/resources/Result/compressionY.yaml diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-0-0].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-0-0].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-0-0].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-0-0].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-0-1].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-0-1].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-0-1].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-0-1].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-0-2].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-0-2].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-0-2].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-0-2].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-0-3].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-0-3].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-0-3].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-0-3].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-1-0].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-1-0].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-1-0].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-1-0].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-1-1].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-1-1].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-1-1].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-1-1].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-1-2].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-1-2].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-1-2].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-1-2].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-1-3].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-1-3].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-1-3].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-1-3].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-2-0].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-2-0].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-2-0].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-2-0].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-2-1].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-2-1].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-2-1].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-2-1].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-2-2].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-2-2].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-2-2].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-2-2].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[0-2-3].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[0-2-3].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[0-2-3].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[0-2-3].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-0-0].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-0-0].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-0-0].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-0-0].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-0-1].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-0-1].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-0-1].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-0-1].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-0-2].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-0-2].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-0-2].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-0-2].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-0-3].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-0-3].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-0-3].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-0-3].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-1-0].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-1-0].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-1-0].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-1-0].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-1-1].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-1-1].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-1-1].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-1-1].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-1-2].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-1-2].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-1-2].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-1-2].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-1-3].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-1-3].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-1-3].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-1-3].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-2-0].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-2-0].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-2-0].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-2-0].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-2-1].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-2-1].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-2-1].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-2-1].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-2-2].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-2-2].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-2-2].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-2-2].md5 diff --git a/python/tests/reference/Result/export_VTK/test_export_vtk[1-2-3].md5 b/python/tests/resources/Result/export_VTK/test_export_vtk[1-2-3].md5 similarity index 100% rename from python/tests/reference/Result/export_VTK/test_export_vtk[1-2-3].md5 rename to python/tests/resources/Result/export_VTK/test_export_vtk[1-2-3].md5 diff --git a/python/tests/reference/Result/get/test_get[0].pbz2 b/python/tests/resources/Result/get/test_get[0].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[0].pbz2 rename to python/tests/resources/Result/get/test_get[0].pbz2 diff --git a/python/tests/reference/Result/get/test_get[1].pbz2 b/python/tests/resources/Result/get/test_get[1].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[1].pbz2 rename to python/tests/resources/Result/get/test_get[1].pbz2 diff --git a/python/tests/reference/Result/get/test_get[2].pbz2 b/python/tests/resources/Result/get/test_get[2].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[2].pbz2 rename to python/tests/resources/Result/get/test_get[2].pbz2 diff --git a/python/tests/reference/Result/get/test_get[3].pbz2 b/python/tests/resources/Result/get/test_get[3].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[3].pbz2 rename to python/tests/resources/Result/get/test_get[3].pbz2 diff --git a/python/tests/reference/Result/get/test_get[4].pbz2 b/python/tests/resources/Result/get/test_get[4].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[4].pbz2 rename to python/tests/resources/Result/get/test_get[4].pbz2 diff --git a/python/tests/reference/Result/get/test_get[5].pbz2 b/python/tests/resources/Result/get/test_get[5].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[5].pbz2 rename to python/tests/resources/Result/get/test_get[5].pbz2 diff --git a/python/tests/reference/Result/get/test_get[6].pbz2 b/python/tests/resources/Result/get/test_get[6].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[6].pbz2 rename to python/tests/resources/Result/get/test_get[6].pbz2 diff --git a/python/tests/reference/Result/get/test_get[7].pbz2 b/python/tests/resources/Result/get/test_get[7].pbz2 similarity index 100% rename from python/tests/reference/Result/get/test_get[7].pbz2 rename to python/tests/resources/Result/get/test_get[7].pbz2 diff --git a/python/tests/reference/Result/place/test_place[0].pbz2 b/python/tests/resources/Result/place/test_place[0].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[0].pbz2 rename to python/tests/resources/Result/place/test_place[0].pbz2 diff --git a/python/tests/reference/Result/place/test_place[1].pbz2 b/python/tests/resources/Result/place/test_place[1].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[1].pbz2 rename to python/tests/resources/Result/place/test_place[1].pbz2 diff --git a/python/tests/reference/Result/place/test_place[2].pbz2 b/python/tests/resources/Result/place/test_place[2].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[2].pbz2 rename to python/tests/resources/Result/place/test_place[2].pbz2 diff --git a/python/tests/reference/Result/place/test_place[3].pbz2 b/python/tests/resources/Result/place/test_place[3].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[3].pbz2 rename to python/tests/resources/Result/place/test_place[3].pbz2 diff --git a/python/tests/reference/Result/place/test_place[4].pbz2 b/python/tests/resources/Result/place/test_place[4].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[4].pbz2 rename to python/tests/resources/Result/place/test_place[4].pbz2 diff --git a/python/tests/reference/Result/place/test_place[5].pbz2 b/python/tests/resources/Result/place/test_place[5].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[5].pbz2 rename to python/tests/resources/Result/place/test_place[5].pbz2 diff --git a/python/tests/reference/Result/place/test_place[6].pbz2 b/python/tests/resources/Result/place/test_place[6].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[6].pbz2 rename to python/tests/resources/Result/place/test_place[6].pbz2 diff --git a/python/tests/reference/Result/place/test_place[7].pbz2 b/python/tests/resources/Result/place/test_place[7].pbz2 similarity index 100% rename from python/tests/reference/Result/place/test_place[7].pbz2 rename to python/tests/resources/Result/place/test_place[7].pbz2 diff --git a/python/tests/reference/Result/tensionY.yaml b/python/tests/resources/Result/tensionY.yaml similarity index 100% rename from python/tests/reference/Result/tensionY.yaml rename to python/tests/resources/Result/tensionY.yaml diff --git a/python/tests/reference/Result/tensionY_restart.yaml b/python/tests/resources/Result/tensionY_restart.yaml similarity index 100% rename from python/tests/reference/Result/tensionY_restart.yaml rename to python/tests/resources/Result/tensionY_restart.yaml diff --git a/python/tests/reference/Rotation/1_BCC.pdf b/python/tests/resources/Rotation/1_BCC.pdf similarity index 100% rename from python/tests/reference/Rotation/1_BCC.pdf rename to python/tests/resources/Rotation/1_BCC.pdf diff --git a/python/tests/reference/Rotation/1_FCC.pdf b/python/tests/resources/Rotation/1_FCC.pdf similarity index 100% rename from python/tests/reference/Rotation/1_FCC.pdf rename to python/tests/resources/Rotation/1_FCC.pdf diff --git a/python/tests/reference/Rotation/2_BCC.pdf b/python/tests/resources/Rotation/2_BCC.pdf similarity index 100% rename from python/tests/reference/Rotation/2_BCC.pdf rename to python/tests/resources/Rotation/2_BCC.pdf diff --git a/python/tests/reference/Rotation/2_FCC.pdf b/python/tests/resources/Rotation/2_FCC.pdf similarity index 100% rename from python/tests/reference/Rotation/2_FCC.pdf rename to python/tests/resources/Rotation/2_FCC.pdf diff --git a/python/tests/reference/Rotation/ODF_experimental.odf b/python/tests/resources/Rotation/ODF_experimental.odf similarity index 100% rename from python/tests/reference/Rotation/ODF_experimental.odf rename to python/tests/resources/Rotation/ODF_experimental.odf diff --git a/python/tests/reference/Rotation/ODF_experimental.txt b/python/tests/resources/Rotation/ODF_experimental.txt similarity index 100% rename from python/tests/reference/Rotation/ODF_experimental.txt rename to python/tests/resources/Rotation/ODF_experimental.txt diff --git a/python/tests/reference/Rotation/ODF_experimental_cell.txt b/python/tests/resources/Rotation/ODF_experimental_cell.txt similarity index 100% rename from python/tests/reference/Rotation/ODF_experimental_cell.txt rename to python/tests/resources/Rotation/ODF_experimental_cell.txt diff --git a/python/tests/reference/Rotation/PoleFigures_OR.m b/python/tests/resources/Rotation/PoleFigures_OR.m similarity index 100% rename from python/tests/reference/Rotation/PoleFigures_OR.m rename to python/tests/resources/Rotation/PoleFigures_OR.m diff --git a/python/tests/reference/Rotation/Visualize_hybridIA_sampling.ipynb b/python/tests/resources/Rotation/Visualize_hybridIA_sampling.ipynb similarity index 100% rename from python/tests/reference/Rotation/Visualize_hybridIA_sampling.ipynb rename to python/tests/resources/Rotation/Visualize_hybridIA_sampling.ipynb diff --git a/python/tests/reference/Rotation/bcc_Bain.txt b/python/tests/resources/Rotation/bcc_Bain.txt similarity index 100% rename from python/tests/reference/Rotation/bcc_Bain.txt rename to python/tests/resources/Rotation/bcc_Bain.txt diff --git a/python/tests/reference/Rotation/bcc_GT.txt b/python/tests/resources/Rotation/bcc_GT.txt similarity index 100% rename from python/tests/reference/Rotation/bcc_GT.txt rename to python/tests/resources/Rotation/bcc_GT.txt diff --git a/python/tests/reference/Rotation/bcc_GT_prime.txt b/python/tests/resources/Rotation/bcc_GT_prime.txt similarity index 100% rename from python/tests/reference/Rotation/bcc_GT_prime.txt rename to python/tests/resources/Rotation/bcc_GT_prime.txt diff --git a/python/tests/reference/Rotation/bcc_KS.txt b/python/tests/resources/Rotation/bcc_KS.txt similarity index 100% rename from python/tests/reference/Rotation/bcc_KS.txt rename to python/tests/resources/Rotation/bcc_KS.txt diff --git a/python/tests/reference/Rotation/bcc_NW.txt b/python/tests/resources/Rotation/bcc_NW.txt similarity index 100% rename from python/tests/reference/Rotation/bcc_NW.txt rename to python/tests/resources/Rotation/bcc_NW.txt diff --git a/python/tests/reference/Rotation/bcc_Pitsch.txt b/python/tests/resources/Rotation/bcc_Pitsch.txt similarity index 100% rename from python/tests/reference/Rotation/bcc_Pitsch.txt rename to python/tests/resources/Rotation/bcc_Pitsch.txt diff --git a/python/tests/reference/Rotation/fcc_Bain.txt b/python/tests/resources/Rotation/fcc_Bain.txt similarity index 100% rename from python/tests/reference/Rotation/fcc_Bain.txt rename to python/tests/resources/Rotation/fcc_Bain.txt diff --git a/python/tests/reference/Rotation/fcc_GT.txt b/python/tests/resources/Rotation/fcc_GT.txt similarity index 100% rename from python/tests/reference/Rotation/fcc_GT.txt rename to python/tests/resources/Rotation/fcc_GT.txt diff --git a/python/tests/reference/Rotation/fcc_GT_prime.txt b/python/tests/resources/Rotation/fcc_GT_prime.txt similarity index 100% rename from python/tests/reference/Rotation/fcc_GT_prime.txt rename to python/tests/resources/Rotation/fcc_GT_prime.txt diff --git a/python/tests/reference/Rotation/fcc_KS.txt b/python/tests/resources/Rotation/fcc_KS.txt similarity index 100% rename from python/tests/reference/Rotation/fcc_KS.txt rename to python/tests/resources/Rotation/fcc_KS.txt diff --git a/python/tests/reference/Rotation/fcc_NW.txt b/python/tests/resources/Rotation/fcc_NW.txt similarity index 100% rename from python/tests/reference/Rotation/fcc_NW.txt rename to python/tests/resources/Rotation/fcc_NW.txt diff --git a/python/tests/reference/Rotation/fcc_Pitsch.txt b/python/tests/resources/Rotation/fcc_Pitsch.txt similarity index 100% rename from python/tests/reference/Rotation/fcc_Pitsch.txt rename to python/tests/resources/Rotation/fcc_Pitsch.txt diff --git a/python/tests/reference/Table/datatype-mix.txt b/python/tests/resources/Table/datatype-mix.txt similarity index 100% rename from python/tests/reference/Table/datatype-mix.txt rename to python/tests/resources/Table/datatype-mix.txt diff --git a/python/tests/reference/Table/simple.ang b/python/tests/resources/Table/simple.ang similarity index 100% rename from python/tests/reference/Table/simple.ang rename to python/tests/resources/Table/simple.ang diff --git a/python/tests/reference/Table/whitespace-mix.txt b/python/tests/resources/Table/whitespace-mix.txt similarity index 100% rename from python/tests/reference/Table/whitespace-mix.txt rename to python/tests/resources/Table/whitespace-mix.txt diff --git a/python/tests/reference/VTK/polyData.vtp b/python/tests/resources/VTK/polyData.vtp similarity index 100% rename from python/tests/reference/VTK/polyData.vtp rename to python/tests/resources/VTK/polyData.vtp diff --git a/python/tests/reference/VTK/rectilinearGrid.vtr b/python/tests/resources/VTK/rectilinearGrid.vtr similarity index 100% rename from python/tests/reference/VTK/rectilinearGrid.vtr rename to python/tests/resources/VTK/rectilinearGrid.vtr diff --git a/python/tests/test_Colormap.py b/python/tests/test_Colormap.py index 12a26e550..7e1d2e9b5 100644 --- a/python/tests/test_Colormap.py +++ b/python/tests/test_Colormap.py @@ -10,9 +10,9 @@ from PIL import ImageChops from damask import Colormap @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'Colormap' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'Colormap' class TestColormap: @@ -156,13 +156,13 @@ class TestColormap: rtol=0.005) @pytest.mark.parametrize('bounds',[None,[2,10]]) - def test_shade(self,ref_path,update,bounds): + def test_shade(self,res_path,update,bounds): data = np.add(*np.indices((10, 11))) img_current = Colormap.from_predefined('orientation').shade(data,bounds=bounds) if update: - img_current.save(ref_path/f'shade_{bounds}.png') + img_current.save(res_path/f'shade_{bounds}.png') else: - img_reference = Image.open(ref_path/f'shade_{bounds}.png') + img_reference = Image.open(res_path/f'shade_{bounds}.png') diff = ImageChops.difference(img_reference.convert('RGB'),img_current.convert('RGB')) assert not diff.getbbox() @@ -174,14 +174,14 @@ class TestColormap: ('GOM','.legend'), ('gmsh','.msh') ]) - def test_compare_reference(self,format,ext,tmp_path,ref_path,update): + def test_compare_reference(self,format,ext,tmp_path,res_path,update): name = 'binary' c = Colormap.from_predefined(name) # noqa if update: - os.chdir(ref_path) + os.chdir(res_path) eval(f'c.save_{format}()') else: os.chdir(tmp_path) eval(f'c.save_{format}()') time.sleep(.5) - assert filecmp.cmp(tmp_path/(name+ext),ref_path/(name+ext)) + assert filecmp.cmp(tmp_path/(name+ext),res_path/(name+ext)) diff --git a/python/tests/test_ConfigMaterial.py b/python/tests/test_ConfigMaterial.py index 971a4c5a9..b350356a8 100644 --- a/python/tests/test_ConfigMaterial.py +++ b/python/tests/test_ConfigMaterial.py @@ -9,9 +9,9 @@ from damask import Rotation from damask import Grid @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'ConfigMaterial' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'ConfigMaterial' class TestConfigMaterial: @@ -38,8 +38,8 @@ class TestConfigMaterial: if k in kwargs: assert v == kwargs[k] @pytest.mark.parametrize('fname',[None,'test.yaml']) - def test_load_save(self,ref_path,tmp_path,fname): - reference = ConfigMaterial.load(ref_path/'material.yaml') + def test_load_save(self,res_path,tmp_path,fname): + reference = ConfigMaterial.load(res_path/'material.yaml') os.chdir(tmp_path) if fname is None: reference.save() @@ -49,60 +49,60 @@ class TestConfigMaterial: new = ConfigMaterial.load(fname) assert reference == new - def test_valid_complete(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_valid_complete(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') assert material_config.is_valid and material_config.is_complete - def test_invalid_lattice(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_invalid_lattice(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') material_config['phase']['Aluminum']['lattice']='fxc' assert not material_config.is_valid - def test_invalid_orientation(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_invalid_orientation(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') material_config['material'][0]['constituents'][0]['O']=[0,0,0,0] assert not material_config.is_valid @pytest.mark.xfail(sys.platform == 'win32', reason='utf8 "not equal" might cause trouble') - def test_invalid_fraction(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_invalid_fraction(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') material_config['material'][0]['constituents'][0]['v']=.9 assert not material_config.is_valid @pytest.mark.parametrize('item',['homogenization','phase','material']) - def test_incomplete_missing(self,ref_path,item): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_incomplete_missing(self,res_path,item): + material_config = ConfigMaterial.load(res_path/'material.yaml') del material_config[item] assert not material_config.is_complete @pytest.mark.parametrize('item',['O','phase']) - def test_incomplete_material_constituent(self,ref_path,item): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_incomplete_material_constituent(self,res_path,item): + material_config = ConfigMaterial.load(res_path/'material.yaml') del material_config['material'][0]['constituents'][0][item] assert not material_config.is_complete - def test_incomplete_material_homogenization(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_incomplete_material_homogenization(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') del material_config['material'][0]['homogenization'] assert not material_config.is_complete - def test_incomplete_wrong_phase(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_incomplete_wrong_phase(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') new = material_config.material_rename_phase({'Steel':'FeNbC'}) assert not new.is_complete - def test_incomplete_wrong_homogenization(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_incomplete_wrong_homogenization(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') new = material_config.material_rename_homogenization({'Taylor':'isostrain'}) assert not new.is_complete - def test_empty_phase(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_empty_phase(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') material_config['phase'] = None assert not material_config.is_complete - def test_empty_homogenization(self,ref_path): - material_config = ConfigMaterial.load(ref_path/'material.yaml') + def test_empty_homogenization(self,res_path): + material_config = ConfigMaterial.load(res_path/'material.yaml') material_config['homogenization'] = None assert not material_config.is_complete @@ -118,9 +118,9 @@ class TestConfigMaterial: for i,m in enumerate(c['material']): assert m['homogenization'] == 1 and (m['constituents'][0]['O'] == [0,1,0,0]).all() - def test_updated_dicts(self,ref_path): + def test_updated_dicts(self,res_path): m1 = ConfigMaterial().material_add(phase=['Aluminum'],O=[1.0,0.0,0.0,0.0],homogenization='SX') - m2 = ConfigMaterial.load(ref_path/'material.yaml') + m2 = ConfigMaterial.load(res_path/'material.yaml') for k in m2['phase']: m2 = m2.material_add(phase=[k],O=[1.0,0.0,0.0,0.0],homogenization='SX') assert not m2['phase'].get(k) is None @@ -173,17 +173,17 @@ class TestConfigMaterial: ConfigMaterial().material_add(v=v) @pytest.mark.parametrize('cell_ensemble_data',[None,'CellEnsembleData']) - def test_load_DREAM3D(self,ref_path,cell_ensemble_data): - grain_c = ConfigMaterial.load_DREAM3D(ref_path/'2phase_irregularGrid.dream3d','Grain Data', + def test_load_DREAM3D(self,res_path,cell_ensemble_data): + grain_c = ConfigMaterial.load_DREAM3D(res_path/'2phase_irregularGrid.dream3d','Grain Data', cell_ensemble_data = cell_ensemble_data) - point_c = ConfigMaterial.load_DREAM3D(ref_path/'2phase_irregularGrid.dream3d', + point_c = ConfigMaterial.load_DREAM3D(res_path/'2phase_irregularGrid.dream3d', cell_ensemble_data = cell_ensemble_data) assert point_c.is_valid and grain_c.is_valid and \ len(point_c['material'])+1 == len(grain_c['material']) - grain_m = Grid.load_DREAM3D(ref_path/'2phase_irregularGrid.dream3d','FeatureIds').material.flatten() - point_m = Grid.load_DREAM3D(ref_path/'2phase_irregularGrid.dream3d').material.flatten() + grain_m = Grid.load_DREAM3D(res_path/'2phase_irregularGrid.dream3d','FeatureIds').material.flatten() + point_m = Grid.load_DREAM3D(res_path/'2phase_irregularGrid.dream3d').material.flatten() for i in np.unique(point_m): j = int(grain_m[(point_m==i).nonzero()[0][0]]) @@ -193,11 +193,11 @@ class TestConfigMaterial: grain_c['material'][j]['constituents'][0]['phase'] - def test_load_DREAM3D_reference(self,tmp_path,ref_path,update): - cur = ConfigMaterial.load_DREAM3D(ref_path/'measured.dream3d') - ref = ConfigMaterial.load(ref_path/'measured.material.yaml') + def test_load_DREAM3D_reference(self,tmp_path,res_path,update): + cur = ConfigMaterial.load_DREAM3D(res_path/'measured.dream3d') + ref = ConfigMaterial.load(res_path/'measured.material.yaml') if update: - cur.save(ref_path/'measured.material.yaml') + cur.save(res_path/'measured.material.yaml') for i,m in enumerate(ref['material']): assert Rotation(m['constituents'][0]['O']).isclose(Rotation(cur['material'][i]['constituents'][0]['O'])) assert cur.is_valid and cur['phase'] == ref['phase'] and cur['homogenization'] == ref['homogenization'] diff --git a/python/tests/test_Grid.py b/python/tests/test_Grid.py index f443bb94d..ff9ca412f 100644 --- a/python/tests/test_Grid.py +++ b/python/tests/test_Grid.py @@ -34,9 +34,9 @@ def random(): return Grid.from_Voronoi_tessellation(cells,size,s) @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'Grid' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'Grid' class TestGrid: @@ -116,10 +116,10 @@ class TestGrid: (['y','z'], False) ] ) - def test_mirror(self,default,update,ref_path,directions,reflect): + def test_mirror(self,default,update,res_path,directions,reflect): modified = default.mirror(directions,reflect) tag = f'directions_{"-".join(directions)}+reflect_{reflect}' - reference = ref_path/f'mirror_{tag}.vti' + reference = res_path/f'mirror_{tag}.vti' if update: modified.save(reference) assert Grid.load(reference) == modified @@ -141,10 +141,10 @@ class TestGrid: ['y','z'], ] ) - def test_flip(self,default,update,ref_path,directions): + def test_flip(self,default,update,res_path,directions): modified = default.flip(directions) tag = f'directions_{"-".join(directions)}' - reference = ref_path/f'flip_{tag}.vti' + reference = res_path/f'flip_{tag}.vti' if update: modified.save(reference) assert Grid.load(reference) == modified @@ -175,9 +175,9 @@ class TestGrid: @pytest.mark.parametrize('distance',[1.,np.sqrt(3)]) @pytest.mark.parametrize('selection',[None,1,[1],[1,2,3]]) @pytest.mark.parametrize('periodic',[True,False]) - def test_clean_reference(self,default,update,ref_path,distance,selection,periodic): + def test_clean_reference(self,default,update,res_path,distance,selection,periodic): current = default.clean(distance,selection,periodic=periodic,rng_seed=0) - reference = ref_path/f'clean_{distance}_{util.srepr(selection,"+")}_{periodic}.vti' + reference = res_path/f'clean_{distance}_{util.srepr(selection,"+")}_{periodic}.vti' if update: current.save(reference) assert Grid.load(reference) == current @@ -202,10 +202,10 @@ class TestGrid: np.array((10,20,2)) ] ) - def test_scale(self,default,update,ref_path,cells): + def test_scale(self,default,update,res_path,cells): modified = default.scale(cells) tag = f'grid_{util.srepr(cells,"-")}' - reference = ref_path/f'scale_{tag}.vti' + reference = res_path/f'scale_{tag}.vti' if update: modified.save(reference) assert Grid.load(reference) == modified @@ -264,10 +264,10 @@ class TestGrid: @pytest.mark.parametrize('Eulers',[[32.0,68.0,21.0], [0.0,32.0,240.0]]) - def test_rotate(self,default,update,ref_path,Eulers): + def test_rotate(self,default,update,res_path,Eulers): modified = default.rotate(Rotation.from_Euler_angles(Eulers,degrees=True)) tag = f'Eulers_{util.srepr(Eulers,"-")}' - reference = ref_path/f'rotate_{tag}.vti' + reference = res_path/f'rotate_{tag}.vti' if update: modified.save(reference) assert Grid.load(reference) == modified @@ -471,12 +471,12 @@ class TestGrid: @pytest.mark.parametrize('periodic',[True,False]) @pytest.mark.parametrize('direction',['x','y','z',['x','y'],'zy','xz',['x','y','z']]) @pytest.mark.xfail(vtkVersion.GetVTKMajorVersion()<8, reason='missing METADATA') - def test_get_grain_boundaries(self,update,ref_path,periodic,direction): - grid = Grid.load(ref_path/'get_grain_boundaries_8g12x15x20.vti') + def test_get_grain_boundaries(self,update,res_path,periodic,direction): + grid = Grid.load(res_path/'get_grain_boundaries_8g12x15x20.vti') current = grid.get_grain_boundaries(periodic,direction) if update: - current.save(ref_path/f'get_grain_boundaries_8g12x15x20_{direction}_{periodic}.vtu',parallel=False) - reference = VTK.load(ref_path/f'get_grain_boundaries_8g12x15x20_{"".join(direction)}_{periodic}.vtu') + current.save(res_path/f'get_grain_boundaries_8g12x15x20_{direction}_{periodic}.vtu',parallel=False) + reference = VTK.load(res_path/f'get_grain_boundaries_8g12x15x20_{"".join(direction)}_{periodic}.vtu') assert current.__repr__() == reference.__repr__() @pytest.mark.parametrize('directions',[(1,2,'y'),('a','b','x'),[1]]) @@ -484,26 +484,26 @@ class TestGrid: with pytest.raises(ValueError): default.get_grain_boundaries(directions=directions) - def test_load_DREAM3D(self,ref_path): - grain = Grid.load_DREAM3D(ref_path/'2phase_irregularGrid.dream3d','FeatureIds') - point = Grid.load_DREAM3D(ref_path/'2phase_irregularGrid.dream3d') + def test_load_DREAM3D(self,res_path): + grain = Grid.load_DREAM3D(res_path/'2phase_irregularGrid.dream3d','FeatureIds') + point = Grid.load_DREAM3D(res_path/'2phase_irregularGrid.dream3d') assert np.allclose(grain.origin,point.origin) and \ np.allclose(grain.size,point.size) and \ (grain.sort().material == point.material+1).all() - def test_load_DREAM3D_reference(self,ref_path,update): - current = Grid.load_DREAM3D(ref_path/'measured.dream3d') - reference = Grid.load(ref_path/'measured.vti') + def test_load_DREAM3D_reference(self,res_path,update): + current = Grid.load_DREAM3D(res_path/'measured.dream3d') + reference = Grid.load(res_path/'measured.vti') if update: - current.save(ref_path/'measured.vti') + current.save(res_path/'measured.vti') assert current == reference - def test_load_Neper_reference(self,ref_path,update): - current = Grid.load_Neper(ref_path/'n10-id1_scaled.vtk') - reference = Grid.load(ref_path/'n10-id1_scaled.vti') + def test_load_Neper_reference(self,res_path,update): + current = Grid.load_Neper(res_path/'n10-id1_scaled.vtk') + reference = Grid.load(res_path/'n10-id1_scaled.vti') if update: - current.save(ref_path/'n10-id1_scaled.vti') + current.save(res_path/'n10-id1_scaled.vti') assert current == reference diff --git a/python/tests/test_Orientation.py b/python/tests/test_Orientation.py index 67fbeb51d..a45444908 100644 --- a/python/tests/test_Orientation.py +++ b/python/tests/test_Orientation.py @@ -13,9 +13,9 @@ crystal_families = set(_crystal.lattice_symmetries.values()) @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'Orientation' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'Orientation' @pytest.fixture def set_of_rodrigues(set_of_quaternions): @@ -313,8 +313,8 @@ class TestOrientation: @pytest.mark.parametrize('model',['Bain','KS','GT','GT_prime','NW','Pitsch']) @pytest.mark.parametrize('lattice',['cF','cI']) - def test_relationship_reference(self,update,ref_path,model,lattice): - reference = ref_path/f'{lattice}_{model}.txt' + def test_relationship_reference(self,update,res_path,model,lattice): + reference = res_path/f'{lattice}_{model}.txt' o = Orientation(lattice=lattice) eu = o.related(model).as_Euler_angles(degrees=True) if update: @@ -363,10 +363,10 @@ class TestOrientation: == o.shape + vector.shape[:-1] + (o.symmetry_operations.shape if with_symmetry else ()) + vector.shape[-1:] @pytest.mark.parametrize('lattice',['hP','cI','cF']) #tI not included yet - def test_Schmid(self,update,ref_path,lattice): + def test_Schmid(self,update,res_path,lattice): O = Orientation(lattice=lattice) # noqa for mode in ['slip','twin']: - reference = ref_path/f'{lattice}_{mode}.txt' + reference = res_path/f'{lattice}_{mode}.txt' P = O.Schmid(N_slip='*') if mode == 'slip' else O.Schmid(N_twin='*') if update: table = Table(P.reshape(-1,9),{'Schmid':(3,3,)}) diff --git a/python/tests/test_Result.py b/python/tests/test_Result.py index b8d31070b..a775e1c2d 100644 --- a/python/tests/test_Result.py +++ b/python/tests/test_Result.py @@ -28,23 +28,23 @@ from damask import grid_filters @pytest.fixture -def default(tmp_path,ref_path): +def default(tmp_path,res_path): """Small Result file in temp location for modification.""" fname = '12grains6x7x8_tensionY.hdf5' - shutil.copy(ref_path/fname,tmp_path) + shutil.copy(res_path/fname,tmp_path) return Result(tmp_path/fname).view(times=20.0) @pytest.fixture -def single_phase(tmp_path,ref_path): +def single_phase(tmp_path,res_path): """Single phase Result file in temp location for modification.""" fname = '6grains6x7x8_single_phase_tensionY.hdf5' - shutil.copy(ref_path/fname,tmp_path) + shutil.copy(res_path/fname,tmp_path) return Result(tmp_path/fname) @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'Result' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'Result' def dict_equal(d1, d2): for k in d1: @@ -295,8 +295,8 @@ class TestResult: with pytest.raises(TypeError): default.add_calculation('#invalid#*2') - def test_add_generic_grid_invalid(self,ref_path): - result = Result(ref_path/'4grains2x4x3_compressionY.hdf5') + def test_add_generic_grid_invalid(self,res_path): + result = Result(res_path/'4grains2x4x3_compressionY.hdf5') with pytest.raises(NotImplementedError): result.add_curl('F') @@ -395,8 +395,8 @@ class TestResult: '6grains6x7x8_single_phase_tensionY.hdf5'],ids=range(3)) @pytest.mark.parametrize('inc',[4,0],ids=range(2)) @pytest.mark.xfail(vtkVersion.GetVTKMajorVersion()<9, reason='missing "Direction" attribute') - def test_export_vtk(self,request,tmp_path,ref_path,update,patch_execution_stamp,patch_datetime_now,output,fname,inc): - result = Result(ref_path/fname).view(increments=inc) + def test_export_vtk(self,request,tmp_path,res_path,update,patch_execution_stamp,patch_datetime_now,output,fname,inc): + result = Result(res_path/fname).view(increments=inc) result.export_VTK(output,target_dir=tmp_path,parallel=False) fname = fname.split('.')[0]+f'_inc{(inc if type(inc) == int else inc[0]):0>2}.vti' v = VTK.load(tmp_path/fname) @@ -405,20 +405,20 @@ class TestResult: with open(tmp_path/fname,'rb') as f: cur = hashlib.md5(f.read()).hexdigest() if update: - with open((ref_path/'export_VTK'/request.node.name).with_suffix('.md5'),'w') as f: + with open((res_path/'export_VTK'/request.node.name).with_suffix('.md5'),'w') as f: f.write(cur+'\n') - with open((ref_path/'export_VTK'/request.node.name).with_suffix('.md5')) as f: + with open((res_path/'export_VTK'/request.node.name).with_suffix('.md5')) as f: assert cur == f.read().strip('\n') @pytest.mark.parametrize('mode',['point','cell']) @pytest.mark.parametrize('output',[False,True]) - def test_export_vtk_marc(self,tmp_path,ref_path,mode,output): + def test_export_vtk_marc(self,tmp_path,res_path,mode,output): os.chdir(tmp_path) - result = Result(ref_path/'check_compile_job1.hdf5') + result = Result(res_path/'check_compile_job1.hdf5') result.export_VTK(output,mode) - def test_marc_coordinates(self,ref_path): - result = Result(ref_path/'check_compile_job1.hdf5').view(increments=-1) + def test_marc_coordinates(self,res_path): + result = Result(res_path/'check_compile_job1.hdf5').view(increments=-1) c_n = result.coordinates0_node + result.get('u_n') c_p = result.coordinates0_point + result.get('u_p') assert len(c_n) > len(c_p) @@ -437,15 +437,15 @@ class TestResult: single_phase.export_VTK(mode='point',target_dir=export_dir,parallel=False) assert set(os.listdir(export_dir)) == set([f'{single_phase.fname.stem}_inc{i:02}.vtp' for i in range(0,40+1,4)]) - def test_XDMF_datatypes(self,tmp_path,single_phase,update,ref_path): + def test_XDMF_datatypes(self,tmp_path,single_phase,update,res_path): for what,shape in {'scalar':(),'vector':(3,),'tensor':(3,3),'matrix':(12,)}.items(): for dtype in ['f4','f8','i1','i2','i4','i8','u1','u2','u4','u8']: single_phase.add_calculation(f"np.ones(np.shape(#F#)[0:1]+{shape},'{dtype}')",f'{what}_{dtype}') xdmf_path = tmp_path/single_phase.fname.with_suffix('.xdmf').name single_phase.export_XDMF(target_dir=tmp_path) if update: - shutil.copy(xdmf_path,ref_path/xdmf_path.name) - assert sorted(open(xdmf_path).read()) == sorted(open(ref_path/xdmf_path.name).read()) + shutil.copy(xdmf_path,res_path/xdmf_path.name) + assert sorted(open(xdmf_path).read()) == sorted(open(res_path/xdmf_path.name).read()) @pytest.mark.skipif(not hasattr(vtkXdmfReader,'GetOutput'),reason='https://discourse.vtk.org/t/2450') def test_XDMF_shape(self,tmp_path,single_phase): @@ -513,18 +513,18 @@ class TestResult: ({'phases':False},['Delta_V'],True,True), ({},['u_p','u_n'],False,False)], ids=list(range(8))) - def test_get(self,update,request,ref_path,view,output,flatten,prune): - result = Result(ref_path/'4grains2x4x3_compressionY.hdf5') + def test_get(self,update,request,res_path,view,output,flatten,prune): + result = Result(res_path/'4grains2x4x3_compressionY.hdf5') for key,value in view.items(): result = result.view(**{key:value}) fname = request.node.name cur = result.get(output,flatten,prune) if update: - with bz2.BZ2File((ref_path/'get'/fname).with_suffix('.pbz2'),'w') as f: + with bz2.BZ2File((res_path/'get'/fname).with_suffix('.pbz2'),'w') as f: pickle.dump(cur,f) - with bz2.BZ2File((ref_path/'get'/fname).with_suffix('.pbz2')) as f: + with bz2.BZ2File((res_path/'get'/fname).with_suffix('.pbz2')) as f: ref = pickle.load(f) assert cur is None if ref is None else dict_equal(cur,ref) @@ -538,18 +538,18 @@ class TestResult: ({'phases':False},['Delta_V'],True,True,[1,2,4]), ({},['u_p','u_n'],False,False,None)], ids=list(range(8))) - def test_place(self,update,request,ref_path,view,output,flatten,prune,constituents): - result = Result(ref_path/'4grains2x4x3_compressionY.hdf5') + def test_place(self,update,request,res_path,view,output,flatten,prune,constituents): + result = Result(res_path/'4grains2x4x3_compressionY.hdf5') for key,value in view.items(): result = result.view(**{key:value}) fname = request.node.name cur = result.place(output,flatten,prune,constituents) if update: - with bz2.BZ2File((ref_path/'place'/fname).with_suffix('.pbz2'),'w') as f: + with bz2.BZ2File((res_path/'place'/fname).with_suffix('.pbz2'),'w') as f: pickle.dump(cur,f) - with bz2.BZ2File((ref_path/'place'/fname).with_suffix('.pbz2')) as f: + with bz2.BZ2File((res_path/'place'/fname).with_suffix('.pbz2')) as f: ref = pickle.load(f) assert cur is None if ref is None else dict_equal(cur,ref) @@ -576,27 +576,27 @@ class TestResult: @pytest.mark.parametrize('output',['12grains6x7x8.vti', 'tensionY.yaml', ]) - def test_export_simulation_setup_content(self,ref_path,tmp_path,default,output): + def test_export_simulation_setup_content(self,res_path,tmp_path,default,output): default.export_simulation_setup(output,target_dir=tmp_path,overwrite=True) - assert open(tmp_path/output).read() == open(ref_path/output).read() + assert open(tmp_path/output).read() == open(res_path/output).read() @pytest.mark.parametrize('fname',['4grains2x4x3_compressionY.hdf5', '6grains6x7x8_single_phase_tensionY.hdf5']) @pytest.mark.parametrize('output',['material.yaml','*']) - def test_export_simulation_setup_consistency(self,ref_path,tmp_path,fname,output): - r = Result(ref_path/fname) + def test_export_simulation_setup_consistency(self,res_path,tmp_path,fname,output): + r = Result(res_path/fname) r.export_simulation_setup(output,target_dir=tmp_path) - with h5py.File(ref_path/fname,'r') as f_hdf5: + with h5py.File(res_path/fname,'r') as f_hdf5: for file in fnmatch.filter(f_hdf5['setup'].keys(),output): with open(tmp_path/file) as f: assert f_hdf5[f'setup/{file}'][()][0].decode() == f.read() - def test_export_simulation_setup_custom_path(self,ref_path,tmp_path): + def test_export_simulation_setup_custom_path(self,res_path,tmp_path): subdir = 'export_dir' absdir = tmp_path/subdir absdir.mkdir(exist_ok=True) - r = Result(ref_path/'4grains2x4x3_compressionY.hdf5') + r = Result(res_path/'4grains2x4x3_compressionY.hdf5') for t,cwd in zip([absdir,subdir,None],[tmp_path,tmp_path,absdir]): os.chdir(cwd) r.export_simulation_setup('material.yaml',target_dir=t) @@ -606,8 +606,8 @@ class TestResult: '6grains6x7x8_single_phase_tensionY.hdf5', '12grains6x7x8_tensionY.hdf5', 'check_compile_job1.hdf5',]) - def test_export_DADF5(self,ref_path,tmp_path,fname): - r = Result(ref_path/fname) + def test_export_DADF5(self,res_path,tmp_path,fname): + r = Result(res_path/fname) r = r.view(phases = random.sample(r.phases,1)) r = r.view(increments = random.sample(r.increments,np.random.randint(1,len(r.increments)))) r.export_DADF5(tmp_path/fname) @@ -617,16 +617,16 @@ class TestResult: @pytest.mark.parametrize('fname',['4grains2x4x3_compressionY.hdf5', '6grains6x7x8_single_phase_tensionY.hdf5']) - def test_export_DADF5_name_clash(self,ref_path,tmp_path,fname): - r = Result(ref_path/fname) + def test_export_DADF5_name_clash(self,res_path,tmp_path,fname): + r = Result(res_path/fname) with pytest.raises(PermissionError): r.export_DADF5(r.fname) @pytest.mark.parametrize('fname',['4grains2x4x3_compressionY.hdf5', '6grains6x7x8_single_phase_tensionY.hdf5', '12grains6x7x8_tensionY.hdf5']) - def test_export_DADF5_regrid(self,ref_path,tmp_path,fname): - r = Result(ref_path/fname) + def test_export_DADF5_regrid(self,res_path,tmp_path,fname): + r = Result(res_path/fname) m = grid_filters.regrid(r.size,np.broadcast_to(np.eye(3),tuple(r.cells)+(3,3)),r.cells*2) r.export_DADF5(tmp_path/'regridded.hdf5',mapping=m) assert np.all(Result(tmp_path/'regridded.hdf5').cells == r.cells*2) diff --git a/python/tests/test_Rotation.py b/python/tests/test_Rotation.py index 056af2a93..6e135212f 100644 --- a/python/tests/test_Rotation.py +++ b/python/tests/test_Rotation.py @@ -12,9 +12,9 @@ n = 1000 atol=1.e-4 @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'Rotation' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'Rotation' @pytest.fixture def set_of_rotations(set_of_quaternions): @@ -1179,12 +1179,12 @@ class TestRotation: @pytest.mark.parametrize('fractions',[True,False]) @pytest.mark.parametrize('degrees',[True,False]) @pytest.mark.parametrize('shape',[2**13,2**14,2**15,(2**8,2**6)]) - def test_ODF_cell(self,ref_path,fractions,degrees,shape): + def test_ODF_cell(self,res_path,fractions,degrees,shape): steps = np.array([144,36,36]) limits = np.array([360.,90.,90.]) rng = tuple(zip(np.zeros(3),limits)) - weights = Table.load(ref_path/'ODF_experimental_cell.txt').get('intensity').flatten() + weights = Table.load(res_path/'ODF_experimental_cell.txt').get('intensity').flatten() Eulers = grid_filters.coordinates0_point(steps,limits) Eulers = np.radians(Eulers) if not degrees else Eulers @@ -1195,12 +1195,12 @@ class TestRotation: @pytest.mark.parametrize('degrees',[True,False]) @pytest.mark.parametrize('shape',[2**13,2**14,2**15,(2**8,2**6)]) - def test_ODF_node(self,ref_path,degrees,shape): + def test_ODF_node(self,res_path,degrees,shape): steps = np.array([144,36,36]) limits = np.array([360.,90.,90.]) rng = tuple(zip(-limits/steps*.5,limits-limits/steps*.5)) - weights = Table.load(ref_path/'ODF_experimental.txt').get('intensity') + weights = Table.load(res_path/'ODF_experimental.txt').get('intensity') weights = weights.reshape(steps+1,order='F')[:-1,:-1,:-1].reshape(-1,order='F') Eulers = grid_filters.coordinates0_node(steps,limits)[:-1,:-1,:-1] diff --git a/python/tests/test_Table.py b/python/tests/test_Table.py index 5199d5a1b..6d922b7cc 100644 --- a/python/tests/test_Table.py +++ b/python/tests/test_Table.py @@ -13,9 +13,9 @@ def default(): ['test data','contains five rows of only ones']) @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'Table' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'Table' class TestTable: @@ -104,8 +104,8 @@ class TestTable: default.save(tmp_path/'shouldnotbethere.txt',format='invalid') @pytest.mark.parametrize('mode',['str','path','file']) - def test_read_ang_mode(self,ref_path,mode): - where = ref_path/'simple.ang' + def test_read_ang_mode(self,res_path,mode): + where = res_path/'simple.ang' fname = {'path': where, 'str': str(where), 'file': open(where)}[mode] @@ -113,19 +113,19 @@ class TestTable: assert new.data.shape == (4,10) and \ new.labels == ['eu', 'pos', 'IQ', 'CI', 'ID', 'intensity', 'fit'] - def test_read_ang_shapes(self,ref_path): - new = Table.load_ang(str(ref_path/'simple.ang'),shapes={}) + def test_read_ang_shapes(self,res_path): + new = Table.load_ang(str(res_path/'simple.ang'),shapes={}) assert new.data.shape == (4,10) and new.labels == ['unknown'] - def test_save_ang(self,ref_path,tmp_path): - orig = Table.load_ang(ref_path/'simple.ang') + def test_save_ang(self,res_path,tmp_path): + orig = Table.load_ang(res_path/'simple.ang') orig.save(tmp_path/'simple.ang',with_labels=False) saved = Table.load_ang(tmp_path/'simple.ang') assert saved == orig @pytest.mark.parametrize('fname',['datatype-mix.txt','whitespace-mix.txt']) - def test_read_strange(self,ref_path,fname): - with open(ref_path/fname) as f: + def test_read_strange(self,res_path,fname): + with open(res_path/fname) as f: Table.load(f) def test_rename_equivalent(self): diff --git a/python/tests/test_VTK.py b/python/tests/test_VTK.py index fa1fa440d..0368d1d16 100644 --- a/python/tests/test_VTK.py +++ b/python/tests/test_VTK.py @@ -14,9 +14,9 @@ from damask import Table from damask import Colormap @pytest.fixture -def ref_path(ref_path_base): - """Directory containing reference results.""" - return ref_path_base/'VTK' +def res_path(res_path_base): + """Directory containing testing resources.""" + return res_path_base/'VTK' @pytest.fixture def default(): @@ -223,18 +223,18 @@ class TestVTK: assert new.comments == ['this is a comment'] @pytest.mark.xfail(vtkVersion.GetVTKMajorVersion()<8, reason='missing METADATA') - def test_compare_reference_polyData(self,update,ref_path,tmp_path): + def test_compare_reference_polyData(self,update,res_path,tmp_path): points=np.dstack((np.linspace(0.,1.,10),np.linspace(0.,2.,10),np.linspace(-1.,1.,10))).squeeze() polyData = VTK.from_poly_data(points).set('coordinates',points) if update: - polyData.save(ref_path/'polyData') + polyData.save(res_path/'polyData') else: - reference = VTK.load(ref_path/'polyData.vtp') + reference = VTK.load(res_path/'polyData.vtp') assert polyData.as_ASCII() == reference.as_ASCII() and \ np.allclose(polyData.get('coordinates'),points) @pytest.mark.xfail(vtkVersion.GetVTKMajorVersion()<8, reason='missing METADATA') - def test_compare_reference_rectilinearGrid(self,update,ref_path,tmp_path): + def test_compare_reference_rectilinearGrid(self,update,res_path,tmp_path): grid = [np.arange(4)**2., np.arange(5)**2., np.arange(6)**2.] # ParaView renders tetrahedral meshing unless using float coordinates! @@ -245,8 +245,8 @@ class TestVTK: .set('cell',np.ascontiguousarray(c)) \ .set('node',np.ascontiguousarray(n)) if update: - rectilinearGrid.save(ref_path/'rectilinearGrid') + rectilinearGrid.save(res_path/'rectilinearGrid') else: - reference = VTK.load(ref_path/'rectilinearGrid.vtr') + reference = VTK.load(res_path/'rectilinearGrid.vtr') assert rectilinearGrid.as_ASCII() == reference.as_ASCII() and \ np.allclose(rectilinearGrid.get('cell'),c)