Example #1
0
 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)))
Example #2
0
 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))
Example #3
0
 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))
Example #4
0
 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) ))