summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_hash.py
Commit message (Collapse)AuthorAgeFilesLines
* Change the PyUnit-based tests to use the test_main() approach. ThisFred Drake2001-09-201-1/+6
| | | | | allows using the tests with unittest.py as a script. The tests will still run when run as a script themselves.
* Update a comment.Fred Drake2001-05-181-2/+2
|
* Simple conversion to PyUnit.Fred Drake2001-05-181-11/+19
|
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-9/+6
|
* This patch addresses two main issues: (1) There exist some non-fatalFred Drake2000-06-291-0/+26
errors in some of the hash algorithms. For exmaple, in float_hash and complex_hash a certain part of the value is not included in the hash calculation. See Tim's, Guido's, and my discussion of this on python-dev in May under the title "fix float_hash and complex_hash for 64-bit *nix" (2) The hash algorithms that use pointers (e.g. func_hash, code_hash) are universally not correct on Win64 (they assume that sizeof(long) == sizeof(void*)) As well, this patch significantly cleans up the hash code. It adds the two function _Py_HashDouble and _PyHash_VoidPtr that the various hashing routine are changed to use. These help maintain the hash function invariant: (a==b) => (hash(a)==hash(b))) I have added Lib/test/test_hash.py and Lib/test/output/test_hash to test this for some cases.