summaryrefslogtreecommitdiff
path: root/tests/unit/test_api.py
diff options
context:
space:
mode:
authorTamas Szabo <szabtam@gmail.com>2020-10-05 01:37:40 +0300
committerTamas Szabo <szabtam@gmail.com>2020-10-05 01:37:40 +0300
commitbdd1ebf0b50d8b0e8fc43a624db73966319c8ef6 (patch)
treea7f64845333d0b065d2f1118b8d6a68f7fbcca1d /tests/unit/test_api.py
parentc92b7608c3f7b40e991a70388e128a20eed42eb8 (diff)
downloadisort-bdd1ebf0b50d8b0e8fc43a624db73966319c8ef6.tar.gz
Fix test failures on Windows.
Diffstat (limited to 'tests/unit/test_api.py')
-rw-r--r--tests/unit/test_api.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/test_api.py b/tests/unit/test_api.py
index baec283a..e888b24e 100644
--- a/tests/unit/test_api.py
+++ b/tests/unit/test_api.py
@@ -1,5 +1,6 @@
"""Tests the isort API module"""
from io import StringIO
+import os
from unittest.mock import MagicMock, patch
import pytest
@@ -8,8 +9,8 @@ from isort import api
from isort.settings import Config
imperfect_content = "import b\nimport a\n"
-fixed_content = "import a\nimport b\n"
-fixed_diff = "\n+import a\n import b\n-import a\n"
+fixed_content = "import a\nimport b\n".replace('\n', os.linesep)
+fixed_diff = "\n+import a\n import b\n-import a\n".replace ('\n', os.linesep)
@pytest.fixture