Closed mark-hobbs closed 3 years ago
You can view the tests in peripy/test/
These tests are listed below. They make sure that the mesh is identical to the one that was given with the package.
The meshes are stored in "peripy/test/data" and you probably haven't changed anything in there, but if you put git ignore vtk then these meshes will not get pushed to the repo, so you can't use gitignore vtk. Instead, you could git ignore the individual files that you create when making a new example. This doesn't explain why its failing though so not sure about that.
I would recommend when making a new example, creating a new directory "example3" and just gitignoring that directory.
def test_mesh_cython(self, regression_cython, data_path, tmp_path):
"""Ensure mesh file is identical."""
model, displacements, damage, *_ = regression_cython
path = data_path
mesh = tmp_path / "mesh.vtk"
expected_mesh = path / "expected_mesh.vtk"
model.write_mesh(mesh, damage, displacements)
assert(
mesh.read_bytes().split(b"\n")[2:] ==
expected_mesh.read_bytes().split(b"\n")[2:]
)
def test_mesh_cl(self, regression_cl, data_path, tmp_path):
"""Ensure mesh file is identical."""
model, displacements, damage, *_ = regression_cl
path = data_path
mesh = tmp_path / "mesh.vtk"
expected_mesh = path / "expected_mesh_cl.vtk"
model.write_mesh(mesh, damage, displacements)
assert(
mesh.read_bytes().split(b"\n")[2:] ==
expected_mesh.read_bytes().split(b"\n")[2:]
)
Fixed it. Reverted to Jim's original testing code @pytest.mark.skip(reason="Stalling"
which skips the test on travis if it stalls like this.
Two tests are failing. I initially thought that this might be related to a recent edit to the .gitignore file (ignore .vtk file types) but this does not appear to be the case. I returned to the original code and the tests still fail. I have attached details below. @bb515 do you have any idea what might be causing these tests to fail? It isn't clear to me what these tests do.