Exemple #1
0
def test_date_str_to_datetime_errors():

    s = "not a date"

    with pytest.raises(ValueError):

        utils.date_str_to_datetime(s)
Exemple #2
0
def test_date_str_to_datetime_hours():

    s = "2020_04_30_16"

    res = utils.date_str_to_datetime(s)

    assert type(res) is datetime