Exemplo n.º 1
0
    def test_split_tz(self):
        self.assertEqual(_split_tz('01:23:45'), ('01:23:45', None))

        self.assertEqual(_split_tz('24:00:00'), ('24:00:00', None))

        self.assertEqual(_split_tz('23:21:28.512400'),
                         ('23:21:28.512400', None))

        self.assertEqual(_split_tz('01:23'), ('01:23', None))

        self.assertEqual(_split_tz('24:00'), ('24:00', None))

        self.assertEqual(_split_tz('01:23.4567'), ('01:23.4567', None))

        self.assertEqual(_split_tz('012345'), ('012345', None))

        self.assertEqual(_split_tz('240000'), ('240000', None))

        self.assertEqual(_split_tz('0123'), ('0123', None))

        self.assertEqual(_split_tz('2400'), ('2400', None))

        self.assertEqual(_split_tz('01'), ('01', None))

        self.assertEqual(_split_tz('24'), ('24', None))

        self.assertEqual(_split_tz('12.5'), ('12.5', None))

        self.assertEqual(_split_tz('232128.512400+00:00'),
                         ('232128.512400', '+00:00'))

        self.assertEqual(_split_tz('0123.4567+00:00'), ('0123.4567', '+00:00'))

        self.assertEqual(_split_tz('01.4567+00:00'), ('01.4567', '+00:00'))

        self.assertEqual(_split_tz('01:23:45+00:00'), ('01:23:45', '+00:00'))

        self.assertEqual(_split_tz('24:00:00+00:00'), ('24:00:00', '+00:00'))

        self.assertEqual(_split_tz('23:21:28.512400+00:00'),
                         ('23:21:28.512400', '+00:00'))

        self.assertEqual(_split_tz('01:23+00:00'), ('01:23', '+00:00'))

        self.assertEqual(_split_tz('24:00+00:00'), ('24:00', '+00:00'))

        self.assertEqual(_split_tz('01:23.4567+00:00'),
                         ('01:23.4567', '+00:00'))

        self.assertEqual(_split_tz('23:21:28.512400+11:15'),
                         ('23:21:28.512400', '+11:15'))

        self.assertEqual(_split_tz('23:21:28.512400-12:34'),
                         ('23:21:28.512400', '-12:34'))

        self.assertEqual(_split_tz('23:21:28.512400Z'),
                         ('23:21:28.512400', 'Z'))

        self.assertEqual(_split_tz('06:14:00.000123Z'),
                         ('06:14:00.000123', 'Z'))
Exemplo n.º 2
0
    def test_split_tz(self):
        self.assertEqual(_split_tz('01:23:45'), ('01:23:45', None))

        self.assertEqual(_split_tz('24:00:00'), ('24:00:00', None))

        self.assertEqual(_split_tz('23:21:28.512400'),
                         ('23:21:28.512400', None))

        self.assertEqual(_split_tz('01:23'), ('01:23', None))

        self.assertEqual(_split_tz('24:00'), ('24:00', None))

        self.assertEqual(_split_tz('01:23.4567'), ('01:23.4567', None))

        self.assertEqual(_split_tz('012345'), ('012345', None))

        self.assertEqual(_split_tz('240000'), ('240000', None))

        self.assertEqual(_split_tz('0123'), ('0123', None))

        self.assertEqual(_split_tz('2400'), ('2400', None))

        self.assertEqual(_split_tz('01'), ('01', None))

        self.assertEqual(_split_tz('24'), ('24', None))

        self.assertEqual(_split_tz('12.5'), ('12.5', None))

        self.assertEqual(_split_tz('232128.512400+00:00'),
                         ('232128.512400', '+00:00'))

        self.assertEqual(_split_tz('0123.4567+00:00'), ('0123.4567', '+00:00'))

        self.assertEqual(_split_tz('01.4567+00:00'), ('01.4567', '+00:00'))

        self.assertEqual(_split_tz('01:23:45+00:00'), ('01:23:45', '+00:00'))

        self.assertEqual(_split_tz('24:00:00+00:00'), ('24:00:00', '+00:00'))

        self.assertEqual(_split_tz('23:21:28.512400+00:00'),
                         ('23:21:28.512400', '+00:00'))

        self.assertEqual(_split_tz('01:23+00:00'), ('01:23', '+00:00'))

        self.assertEqual(_split_tz('24:00+00:00'), ('24:00', '+00:00'))

        self.assertEqual(_split_tz('01:23.4567+00:00'),
                         ('01:23.4567', '+00:00'))

        self.assertEqual(_split_tz('23:21:28.512400+11:15'),
                         ('23:21:28.512400', '+11:15'))

        self.assertEqual(_split_tz('23:21:28.512400-12:34'),
                         ('23:21:28.512400', '-12:34'))

        self.assertEqual(_split_tz('23:21:28.512400Z'),
                         ('23:21:28.512400', 'Z'))

        self.assertEqual(_split_tz('06:14:00.000123Z'),
                         ('06:14:00.000123', 'Z'))
Exemplo n.º 3
0
    def test_split_tz(self):
        self.assertEqual(_split_tz("01:23:45"), ("01:23:45", None))

        self.assertEqual(_split_tz("24:00:00"), ("24:00:00", None))

        self.assertEqual(_split_tz("23:21:28.512400"),
                         ("23:21:28.512400", None))

        self.assertEqual(_split_tz("01:23"), ("01:23", None))

        self.assertEqual(_split_tz("24:00"), ("24:00", None))

        self.assertEqual(_split_tz("01:23.4567"), ("01:23.4567", None))

        self.assertEqual(_split_tz("012345"), ("012345", None))

        self.assertEqual(_split_tz("240000"), ("240000", None))

        self.assertEqual(_split_tz("0123"), ("0123", None))

        self.assertEqual(_split_tz("2400"), ("2400", None))

        self.assertEqual(_split_tz("01"), ("01", None))

        self.assertEqual(_split_tz("24"), ("24", None))

        self.assertEqual(_split_tz("12.5"), ("12.5", None))

        self.assertEqual(_split_tz("232128.512400+00:00"),
                         ("232128.512400", "+00:00"))

        self.assertEqual(_split_tz("0123.4567+00:00"), ("0123.4567", "+00:00"))

        self.assertEqual(_split_tz("01.4567+00:00"), ("01.4567", "+00:00"))

        self.assertEqual(_split_tz("01:23:45+00:00"), ("01:23:45", "+00:00"))

        self.assertEqual(_split_tz("24:00:00+00:00"), ("24:00:00", "+00:00"))

        self.assertEqual(_split_tz("23:21:28.512400+00:00"),
                         ("23:21:28.512400", "+00:00"))

        self.assertEqual(_split_tz("01:23+00:00"), ("01:23", "+00:00"))

        self.assertEqual(_split_tz("24:00+00:00"), ("24:00", "+00:00"))

        self.assertEqual(_split_tz("01:23.4567+00:00"),
                         ("01:23.4567", "+00:00"))

        self.assertEqual(_split_tz("23:21:28.512400+11:15"),
                         ("23:21:28.512400", "+11:15"))

        self.assertEqual(_split_tz("23:21:28.512400-12:34"),
                         ("23:21:28.512400", "-12:34"))

        self.assertEqual(_split_tz("23:21:28.512400Z"),
                         ("23:21:28.512400", "Z"))

        self.assertEqual(_split_tz("06:14:00.000123Z"),
                         ("06:14:00.000123", "Z"))