Пример #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)