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