@@ -0,0 +1,886 @@
+from datetime import datetime, timezone, timedelta%0Afrom dateutil.tz import tzoffset%0A%0Aimport pytest%0A%0Afrom twtxt.parser import make_aware, parse_iso8601, parse_string%0A%0A%0Adef test_make_aware():%0A    aware = datetime.now(timezone.utc)%0A    unaware = aware.replace(tzinfo=None)%0A    assert make_aware(unaware) %3E= aware%0A    assert make_aware(aware) == aware%0A%0A%0Adef test_parse_iso8601():%0A    as_string = %222016-02-05T02:52:15.030474+01:00%22%0A    as_datetime = datetime(2016, 2, 5, 2, 52, 15, 30474, tzinfo=tzoffset(None, 3600))%0A    assert parse_iso8601(as_string) == as_datetime%0A%0A    as_string = %222016-02-05T02:52:15%22%0A    as_datetime = datetime(2016, 2, 5, 2, 52, 15, tzinfo=timezone.utc)%0A    assert parse_iso8601(as_string) == as_datetime%0A%0A    with pytest.raises(ValueError) as e:%0A        parse_iso8601(%22foobar%22)%0A    assert %22Unknown string format%22 in str(e.value)%0A%0A%0Adef test_parse_string():%0A    pass%0A

Add tests for twtxt.parser