Exemplo n.º 1
0
 def test_unicode_2_64(self):
     """Accepts Unicode input outside of ASCII range"""
     test_case = u'\u2661'
     self.assertTrue(isinstance(metrohash64(test_case), long))
Exemplo n.º 2
0
 def test_consistent_encoding_64(self):
     """ASCII-range Unicode strings have the same hash values as ASCII strings
     """
     text = u"abracadabra"
     self.assertEqual(metrohash64(text), metrohash64(text.encode("utf-8")))
Exemplo n.º 3
0
 def test_unicode_1_64(self):
     """Accepts Unicode input"""
     test_case = u"abc"
     self.assertTrue(isinstance(metrohash64(test_case), long))
Exemplo n.º 4
0
 def test_string_unicode_64(self):
     """Empty Python string has same hash value as empty Unicode string
     """
     self.assertEqual(metrohash64(""), metrohash64(u""))
 def test_unicode_2_64(self):
     """Accepts Unicode input outside of ASCII range"""
     test_case = u'\u2661'
     self.assertTrue(isinstance(metrohash64(test_case), long))
 def test_unicode_1_64(self):
     """Accepts Unicode input"""
     test_case = u"abc"
     self.assertTrue(isinstance(metrohash64(test_case), long))
 def test_consistent_encoding_64(self):
     """ASCII-range Unicode strings have the same hash values as ASCII strings
     """
     text = u"abracadabra"
     self.assertEqual(metrohash64(text), metrohash64(text.encode("utf-8")))
 def test_string_unicode_64(self):
     """Empty Python string has same hash value as empty Unicode string
     """
     self.assertEqual(metrohash64(""), metrohash64(u""))