Fix typo so that the test actually calls the tested function.

This commit is contained in:
Raymond Hettinger 2003-05-29 07:20:29 +00:00
parent f0fa1c03a0
commit b25a52aac0
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ class EnumerateTestCase(unittest.TestCase):
def test_tuple_reuse(self): def test_tuple_reuse(self):
# Tests an implementation detail where tuple is reused # Tests an implementation detail where tuple is reused
# whenever nothing else holds a reference to it # whenever nothing else holds a reference to it
self.assertEqual(len(Set(map(id, list(self.seq)))), len(self.seq)) self.assertEqual(len(Set(map(id, list(enumerate(self.seq))))), len(self.seq))
self.assertEqual(len(Set(map(id, enumerate(self.seq)))), min(1,len(self.seq))) self.assertEqual(len(Set(map(id, enumerate(self.seq)))), min(1,len(self.seq)))
class MyEnum(enumerate): class MyEnum(enumerate):