forked from pool/python314
- Tools/Demos
- gh-130453: Allow passing multiple keyword arguments with
the same function name in pygettext.
- gh-130195: Add warning messages when pygettext
unimplemented -a/--extract-all option is called.
- Tests
- gh-133131: The iOS testbed will now select the most
recently released “SE-class” device for testing if a device
isn’t explicitly specified.
- gh-91048: Add ability to externally inspect all pending
asyncio tasks, even if no task is currently entered on the
event loop.
- gh-109981: The test helper that counts the list of open
file descriptors now uses the optimised /dev/fd approach on
all Apple platforms, not just macOS. This avoids crashes
caused by guarded file descriptors.
- gh-132678: Add --prioritize to -m test. This option allows
the user to specify which selected tests should execute
first, even if the order is otherwise randomized. This is
particularly useful for tests that run the longest.
- gh-131290: Tests in Lib/test can now be correctly executed
as standalone scripts.
- Security
- gh-115322: The underlying extension modules behind
readline:, subprocess, and ctypes now raise audit events
on previously uncovered code paths that could lead to file
system access related to C function calling and external
binary execution. The ctypes.call_function audit hook has
also been fixed to use an unsigned value for its function
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=53
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
---
|
|
Lib/test/test_urllib2.py | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
--- a/Lib/test/test_urllib2.py
|
|
+++ b/Lib/test/test_urllib2.py
|
|
@@ -1,3 +1,4 @@
|
|
+import logging
|
|
import unittest
|
|
from test import support
|
|
from test.support import os_helper
|
|
@@ -29,6 +30,10 @@ import http.client
|
|
|
|
support.requires_working_socket(module=True)
|
|
|
|
+logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s',
|
|
+ level=logging.DEBUG)
|
|
+log = logging.getLogger()
|
|
+
|
|
# XXX
|
|
# Request
|
|
# CacheFTPHandler (hard to write)
|
|
@@ -731,6 +736,9 @@ def sanepathname2url(path):
|
|
|
|
class HandlerTests(unittest.TestCase):
|
|
|
|
+ def setUp(self):
|
|
+ log.debug('Is network available: {}'.format(support.is_resource_enabled('network')))
|
|
+
|
|
def test_ftp(self):
|
|
class MockFTPWrapper:
|
|
def __init__(self, data):
|
|
@@ -794,6 +802,7 @@ class HandlerTests(unittest.TestCase):
|
|
self.assertEqual(headers.get("Content-type"), mimetype)
|
|
self.assertEqual(int(headers["Content-length"]), len(data))
|
|
|
|
+ @support.requires_resource('network')
|
|
def test_ftp_error(self):
|
|
class ErrorFTPHandler(urllib.request.FTPHandler):
|
|
def __init__(self, exception):
|