summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test_isort.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test_isort.py b/test_isort.py
index 23de02de..911a5b5e 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -3001,17 +3001,18 @@ def test_pyi_formatting_issue_942(tmpdir):
'\n'
'\n'
'def my_method():\n')
- expected_py_output = test_input
+ expected_py_output = test_input.splitlines()
expected_pyi_output = ('import os\n'
'\n'
- 'def my_method():\n')
- assert SortImports(file_contents=test_input).output == expected_py_output
- assert SortImports(file_contents=test_input, extension="pyi").output == expected_pyi_output
+ 'def my_method():\n').splitlines()
+ assert SortImports(file_contents=test_input).output.splitlines() == expected_py_output
+ assert SortImports(file_contents=test_input,
+ extension="pyi").output.splitlines() == expected_pyi_output
source_py = tmpdir.join('source.py')
source_py.write(test_input)
- assert SortImports(file_path=str(source_py)).output == expected_py_output
+ assert SortImports(file_path=str(source_py)).output.splitlines() == expected_py_output
source_pyi = tmpdir.join('source.pyi')
source_pyi.write(test_input)
- assert SortImports(file_path=str(source_pyi)).output == expected_pyi_output
+ assert SortImports(file_path=str(source_pyi)).output.splitlines() == expected_pyi_output