Пример #1
0
 def test_explode_location_invalid(self):
     with pytest.raises(AssertionError):
         assert locations.explode_locations(['a', 'b'])
Пример #2
0
 def test_explode_location_mixed(self):
     assert (locations.explode_locations('a,b,1--3,c') == [
         'a', 'b', '1', '2', '3', 'c'
     ])
Пример #3
0
 def test_explode_location_empty(self):
     with pytest.raises(KeyError):
         assert locations.explode_locations('')
Пример #4
0
 def test_explore_location_list(self):
     assert locations.explode_locations('1,2,3') == ['1', '2', '3']
Пример #5
0
 def test_explode_location_range_nonnumeric(self):
     with pytest.raises(ValueError):
         locations.explode_locations('a--c')
Пример #6
0
 def test_explode_location_range_backwards(self):
     with pytest.raises(KeyError):
         locations.explode_locations('3--1')
Пример #7
0
 def test_explode_location_range(self):
     assert locations.explode_locations('1--3') == ['1', '2', '3']
Пример #8
0
 def test_explode_location_single(self):
     assert locations.explode_locations('a') == ['a']