(gh#python/cpython!121555) - Add fix_test_ftp_error.patch to mark test_ftp_error as requiring network access. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=9
23 lines
726 B
Diff
23 lines
726 B
Diff
---
|
|
Lib/test/test_urllib2.py | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
--- a/Lib/test/test_urllib2.py
|
|
+++ b/Lib/test/test_urllib2.py
|
|
@@ -1,6 +1,7 @@
|
|
import unittest
|
|
from test import support
|
|
from test.support import os_helper
|
|
+from test.support import requires
|
|
from test.support import requires_subprocess
|
|
from test.support import warnings_helper
|
|
from test import test_urllib
|
|
@@ -795,6 +796,7 @@ class HandlerTests(unittest.TestCase):
|
|
self.assertEqual(int(headers["Content-length"]), len(data))
|
|
|
|
def test_ftp_error(self):
|
|
+ requires('network')
|
|
class ErrorFTPHandler(urllib.request.FTPHandler):
|
|
def __init__(self, exception):
|
|
self._exception = exception
|