summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-04-12 11:28:07 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-04-12 11:28:07 (GMT)
commit80a133b91c857f6da41c6eba3b6992af6d696347 (patch)
tree9e4383c9e65697bc48ed935854e637990bc1c1be
parentdf7ac0619563e3e92efadf3e429c58d3fb4b5016 (diff)
downloadcpython-80a133b91c857f6da41c6eba3b6992af6d696347.zip
cpython-80a133b91c857f6da41c6eba3b6992af6d696347.tar.gz
cpython-80a133b91c857f6da41c6eba3b6992af6d696347.tar.bz2
code improvement. 'as cm' not required when not used. Review comment by Georg Brandl
-rw-r--r--Lib/test/test_urllib2.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 9d9260a..fad95cc 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -619,19 +619,19 @@ class OpenerDirectorTests(unittest.TestCase):
def test_method_deprecations(self):
req = Request("http://www.example.com")
- with self.assertWarns(DeprecationWarning) as cm:
+ with self.assertWarns(DeprecationWarning):
req.add_data("data")
- with self.assertWarns(DeprecationWarning) as cm:
+ with self.assertWarns(DeprecationWarning):
req.has_data()
- with self.assertWarns(DeprecationWarning) as cm:
+ with self.assertWarns(DeprecationWarning):
req.get_data()
- with self.assertWarns(DeprecationWarning) as cm:
+ with self.assertWarns(DeprecationWarning):
req.get_host()
- with self.assertWarns(DeprecationWarning) as cm:
+ with self.assertWarns(DeprecationWarning):
req.get_selector()
- with self.assertWarns(DeprecationWarning) as cm:
+ with self.assertWarns(DeprecationWarning):
req.is_unverifiable()
- with self.assertWarns(DeprecationWarning) as cm:
+ with self.assertWarns(DeprecationWarning):
req.get_origin_req_host()