Fix test_operator.

This commit is contained in:
Ezio Melotti 2010-08-02 21:00:32 +00:00
parent c31cbbdb73
commit d9a4e29db9
1 changed files with 3 additions and 4 deletions

View File

@ -192,8 +192,8 @@ class OperatorTestCase(unittest.TestCase):
class C:
pass
def check(self, o, v):
self.assertEqual(operator.isCallable(o), v)
with test_support._check_py3k_warnings():
self.assertEqual(operator.isCallable(o), v)
self.assertEqual(callable(o), v)
check(self, 4, 0)
check(self, operator.isCallable, 1)
@ -308,9 +308,8 @@ class OperatorTestCase(unittest.TestCase):
self.assertRaises(TypeError, operator.contains, None, None)
self.assertTrue(operator.contains(range(4), 2))
self.assertFalse(operator.contains(range(4), 5))
with test_support._check_py3k_warnings():
self.assertTrue(operator.sequenceIncludes(range(4), 2))
self.assertFalse(operator.sequenceIncludes(range(4), 5))
self.assertTrue(operator.sequenceIncludes(range(4), 2))
self.assertFalse(operator.sequenceIncludes(range(4), 5))
def test_setitem(self):
a = range(3)