def test_time(self):

        self.compare(test_datetime().time(), b"TimeObject[{11, 15, 20.}]")
        self.compare(
            pytz.timezone("Europe/Rome").localize(test_datetime()).timetz(),
            b"TimeObject[{11, 15, 20.}, TimeZone -> 1.]",
        )
    def test_datetime(self):

        self.compare(
            test_datetime(),
            b'DateObject[{2000, 1, 1, 11, 15, 20.}, "Instant", "Gregorian", $TimeZone]',
        )
        self.compare(
            pytz.FixedOffset(60).localize(test_datetime()),
            b'DateObject[{2000, 1, 1, 11, 15, 20.}, "Instant", "Gregorian", 1.]',
        )
        self.compare(
            pytz.timezone("Europe/Rome").localize(test_datetime()),
            b'DateObject[{2000, 1, 1, 11, 15, 20.}, "Instant", "Gregorian", "Europe/Rome"]',
        )