mirror of https://github.com/python/cpython
code improvement. 'as cm' not required when not used. Review comment by Georg Brandl
This commit is contained in:
parent
df7ac06195
commit
80a133b91c
|
@ -619,19 +619,19 @@ class OpenerDirectorTests(unittest.TestCase):
|
||||||
def test_method_deprecations(self):
|
def test_method_deprecations(self):
|
||||||
req = Request("http://www.example.com")
|
req = Request("http://www.example.com")
|
||||||
|
|
||||||
with self.assertWarns(DeprecationWarning) as cm:
|
with self.assertWarns(DeprecationWarning):
|
||||||
req.add_data("data")
|
req.add_data("data")
|
||||||
with self.assertWarns(DeprecationWarning) as cm:
|
with self.assertWarns(DeprecationWarning):
|
||||||
req.has_data()
|
req.has_data()
|
||||||
with self.assertWarns(DeprecationWarning) as cm:
|
with self.assertWarns(DeprecationWarning):
|
||||||
req.get_data()
|
req.get_data()
|
||||||
with self.assertWarns(DeprecationWarning) as cm:
|
with self.assertWarns(DeprecationWarning):
|
||||||
req.get_host()
|
req.get_host()
|
||||||
with self.assertWarns(DeprecationWarning) as cm:
|
with self.assertWarns(DeprecationWarning):
|
||||||
req.get_selector()
|
req.get_selector()
|
||||||
with self.assertWarns(DeprecationWarning) as cm:
|
with self.assertWarns(DeprecationWarning):
|
||||||
req.is_unverifiable()
|
req.is_unverifiable()
|
||||||
with self.assertWarns(DeprecationWarning) as cm:
|
with self.assertWarns(DeprecationWarning):
|
||||||
req.get_origin_req_host()
|
req.get_origin_req_host()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue