diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-06-11 17:09:43 -0400 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-06-11 17:09:43 -0400 |
commit | 130a566a13975d761049ad197fceeff420b6c662 (patch) | |
tree | 75c1058bfb7664298db978b5625076563b19c349 | |
parent | dbb7aa5bd1a07c75bb769ce978161863e31232ba (diff) | |
download | cpython-git-130a566a13975d761049ad197fceeff420b6c662.tar.gz |
Suppress a couple more DeprecationWarnings in the test suite.
-rw-r--r-- | Lib/test/test_urllibnet.py | 3 | ||||
-rw-r--r-- | Lib/unittest/test/testmock/testmock.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index 4c8ba2d22c..42ebb6e60b 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -91,7 +91,8 @@ class urlopenNetworkTests(unittest.TestCase): # test getcode() with the fancy opener to get 404 error codes URL = "http://www.example.com/XXXinvalidXXX" with support.transient_internet(URL): - open_url = urllib.request.FancyURLopener().open(URL) + with self.assertWarns(DeprecationWarning): + open_url = urllib.request.FancyURLopener().open(URL) try: code = open_url.getcode() finally: diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py index 7019ee9012..a5499732c2 100644 --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@ -1211,7 +1211,7 @@ class MockTest(unittest.TestCase): m = Mock() m.hello(name='hello', daddy='hero') text = "call(daddy='hero', name='hello')" - self.assertEquals(repr(m.hello.call_args), text) + self.assertEqual(repr(m.hello.call_args), text) def test_mock_add_spec(self): class _One(object): |