Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def test_hash

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Used as a mixin for TestCase

Definition at line 19 of file

Member Function Documentation

Definition at line 23 of file

00024     def test_hash(self):
00025         for obj_1, obj_2 in self.eq_pairs:
00026             try:
00027                 if not hash(obj_1) == hash(obj_2):
00028           "%r and %r do not hash equal" % (obj_1, obj_2))
00029             except KeyboardInterrupt:
00030                 raise
00031             except Exception as e:
00032       "Problem hashing %r and %r: %s" % (obj_1, obj_2, e))
00034         for obj_1, obj_2 in self.ne_pairs:
00035             try:
00036                 if hash(obj_1) == hash(obj_2):
00037           "%s and %s hash equal, but shouldn't" %
00038                               (obj_1, obj_2))
00039             except KeyboardInterrupt:
00040                 raise
00041             except Exception as e:
00042       "Problem hashing %s and %s: %s" % (obj_1, obj_2, e))

Here is the call graph for this function:

Member Data Documentation

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

The documentation for this class was generated from the following file: