diff options
| author | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 19:04:16 (GMT) |
|---|---|---|
| committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 19:04:16 (GMT) |
| commit | ce8e33a095030e7af94f58f9da196b240bdf0476 (patch) | |
| tree | b0ba50cbb6e85c6be6f6e6a870e4232be50a0f9c /Lib/test/test_operator.py | |
| parent | 3ddc435af6873c6304058d7bcbcb19ee4fba7781 (diff) | |
| download | cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.zip cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.tar.gz cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.tar.bz2 | |
Reverting the Revision: 77368. I committed Flox's big patch for tests by
mistake. ( It may come in for sure tough)
Diffstat (limited to 'Lib/test/test_operator.py')
| -rw-r--r-- | Lib/test/test_operator.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py index 70b9fd9..2758856 100644 --- a/Lib/test/test_operator.py +++ b/Lib/test/test_operator.py @@ -192,12 +192,11 @@ class OperatorTestCase(unittest.TestCase): class C: pass def check(self, o, v): - with test_support.check_warnings(): - self.assertTrue(operator.isCallable(o) == callable(o) == v) - check(self, 4, False) - check(self, operator.isCallable, True) - check(self, C, True) - check(self, C(), False) + self.assertTrue(operator.isCallable(o) == callable(o) == v) + check(self, 4, 0) + check(self, operator.isCallable, 1) + check(self, C, 1) + check(self, C(), 0) def test_isMappingType(self): self.assertRaises(TypeError, operator.isMappingType) @@ -307,10 +306,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)) - # Silence Py3k warning - with test_support.check_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) |
