Example #1
0
 def test_crc32_force_text(self):
     filepath = os.path.join(project_dir, "tests", "testfile")
     crc32 = cct.crc32(filepath, force_text=True)
     self.assertNotEqual(crc32, 602403306)
Example #2
0
 def test_crc32_file(self):
     filepath = os.path.join(project_dir, "tests", "testfile")
     crc32 = cct.crc32(filepath)
     self.assertEqual(crc32, 602403306)
Example #3
0
 def test_crc32_int(self):
     crc32 = cct.crc32(42)
     self.assertEqual(crc32, 841265288)
Example #4
0
 def test_crc32_bytes(self):
     crc32 = cct.crc32(b'Test Text')
     self.assertEqual(crc32, 1739839371)
Example #5
0
 def test_crc32_string(self):
     crc32 = cct.crc32("Test Text")
     self.assertEqual(crc32, 1739839371)