mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
test_ftplib: silence a BytesWarning when checking TypeError
This commit is contained in:
parent
fd1c69e2a4
commit
5f3fef37f6
1 changed files with 2 additions and 1 deletions
|
@ -590,7 +590,8 @@ class TestFTPClass(TestCase):
|
|||
|
||||
f = io.StringIO(RETR_DATA.replace('\r\n', '\n'))
|
||||
# storlines() expects a binary file, not a text file
|
||||
self.assertRaises(TypeError, self.client.storlines, 'stor foo', f)
|
||||
with support.check_warnings(('', BytesWarning), quiet=True):
|
||||
self.assertRaises(TypeError, self.client.storlines, 'stor foo', f)
|
||||
|
||||
def test_nlst(self):
|
||||
self.client.nlst()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue