def test_pos(self): tz = dateutil.tz.gettz('Etc/GMT+1') dt = datetime.now(tz) sn = _keylib.packs('', dt) sp = keylib.packs('', dt) eq(sn, sp) dn = _keylib.unpacks('', sn) dp = keylib.unpacks('', sp) eq(dn, dp)
def test_pos(self): tz = dateutil.tz.gettz('Etc/GMT+1') dt = datetime.now(tz) sn = _keylib.packs(dt) sp = keylib.packs(dt) eq(sn, sp) dn = _keylib.unpacks(sn) dp = keylib.unpacks(sp) eq(dn, dp)
def test_utc(self): tz = dateutil.tz.gettz('Etc/UTC') dt = datetime.now(tz) sn = _keylib.packs(dt) sp = keylib.packs(dt) eq(sn, sp) dn = _keylib.unpacks(sn) dp = keylib.unpacks(sp) eq(dn, dp)
def test1(self): s = keylib.packs((1, 2, 3, 4)) assert keylib.unpacks(s, s) == _keylib.unpacks(s, s)