summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ftplib.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-08-03 16:49:18 (GMT)
committerGitHub <noreply@github.com>2020-08-03 16:49:18 (GMT)
commit4660597b51b3d14ce6269d0ed865ab7e22c6ae1f (patch)
tree00ab23106abb1d0023e261685dc4f2077002aabd /Lib/test/test_ftplib.py
parentbb0424b122e3d222a558bd4177ce37befd3e0347 (diff)
downloadcpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.zip
cpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.tar.gz
cpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.tar.bz2
bpo-40275: Use new test.support helper submodules in tests (GH-21448)
Diffstat (limited to 'Lib/test/test_ftplib.py')
-rw-r--r--Lib/test/test_ftplib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index cb43573..65feb3a 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -21,6 +21,7 @@ from unittest import TestCase, skipUnless
from test import support
from test.support import threading_helper
from test.support import socket_helper
+from test.support import warnings_helper
from test.support.socket_helper import HOST, HOSTv6
TIMEOUT = support.LOOPBACK_TIMEOUT
@@ -623,7 +624,7 @@ class TestFTPClass(TestCase):
f = io.StringIO(RETR_DATA.replace('\r\n', '\n'))
# storlines() expects a binary file, not a text file
- with support.check_warnings(('', BytesWarning), quiet=True):
+ with warnings_helper.check_warnings(('', BytesWarning), quiet=True):
self.assertRaises(TypeError, self.client.storlines, 'stor foo', f)
def test_nlst(self):