(text: &str)
| 1264 | } |
| 1265 | |
| 1266 | fn check_hash_equivalence(text: &str) { |
| 1267 | Interpreter::without_stdlib(Default::default()).enter(|vm| { |
| 1268 | let value1 = text; |
| 1269 | let value2 = vm.new_pyobj(value1.to_owned()); |
| 1270 | |
| 1271 | let hash1 = value1.key_hash(vm).expect("Hash should not fail."); |
| 1272 | let hash2 = value2.key_hash(vm).expect("Hash should not fail."); |
| 1273 | assert_eq!(hash1, hash2); |
| 1274 | }) |
| 1275 | } |
| 1276 | } |