def because_I_pack_them(self, timeval): packed = serialisation.pack_timestamp(timeval) unpacked = serialisation.read_timestamp(BytesIO(packed)) self.result = unpacked - timeval
def because_we_read_a_timestamp(self, binary, _): self.result = serialisation.read_timestamp(BytesIO(binary))