summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2013-07-06 13:08:21 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2013-07-06 13:08:21 (GMT)
commit5f3fef37f629f9e98f5e83558795ab31d73e437a (patch)
tree236c9d0df4dd9515f61fe63f8fadffc1aebb8763 /Lib/test
parentfd1c69e2a497f685374caa1133c47fa51e8030e5 (diff)
downloadcpython-5f3fef37f629f9e98f5e83558795ab31d73e437a.zip
cpython-5f3fef37f629f9e98f5e83558795ab31d73e437a.tar.gz
cpython-5f3fef37f629f9e98f5e83558795ab31d73e437a.tar.bz2
test_ftplib: silence a BytesWarning when checking TypeError
Diffstat (limited to 'Lib/test')
-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 6a65165..dcf1fd9 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()