Skip to content

Commit 08f8b98

Browse files
committed
add UT for exception
1 parent 350c5a5 commit 08f8b98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

testsuite/MDAnalysisTests/core/test_atomselections.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,12 @@ def test_invalid_prop_selection(self, universe):
10871087
with pytest.raises(SelectionError, match="Expected one of"):
10881088
universe.select_atoms("prop parsnip < 2")
10891089

1090+
def test_invalid_relprop_selection(self, universe):
1091+
with pytest.raises(SelectionError, match="Expected one of"):
1092+
universe.select_atoms("relprop parsnip < 2 index 0")
1093+
with pytest.raises(SelectionError, match="Unknown selection token"):
1094+
universe.select_atoms("relprop z < 2")
1095+
10901096

10911097
def test_segid_and_resid():
10921098
u = make_Universe(('segids', 'resids'))

0 commit comments

Comments
 (0)