test_ftplib: silence a BytesWarning when checking TypeError

This commit is contained in:
Florent Xicluna 2013-07-06 15:08:29 +02:00
commit c2464bf5c6
1 changed files with 2 additions and 1 deletions

View File

@ -591,6 +591,7 @@ class TestFTPClass(TestCase):
f = io.StringIO(RETR_DATA.replace('\r\n', '\n')) f = io.StringIO(RETR_DATA.replace('\r\n', '\n'))
# storlines() expects a binary file, not a text file # storlines() expects a binary file, not a text file
with support.check_warnings(('', BytesWarning), quiet=True):
self.assertRaises(TypeError, self.client.storlines, 'stor foo', f) self.assertRaises(TypeError, self.client.storlines, 'stor foo', f)
def test_nlst(self): def test_nlst(self):