diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2019-02-28 02:18:42 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-02-28 02:18:42 -0800 |
commit | 1706b728596f9c9de0c93794627331f9eaf59df2 (patch) | |
tree | bc72cc18020abdaac04ea6eec4d2ddfe63c09da3 | |
parent | 2a28d84956ed5476511fcb921f296f381f2db372 (diff) | |
download | isort-1706b728596f9c9de0c93794627331f9eaf59df2.tar.gz |
Try printing file
-rw-r--r-- | test_isort.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index e8105eda..8d03b5f3 100644 --- a/test_isort.py +++ b/test_isort.py @@ -2520,9 +2520,13 @@ def test_new_lines_are_preserved(): rn_newline_input.write('import sys\r\nimport os\r\n') SortImports(rn_newline.name, settings_path=os.getcwd()) + with io.open(rn_newline.name) as new_line_file: + print(new_line_file.read() with io.open(rn_newline.name, newline='') as rn_newline_file: rn_newline_contents = rn_newline_file.read() assert rn_newline_contents == 'import os\r\nimport sys\r\n' + except: + pass finally: os.remove(rn_newline.name) |