def test_compress_mode(self): self.assertEquals( 0661, rwx.compress_mode((True, True, False, True, True, False, False, False, True, False))) self.assertEquals( 01661, rwx.compress_mode((True, True, False, True, True, False, False, False, True, True)))
def check_inverseness_and_uniqueness(self): all = set() for i in range(0, 2 * 8 * 8 * 8 - 1): t = rwx.expand_mode(i) self.assertEquals(i, rwx.compress_mode(t)) all.add(t) self.assertEquals(2 * 8 * 8 * 8, len(all))
def check_inverseness_and_uniqueness(self): all = set() for i in range(0, 2*8*8*8-1): t = rwx.expand_mode(i) self.assertEquals(i, rwx.compress_mode(t)) all.add(t) self.assertEquals(2*8*8*8, len(all))
def test_compress_mode(self): self.assertEquals(0661, rwx.compress_mode( (True, True, False, True, True, False, False, False, True, False) )) self.assertEquals(01661, rwx.compress_mode( (True, True, False, True, True, False, False, False, True, True) ))