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