summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_operator.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-21 01:14:24 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-21 01:14:24 (GMT)
commit07627880813ffaad8d9b90bfe8791ccf588b031b (patch)
tree14fbe48b451085257da7c79781999cc86729c74f /Lib/test/test_operator.py
parent8cb253f8d6333af0a575d5951379c090752c0fc6 (diff)
downloadcpython-07627880813ffaad8d9b90bfe8791ccf588b031b.zip
cpython-07627880813ffaad8d9b90bfe8791ccf588b031b.tar.gz
cpython-07627880813ffaad8d9b90bfe8791ccf588b031b.tar.bz2
#7092 - Silence more py3k deprecation warnings, using test_support.check_py3k_warnings() helper.
Diffstat (limited to 'Lib/test/test_operator.py')
-rw-r--r--Lib/test/test_operator.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py
index 2758856..a4650f4 100644
--- a/Lib/test/test_operator.py
+++ b/Lib/test/test_operator.py
@@ -192,7 +192,9 @@ class OperatorTestCase(unittest.TestCase):
class C:
pass
def check(self, o, v):
- self.assertTrue(operator.isCallable(o) == callable(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)
check(self, C, 1)
@@ -306,8 +308,9 @@ 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))
- self.assertTrue(operator.sequenceIncludes(range(4), 2))
- self.assertFalse(operator.sequenceIncludes(range(4), 5))
+ with test_support.check_py3k_warnings():
+ self.assertTrue(operator.sequenceIncludes(range(4), 2))
+ self.assertFalse(operator.sequenceIncludes(range(4), 5))
def test_setitem(self):
a = range(3)