mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use os.linesep instead of \n
This commit is contained in:
parent
1a97786516
commit
30e2d9aaf4
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@ import pytest
|
||||||
|
|
||||||
import salt.utils.files
|
import salt.utils.files
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
|
import salt.utils.stringutils
|
||||||
from tests.support.case import ModuleCase
|
from tests.support.case import ModuleCase
|
||||||
from tests.support.helpers import requires_system_grains
|
from tests.support.helpers import requires_system_grains
|
||||||
from tests.support.runtests import RUNTIME_VARS
|
from tests.support.runtests import RUNTIME_VARS
|
||||||
|
@ -199,7 +200,7 @@ class FileModuleTest(ModuleCase):
|
||||||
assert ret["retcode"] == 0, repr(ret)
|
assert ret["retcode"] == 0, repr(ret)
|
||||||
with salt.utils.files.fopen(src_file) as fp:
|
with salt.utils.files.fopen(src_file) as fp:
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
salt.utils.stringutils.to_unicode(fp.read()), "Hello world\n"
|
salt.utils.stringutils.to_unicode(fp.read()), f"Hello world{os.linesep}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_remove_file(self):
|
def test_remove_file(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue