diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2013-07-06 13:08:29 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2013-07-06 13:08:29 (GMT) |
commit | c2464bf5c664d859aa3367b08f0504a1dddffa0d (patch) | |
tree | c50447a09be5d860309dbad1cdb1c3478d07d36b /Lib/test | |
parent | 361b28dbd4cbfd80bc95d1926432fabfddc0892c (diff) | |
parent | 5f3fef37f629f9e98f5e83558795ab31d73e437a (diff) | |
download | cpython-c2464bf5c664d859aa3367b08f0504a1dddffa0d.zip cpython-c2464bf5c664d859aa3367b08f0504a1dddffa0d.tar.gz cpython-c2464bf5c664d859aa3367b08f0504a1dddffa0d.tar.bz2 |
test_ftplib: silence a BytesWarning when checking TypeError
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_ftplib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py index 865c228..f93a621 100644 --- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -591,7 +591,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() |