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