MCPcopy Create free account
hub / github.com/pmneila/PyMCubes / test_invalid_input

Function test_invalid_input

test_mcubes.py:57–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57def test_invalid_input():
58
59 def func(x, y, z):
60 return x**2 + y**2 + z**2 - 1
61
62 mcubes.marching_cubes_func((-1.5, -1.5, -1.5), (1.5, 1.5, 1.5), 10, 10, 10, func, 0)
63
64 with pytest.raises(ValueError):
65 mcubes.marching_cubes_func((0, 0, 0), (0, 0, 0), 10, 10, 10, func, 0)
66
67 with pytest.raises(ValueError):
68 mcubes.marching_cubes_func((-1.5, -1.5, -1.5), (1.5, 1.5, 1.5), 1, 10, 10, func, 0)
69
70 with pytest.raises(Exception):
71 mcubes.marching_cubes_func((-1.5, -1.5), (1.5, 1.5, 1.5), 10, 10, 10, func, 0)
72
73 with pytest.raises(Exception):
74 mcubes.marching_cubes_func((-1.5, -1.5, -1.5), (1.5, 1.5), 10, 10, 10, func, 0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected