def test_split_valid(): parts = tsn.split('sea_floor_surface__elevation@t=123') assert_tuple_equal(parts, ('sea_floor_surface__elevation', 123))
def test_split_time_stamp_with_leading_zeros(): parts = tsn.split('sea_floor_surface__elevation@t=0001') assert_is(parts[1], 1)
def test_split_bad_time_stamp(): with assert_raises(tsn.TimeSeriesNameError): tsn.split('sea_floor_surface__elevation@t=12.2')
def test_split_valid(): parts = tsn.split("sea_floor_surface__elevation@t=123") assert parts == ("sea_floor_surface__elevation", 123)
def test_split_time_stamp_with_leading_zeros(): parts = tsn.split("sea_floor_surface__elevation@t=0001") assert parts[1] == 1
def test_split_bad_time_stamp(): with pytest.raises(tsn.TimeSeriesNameError): tsn.split("sea_floor_surface__elevation@t=12.2")