]> git.pld-linux.org Git - packages/python3.git/blame - python3-tests.patch
noarch examples
[packages/python3.git] / python3-tests.patch
CommitLineData
b10abc3a
AM
1diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_imaplib.py Python-3.9.2/Lib/test/test_imaplib.py
2--- Python-3.9.2.org/Lib/test/test_imaplib.py 2021-02-19 13:31:44.000000000 +0100
3+++ Python-3.9.2/Lib/test/test_imaplib.py 2021-02-25 18:42:23.540101637 +0100
4@@ -74,7 +74,7 @@ class TestImaplib(unittest.TestCase):
1b1a21d4
AM
5
6 def test_imap4_host_default_value(self):
7 # Check whether the IMAP4_PORT is truly unavailable.
8- with socket.socket() as s:
9+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
10 try:
11 s.connect(('', imaplib.IMAP4_PORT))
12 self.skipTest(
b10abc3a 13@@ -85,7 +85,7 @@ class TestImaplib(unittest.TestCase):
ee08c4bf 14 # This is the exception that should be raised.
b10abc3a 15 expected_errnos = socket_helper.get_socket_conn_refused_errs()
ee08c4bf
AM
16 with self.assertRaises(OSError) as cm:
17- imaplib.IMAP4()
18+ imaplib.IMAP4('0.0.0.0')
19 self.assertIn(cm.exception.errno, expected_errnos)
20
21
b10abc3a
AM
22diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_unicodedata.py Python-3.9.2/Lib/test/test_unicodedata.py
23--- Python-3.9.2.org/Lib/test/test_unicodedata.py 2021-02-19 13:31:44.000000000 +0100
24+++ Python-3.9.2/Lib/test/test_unicodedata.py 2021-02-25 18:42:23.540101637 +0100
81d56a2b
AM
25@@ -11,7 +11,7 @@ from http.client import HTTPException
26 import sys
27 import unicodedata
28 import unittest
29-from test.support import open_urlresource, requires_resource, script_helper
30+from test.support import open_urlresource, requires_resource, script_helper, is_resource_enabled
31
32
33 class UnicodeMethodsTest(unittest.TestCase):
34@@ -320,6 +320,8 @@ class NormalizationTest(unittest.TestCas
35 data = [int(x, 16) for x in data.split(" ")]
36 return "".join([chr(x) for x in data])
37
38+ @unittest.skipUnless(is_resource_enabled('network'),
39+ 'network is not enabled')
40 def test_normalization(self):
41 TESTDATAFILE = "NormalizationTest.txt"
42 TESTDATAURL = f"http://www.pythontest.net/unicode/{unicodedata.unidata_version}/{TESTDATAFILE}"
This page took 0.033717 seconds and 4 git commands to generate.