Skip to content

Commit 201a9eb

Browse files
committed
-
1 parent 8565541 commit 201a9eb

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

source_py3/python_toolbox/nifty_collections/weak_key_identity_dict.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,5 @@ def update(self, dict=None, **kwargs):
200200
self.update(kwargs)
201201

202202
def __len__(self):
203-
return len(self.data)
203+
return len(self.data)
204+

source_py3/test_python_toolbox/third_party/forked_mapping_tests.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,12 @@ def test_read(self):
5858
self.assertIn(k, d)
5959
for k in self.other:
6060
self.assertNotIn(k, d)
61-
#cmp
62-
self.assertEqual(cmp(p,p), 0)
63-
self.assertEqual(cmp(d,d), 0)
64-
self.assertEqual(cmp(p,d), -1)
65-
self.assertEqual(cmp(d,p), 1)
6661
#__non__zero__
6762
if p: self.fail("Empty mapping must compare to False")
6863
if not d: self.fail("Full mapping must compare to True")
6964
# keys(), items(), iterkeys() ...
7065
def check_iterandlist(iter, lst, ref):
71-
self.assertTrue(hasattr(iter, 'next'))
66+
self.assertTrue(hasattr(iter, '__next__'))
7267
self.assertTrue(hasattr(iter, '__iter__'))
7368
x = list(iter)
7469
self.assertTrue(set(x)==set(lst)==set(ref))

0 commit comments

Comments
 (0)