diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 01:14:24 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 01:14:24 (GMT) |
commit | 07627880813ffaad8d9b90bfe8791ccf588b031b (patch) | |
tree | 14fbe48b451085257da7c79781999cc86729c74f /Lib/test/test_operator.py | |
parent | 8cb253f8d6333af0a575d5951379c090752c0fc6 (diff) | |
download | cpython-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.py | 9 |
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) |