Fix test_operator.
This commit is contained in:
parent
c31cbbdb73
commit
d9a4e29db9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue