def test_python_vs_c(self): from cassandra.murmur3 import _murmur3 as mm3_python try: from cassandra.cmurmur3 import murmur3 as mm3_c iterations = 100 for _ in range(iterations): for len in range(0, 32): # zero to one block plus full range of tail lengths key = os.urandom(len) self.assertEqual(mm3_python(key), mm3_c(key)) except ImportError: raise unittest.SkipTest('The cmurmur3 extension is not available')
def test_python_vs_c(self): from cassandra.murmur3 import _murmur3 as mm3_python try: from cassandra.cmurmur3 import murmur3 as mm3_c iterations = 100 for _ in range(iterations): for len in range(0, 32): # zero to one block plus full range of tail lengths key = os.urandom(len) self.assertEqual(mm3_python(key), mm3_c(key)) except ImportError: raise unittest.SkipTest('The cmurmur3 extension is not available')