Fix problems with different hash values for str and bytes

This commit is contained in:
hyperbora committed 2020-08-09 16:09:46 +09:00
1 parent 7d75c4eaa6
commit e7eab050f4
2 files changed
+1 -3

No files matched your search

-2
View File
@@ -691,8 +691,6 @@ class BuiltinTest(unittest.TestCase):
raise ValueError
self.assertRaises(ValueError, hasattr, B(), "b")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_hash(self):
hash(None)
self.assertEqual(hash(1), hash(1))
+1 -1
View File
@@ -118,5 +118,5 @@ pub fn hash_bigint(value: &BigInt) -> PyHash {
}
pub fn hash_str(value: &str) -> PyHash {
hash_value(value)
hash_value(value.as_bytes())
}