Пример #1
0
 def test_swap_bytes(self):
     self.assertEqual(swap_bytes("aaaabbbbcccc", 4), "ccccbbbbaaaa")
Пример #2
0
 def test_swap_bytes(self):
     self.assertEqual(swap_bytes(six.b("aaaabbbbcccc"), 4), six.b("ccccbbbbaaaa"))
     self.assertEqual(swap_bytes(six.b("abcdefgh"), 2), six.b("ghefcdab"))
     self.assertEqual(swap_bytes(six.b("00011011"), 2), six.b("11100100"))
Пример #3
0
 def test_swap_bytes(self):
     self.assertEqual(swap_bytes("aaaabbbbcccc", 4), "ccccbbbbaaaa")
Пример #4
0
 def test_swap_bytes(self):
     self.assertEqual(swap_bytes(b"aaaabbbbcccc", 4), b"ccccbbbbaaaa")
     self.assertEqual(swap_bytes(b"abcdefgh", 2), b"ghefcdab")
     self.assertEqual(swap_bytes(b"00011011", 2), b"11100100")
Пример #5
0
 def test_swap_bytes(self):
     self.assertEqual(swap_bytes(b"aaaabbbbcccc", 4), b"ccccbbbbaaaa")
     self.assertEqual(swap_bytes(b"abcdefgh", 2), b"ghefcdab")
     self.assertEqual(swap_bytes(b"00011011", 2), b"11100100")