Skip to content

Commit 917366f

Browse files
authored
Update test_toml_file.py
1 parent 564b5a8 commit 917366f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_toml_file.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,12 @@ def test_default_eol_is_os_linesep(tmpdir):
105105
linesep = os.linesep.encode()
106106
with open(toml_path, "rb") as f:
107107
assert f.read() == b"a = 1" + linesep + b"b = 2" + linesep
108+
109+
def test_readwrite_eol_windows(tmpdir):
110+
toml_path = str(tmpdir / "pyproject.toml")
111+
doc = TOMLDocument()
112+
doc.add("a", 1)
113+
f = TOMLFile(toml_path)
114+
f.write(doc)
115+
readback = f.read()
116+
assert doc.as_string() == readback.as_string()

0 commit comments

Comments
 (0)