commit | 9840db838475e675339a97b727ddbe0a3e162eb5 | [log] [tgz] |
---|---|---|
author | R David Murray <rdmurray@bitdance.com> | Thu Oct 02 21:53:50 2014 -0400 |
committer | R David Murray <rdmurray@bitdance.com> | Thu Oct 02 21:53:50 2014 -0400 |
tree | 363fd5c95abcc0cd5da9f875aef255f0feeb9051 | |
parent | 52d0a1b16f08b7de6479b3e653a6d1f18a10f290 [diff] [blame] |
#8473: make doctest.testfile use universal newline mode.
diff --git a/Lib/doctest.py b/Lib/doctest.py index 86c9839..6811406 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py
@@ -216,7 +216,7 @@ # get_data() opens files as 'rb', so one must do the equivalent # conversion as universal newlines would do. return file_contents.replace(os.linesep, '\n'), filename - with open(filename) as f: + with open(filename, 'U') as f: return f.read(), filename # Use sys.stdout encoding for ouput.