diff options
Diffstat (limited to 'Lib/test/test_md5.py')
-rw-r--r-- | Lib/test/test_md5.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_md5.py b/Lib/test/test_md5.py index 43f12ca..5e453fa 100644 --- a/Lib/test/test_md5.py +++ b/Lib/test/test_md5.py @@ -22,3 +22,9 @@ print md5test('message digest') print md5test('abcdefghijklmnopqrstuvwxyz') print md5test('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') print md5test('12345678901234567890123456789012345678901234567890123456789012345678901234567890') + +# hexdigest is new with Python 2.0 +m = md5('testing the hexdigest method') +h = m.hexdigest() +if hexstr(m.digest()) <> h: + print 'hexdigest() failed' |