diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-06 14:12:19 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-06 14:12:19 -0800 |
commit | 5b4df5813c20fe96f117d0201965b52e86a1a66d (patch) | |
tree | d991f61bc824ca1b1b92bf7fb16fe3dacd4b1335 /Lib/test/test_urllib.py | |
parent | 3e0bdff8a0793d305b972f4a653e4698d440b3ae (diff) | |
parent | 95b272b4e0d5438a12702e51e05d03f5a5a8e505 (diff) | |
download | cpython-5b4df5813c20fe96f117d0201965b52e86a1a66d.tar.gz |
Includes ensurepip and venv packages in nuget package.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 1772399803..5084486e5a 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -470,10 +470,11 @@ Connection: close @unittest.skipUnless(ssl, "ssl module required") def test_cafile_and_context(self): context = ssl.create_default_context() - with self.assertRaises(ValueError): - urllib.request.urlopen( - "https://localhost", cafile="/nonexistent/path", context=context - ) + with support.check_warnings(('', DeprecationWarning)): + with self.assertRaises(ValueError): + urllib.request.urlopen( + "https://localhost", cafile="/nonexistent/path", context=context + ) class urlopen_DataTests(unittest.TestCase): """Test urlopen() opening a data URL.""" @@ -730,7 +731,7 @@ FF class QuotingTests(unittest.TestCase): - """Tests for urllib.quote() and urllib.quote_plus() + r"""Tests for urllib.quote() and urllib.quote_plus() According to RFC 2396 (Uniform Resource Identifiers), to escape a character you write it as '%' + <2 character US-ASCII hex value>. @@ -805,7 +806,7 @@ class QuotingTests(unittest.TestCase): # Make sure all characters that should be quoted are by default sans # space (separate test for that). should_quote = [chr(num) for num in range(32)] # For 0x00 - 0x1F - should_quote.append('<>#%"{}|\^[]`') + should_quote.append(r'<>#%"{}|\^[]`') should_quote.append(chr(127)) # For 0x7F should_quote = ''.join(should_quote) for char in should_quote: |