Skip to content

Commit f13e166

Browse files
author
Vasileios Karakasis
committed
Add unit test for node duplicates
1 parent c28856c commit f13e166

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unittests/test_utility.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,9 @@ def test_nodelist_abbrev():
17461746
assert nodelist([]) == ''
17471747
assert nodelist(['nid001']) == 'nid001'
17481748

1749+
# Test node duplicates
1750+
assert nodelist(['nid001', 'nid001', 'nid002']) == 'nid001,nid00[1-2]'
1751+
17491752
with pytest.raises(TypeError, match='nodes argument must be a Sequence'):
17501753
nodelist(1)
17511754

0 commit comments

Comments
 (0)