diff --git a/cmeutils/tests/test_geometry.py b/cmeutils/tests/test_geometry.py index b5c59e3..c38a577 100644 --- a/cmeutils/tests/test_geometry.py +++ b/cmeutils/tests/test_geometry.py @@ -17,10 +17,6 @@ class TestGeometry(BaseTest): def test_backbone_vector(self): - with pytest.raises(ValueError): - coordinates = np.array([1, 1, 1]) - get_backbone_vector(coordinates) - z_coords = np.array([[0, 0, 1], [0, 0, 2], [0, 0, 3]]) backbone = get_backbone_vector(z_coords) assert np.allclose(backbone, np.array([0, 0, 1]), atol=1e-5) @@ -33,6 +29,11 @@ def test_backbone_vector(self): chain_backbone = get_backbone_vector(mb_chain.xyz) assert np.allclose(chain_backbone, np.array([0, 1, 0]), atol=1e-2) + def test_backbone_vector_bad_input(self): + with pytest.raises(ValueError): + coordinates = np.array([1, 1, 1]) + get_backbone_vector(coordinates) + def test_moit(self): _moit = moit(points=[(-1, 0, 0), (1, 0, 0)], masses=[1, 1]) assert np.array_equal(_moit, np.array([0, 2.0, 2.0]))