From: Florent Xicluna Date: Sat, 6 Jul 2013 13:08:21 +0000 (+0200) Subject: test_ftplib: silence a BytesWarning when checking TypeError X-Git-Tag: v3.4.0a1~322^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f3fef37f629f9e98f5e83558795ab31d73e437a;p=thirdparty%2FPython%2Fcpython.git test_ftplib: silence a BytesWarning when checking TypeError --- diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py index 6a6516517f82..dcf1fd9cff3f 100644 --- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -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()