summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fileinput.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2013-11-24 22:05:57 (GMT)
committerLarry Hastings <larry@hastings.org>2013-11-24 22:05:57 (GMT)
commit99e101013fa36da37e47a5a18b5a62d621b0efb9 (patch)
treef603004433e242a1eb26573cd9ec54846229d071 /Lib/test/test_fileinput.py
parentd34b620cc3b8b2326b511f98b0ca439ad97b83b8 (diff)
parent2480c2ed593a164fe3a4821a13d5867a0a7102ed (diff)
downloadcpython-99e101013fa36da37e47a5a18b5a62d621b0efb9.zip
cpython-99e101013fa36da37e47a5a18b5a62d621b0efb9.tar.gz
cpython-99e101013fa36da37e47a5a18b5a62d621b0efb9.tar.bz2
Merged 3.4.0b1 release head back into trunk.
Diffstat (limited to 'Lib/test/test_fileinput.py')
-rw-r--r--Lib/test/test_fileinput.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_fileinput.py b/Lib/test/test_fileinput.py
index c5e57d4..db6082c 100644
--- a/Lib/test/test_fileinput.py
+++ b/Lib/test/test_fileinput.py
@@ -22,7 +22,7 @@ except ImportError:
from io import StringIO
from fileinput import FileInput, hook_encoded
-from test.support import verbose, TESTFN, run_unittest
+from test.support import verbose, TESTFN, run_unittest, check_warnings
from test.support import unlink as safe_unlink
@@ -224,8 +224,10 @@ class FileInputTests(unittest.TestCase):
try:
# try opening in universal newline mode
t1 = writeTmp(1, [b"A\nB\r\nC\rD"], mode="wb")
- fi = FileInput(files=t1, mode="U")
- lines = list(fi)
+ with check_warnings(('', DeprecationWarning)):
+ fi = FileInput(files=t1, mode="U")
+ with check_warnings(('', DeprecationWarning)):
+ lines = list(fi)
self.assertEqual(lines, ["A\n", "B\n", "C\n", "D"])
finally:
remove_tempfiles(t1)