コード例 #1
0
def test_iso_format_with_time_zone_case_1():
    # python -m pytest tests/unit/time/test_time.py -s -v -k test_iso_format_with_time_zone_case_1
    expected = Time(7, 54, 2.129790999, tzinfo=timezone_utc)
    assert expected.iso_format() == "07:54:02.129790999+00:00"
    assert expected.tzinfo == FixedOffset(0)
    actual = Time.from_iso_format("07:54:02.129790999+00:00")
    assert expected == actual
コード例 #2
0
 def test_iso_format_with_trailing_zeroes(self):
     t = Time(12, 34, 56.789)
     self.assertEqual("12:34:56.789000000", t.iso_format())
コード例 #3
0
 def test_iso_format(self):
     t = Time(12, 34, 56.789123456)
     self.assertEqual("12:34:56.789123456", t.iso_format())