def test_timestamp_coder(self): self.check_coder( coders.TimestampCoder(), *[coders.Timestamp(micros=x) for x in range(-100, 100)]) self.check_coder(coders.TimestampCoder(), coders.Timestamp(micros=-1234567890), coders.Timestamp(micros=1234567890)) self.check_coder(coders.TimestampCoder(), coders.Timestamp(micros=-1234567890123456789), coders.Timestamp(micros=1234567890123456789))
def test_timestamp_coder(self): self.check_coder( coders.TimestampCoder(), *[timestamp.Timestamp(micros=x) for x in range(-100, 100)]) self.check_coder(coders.TimestampCoder(), timestamp.Timestamp(micros=-1234567890), timestamp.Timestamp(micros=1234567890)) self.check_coder(coders.TimestampCoder(), timestamp.Timestamp(micros=-1234567890123456789), timestamp.Timestamp(micros=1234567890123456789)) self.check_coder( coders.TupleCoder((coders.TimestampCoder(), coders.BytesCoder())), (timestamp.Timestamp.of(27), 'abc'))