Esempio n. 1
0
def test_timestamp_seconds():
    """Test timestamp parser function on timestamps strings with no microseconds."""
    assert timestamp('2007-08-08T20:18:36') == datetime.datetime(2007, 8, 8, 20, 18, 36)
    assert timestamp('2010-09-01T04:33:59') == datetime.datetime(2010, 9, 1, 4, 33, 59)
Esempio n. 2
0
def test_timestamp_seconds():
    """Test timestamp parser function on timestamps strings with no microseconds."""
    assert timestamp('2007-08-08T20:18:36') == datetime.datetime(2007, 8, 8, 20, 18, 36)
    assert timestamp('2010-09-01T04:33:59') == datetime.datetime(2010, 9, 1, 4, 33, 59)
Esempio n. 3
0
def test_timestamp_microseconds():
    """Test timestamp parser function on timestamps strings with microseconds."""
    assert timestamp('2007-08-08T20:18:36.593') == datetime.datetime(2007, 8, 8, 20, 18, 36, 593000)
    assert timestamp('2035-12-31T23:59:59.999') == datetime.datetime(2035, 12, 31, 23, 59, 59, 999000)
Esempio n. 4
0
def test_timestamp_microseconds():
    """Test timestamp parser function on timestamps strings with microseconds."""
    assert timestamp('2007-08-08T20:18:36.593') == datetime.datetime(2007, 8, 8, 20, 18, 36, 593000)
    assert timestamp('2035-12-31T23:59:59.999') == datetime.datetime(2035, 12, 31, 23, 59, 59, 999000)