From 9f64bcba3f5803c9f73f500a5290df32717b9ca9 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Wed, 1 May 2019 12:16:23 +0530 Subject: [PATCH] Disable https related urllib tests on a build without ssl --- Lib/test/test_urllib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index e87c85b92876ab..c5b23f935b275b 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -329,6 +329,7 @@ def test_willclose(self): finally: self.unfakehttp() + @unittest.skipUnless(ssl, "ssl module required") def test_url_with_control_char_rejected(self): for char_no in list(range(0, 0x21)) + [0x7f]: char = chr(char_no) @@ -354,6 +355,7 @@ def test_url_with_control_char_rejected(self): finally: self.unfakehttp() + @unittest.skipUnless(ssl, "ssl module required") def test_url_with_newline_header_injection_rejected(self): self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.") host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"