[Python-checkins] cpython (merge 3.3 -> default): test_ftplib: silence a BytesWarning when checking TypeError
florent.xicluna
python-checkins at python.org
Sat Jul 6 15:08:53 CEST 2013
http://hg.python.org/cpython/rev/dbd301063e59
changeset: 84461:dbd301063e59
parent: 84459:b6ebc726d5fe
parent: 84460:851254748c6b
user: Florent Xicluna <florent.xicluna at gmail.com>
date: Sat Jul 06 15:08:29 2013 +0200
summary:
test_ftplib: silence a BytesWarning when checking TypeError
files:
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
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -591,7 +591,8 @@
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()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list