aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-06-30 21:46:06 +0800
committerGitHub <noreply@github.com>2020-06-30 15:46:06 +0200
commit3ddc634cd5469550c0c2dc5a6051a70739995699 (patch)
tree5c4bba3b3ff821397ef129298a49f4b3f34c58a4 /Lib/test/test_logging.py
parent3fa4799c3f9d9de7cac30e5db3627e9e125b9ce5 (diff)
downloadcpython-3ddc634cd5469550c0c2dc5a6051a70739995699.tar.gz
cpython-3ddc634cd5469550c0c2dc5a6051a70739995699.zip
bpo-40275: Use new test.support helper submodules in tests (GH-21219)
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 2ae00b6e3b4..eb5b926908a 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -42,8 +42,10 @@ import sys
import tempfile
from test.support.script_helper import assert_python_ok, assert_python_failure
from test import support
+from test.support import os_helper
from test.support import socket_helper
from test.support import threading_helper
+from test.support import warnings_helper
from test.support.logging_helper import TestHandler
import textwrap
import threading
@@ -1169,7 +1171,7 @@ class ConfigFileTest(BaseTest):
"""Reading logging config from a .ini-style config file."""
- check_no_resource_warning = support.check_no_resource_warning
+ check_no_resource_warning = warnings_helper.check_no_resource_warning
expected_log_pat = r"^(\w+) \+\+ (\w+)$"
# config0 is a standard configuration.
@@ -1756,7 +1758,7 @@ class UnixSocketHandlerTest(SocketHandlerTest):
def tearDown(self):
SocketHandlerTest.tearDown(self)
- support.unlink(self.address)
+ os_helper.unlink(self.address)
class DatagramHandlerTest(BaseTest):
@@ -1837,7 +1839,7 @@ class UnixDatagramHandlerTest(DatagramHandlerTest):
def tearDown(self):
DatagramHandlerTest.tearDown(self)
- support.unlink(self.address)
+ os_helper.unlink(self.address)
class SysLogHandlerTest(BaseTest):
@@ -1921,7 +1923,7 @@ class UnixSysLogHandlerTest(SysLogHandlerTest):
def tearDown(self):
SysLogHandlerTest.tearDown(self)
- support.unlink(self.address)
+ os_helper.unlink(self.address)
@unittest.skipUnless(socket_helper.IPV6_ENABLED,
'IPv6 support required for this test.')
@@ -2175,7 +2177,7 @@ class ConfigDictTest(BaseTest):
"""Reading logging config from a dictionary."""
- check_no_resource_warning = support.check_no_resource_warning
+ check_no_resource_warning = warnings_helper.check_no_resource_warning
expected_log_pat = r"^(\w+) \+\+ (\w+)$"
# config0 is a standard configuration.