8000 bpo-30458: Disable https related urllib tests on a build without ssl … · python/cpython@2fc936e · GitHub
[go: up one dir, main page]

Skip to content

Commit 2fc936e

Browse files
tirkarthimiss-islington
authored andcommitted
bpo-30458: Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures. https://bugs.python.org/issue30458
1 parent 49e27f0 commit 2fc936e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_urllib.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def test_willclose(self):
329329
finally:
330330
self.unfakehttp()
331331

332+
@unittest.skipUnless(ssl, "ssl module required")
332333
def test_url_with_control_char_rejected(self):
333334
for char_no in list(range(0, 0x21)) + [0x7f]:
334335
char = chr(char_no)
@@ -354,6 +355,7 @@ def test_url_with_control_char_rejected(self):
354355
finally:
355356
self.unfakehttp()
356357

358+
@unittest.skipUnless(ssl, "ssl module required")
357359
def test_url_with_newline_header_injection_rejected(self):
358360
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
359361
host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"

0 commit comments

Comments
 (0)
0