示例#1
0
 def test_string_to_bitlist(self):
     bitlist = [
         0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0,
         1, 0
     ]
     string = 'bar'
     self.assertEqual(utils_misc.bitlist_to_string(bitlist), string)
示例#2
0
 def test_string_to_bitlist(self):
     bitlist = [0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0]
     string = 'bar'
     self.assertEqual(utils_misc.bitlist_to_string(bitlist), string)