Skip to content

Commit c754223

Browse files
committed
some tests, unimplemented copy
1 parent 9f564d5 commit c754223

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

hashlib/tests/hashlib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ def ftest(name, got, want):
1111
what = '%s got %r, want %r' % (name, got, want)
1212
assert got == want, what
1313

14+
doc='Rich comparision'
15+
assertEqual(hashlib.md5(b'abc'), hashlib.md5(b'abc'))
16+
1417
doc="MD5"
1518
ftest('new_md5_0', hashlib.new('md5', b'').hexdigest(), 'd41d8cd98f00b204e9800998ecf8427e')
1619
ftest('new_md5_1', hashlib.new('md5', b'abc').hexdigest(), '900150983cd24fb0d6963f7d28e17f72')

hashlib/tests/libtest.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ def assertEqual(x, y):
3636
"""assert x == y"""
3737
assert x == y
3838

39-
def assertAlmostEqual(x, y, places=7):
40-
"""assert x == y to places"""
41-
assert round(abs(y-x), places) == 0
42-
4339
def fail(x):
4440
"""Fails with error message"""
4541
assert False, x

0 commit comments

Comments
 (0)