Example #1
0
def test_py36_isoformat_invalid():
    with pytest.raises(ValueError):
        _fromisoformat_py36('not a datetime')
Example #2
0
def test_py36_isoformat_microsecs(dt):
    s = dt.isoformat()
    assert _fromisoformat_py36(s) == dt
Example #3
0
def test_py36_isoformat_seconds(dt):
    rounded_dt = dt.replace(microsecond=0)
    s = rounded_dt.isoformat()
    assert _fromisoformat_py36(s) == rounded_dt
Example #4
0
def test_py36_isoformat_tz_punct():
    _fromisoformat_py36('2020-12-31T11:22:33+10:30')