Skip to content

Commit

Permalink
Add version test
Browse files Browse the repository at this point in the history
  • Loading branch information
hmacdope authored Oct 19, 2024
1 parent 0fa195e commit 3b630a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions distopia/tests/test_distopia.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@




def convert_ndarray(*args, dtype):
if len(args) == 1:
return np.asarray(args[0], dtype=dtype)
else:
return (np.asarray(a, dtype=dtype) for a in args)


def test_version():
assert distopia.__version__

class TestDistances:
def arange_input(self, N, dtype):
return np.arange(3 * N, dtype=dtype).reshape(N, 3)
Expand Down Expand Up @@ -398,4 +401,4 @@ def test_periodic_angles(self, box_bonds, positions_angles, dtype):
test3 = distopia.calc_angles_ortho(a, b, c2, box=box)

for val in [test1, test2, test3]:
assert_almost_equal(ref, val, self.prec, err_msg="Min image in angle calculation failed")
assert_almost_equal(ref, val, self.prec, err_msg="Min image in angle calculation failed")

0 comments on commit 3b630a0

Please sign in to comment.