Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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)
Esempio n. 4
0
 def test1(self):
     s = keylib.packs((1, 2, 3, 4))
     assert keylib.unpacks(s, s) == _keylib.unpacks(s, s)