summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_operator.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-01-08 19:04:16 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-01-08 19:04:16 (GMT)
commitce8e33a095030e7af94f58f9da196b240bdf0476 (patch)
treeb0ba50cbb6e85c6be6f6e6a870e4232be50a0f9c /Lib/test/test_operator.py
parent3ddc435af6873c6304058d7bcbcb19ee4fba7781 (diff)
downloadcpython-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.py17
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)