Skip to content

Commit 59b6fbe

Browse files
committed
Add test for bad MDTraj atom index input
1 parent 2ba6390 commit 59b6fbe

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pytest
2+
import numpy.testing as npt
3+
4+
from paths_cli.parsing.tools import *
5+
6+
@pytest.mark.parametrize('expr,expected', [
7+
('1+1', 2)
8+
])
9+
def test_custom_eval(expr, expected):
10+
npt.assert_allclose(custom_eval(expr), expected)
11+
12+
def test_mdtraj_parse_atomlist_bad_input():
13+
with pytest.raises(TypeError, match="not integers"):
14+
mdtraj_parse_atomlist("['a', 'b']", n_atoms=2)

0 commit comments

Comments
 (0)