mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Reverting the Revision: 77368. I committed Flox's big patch for tests by
mistake. ( It may come in for sure tough)
This commit is contained in:
parent
3ddc435af6
commit
ce8e33a095
107 changed files with 436 additions and 794 deletions
|
@ -1,7 +1,6 @@
|
|||
# tests common to dict and UserDict
|
||||
import unittest
|
||||
import UserDict
|
||||
import test_support
|
||||
|
||||
|
||||
class BasicTestMappingProtocol(unittest.TestCase):
|
||||
|
@ -55,18 +54,13 @@ class BasicTestMappingProtocol(unittest.TestCase):
|
|||
#len
|
||||
self.assertEqual(len(p), 0)
|
||||
self.assertEqual(len(d), len(self.reference))
|
||||
#in
|
||||
#has_key
|
||||
for k in self.reference:
|
||||
self.assertTrue(d.has_key(k))
|
||||
self.assertTrue(k in d)
|
||||
for k in self.other:
|
||||
self.assertFalse(d.has_key(k))
|
||||
self.assertFalse(k in d)
|
||||
#has_key
|
||||
# Silence Py3k warning
|
||||
with test_support.check_warnings():
|
||||
for k in self.reference:
|
||||
self.assertTrue(d.has_key(k))
|
||||
for k in self.other:
|
||||
self.assertFalse(d.has_key(k))
|
||||
#cmp
|
||||
self.assertEqual(cmp(p,p), 0)
|
||||
self.assertEqual(cmp(d,d), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue