mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
Issue 3314. The sys module is used in an error case.
This commit is contained in:
parent
9f2f83338f
commit
2ac5de2a56
2 changed files with 6 additions and 1 deletions
|
|
@ -310,6 +310,10 @@ def test_noslash(self):
|
|||
self.assertEqual(urllib.parse.urlparse("http://example.com?blahblah=/foo"),
|
||||
('http', 'example.com', '', '', 'blahblah=/foo', ''))
|
||||
|
||||
def test_usingsys(self):
|
||||
# Issue 3314: sys module is used in the error
|
||||
self.assertRaises(TypeError, urllib.parse.urlencode, "foo")
|
||||
|
||||
def test_main():
|
||||
support.run_unittest(UrlParseTestCase)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
UC Irvine, June 1995.
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
__all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag",
|
||||
"urlsplit", "urlunsplit"]
|
||||
|
||||
|
|
@ -599,7 +601,6 @@ def splitvalue(attr):
|
|||
"""
|
||||
|
||||
def test():
|
||||
import sys
|
||||
base = ''
|
||||
if sys.argv[1:]:
|
||||
fn = sys.argv[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue