diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:27:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:27:32 +0000 |
commit | 88857376d837c86ee4cbbe6ff3c9a22ab2113ffe (patch) | |
tree | efe8d5d117c400fef855ba85e3c181cd0d4bd501 /tests/test_write_file.py | |
parent | Initial commit. (diff) | |
download | python-tomli-w-fd3d569eafdec01529f9af7177e607be2283292d.tar.xz python-tomli-w-fd3d569eafdec01529f9af7177e607be2283292d.zip |
Adding upstream version 1.0.0.upstream/1.0.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_write_file.py')
-rw-r--r-- | tests/test_write_file.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_write_file.py b/tests/test_write_file.py new file mode 100644 index 0000000..003ab54 --- /dev/null +++ b/tests/test_write_file.py @@ -0,0 +1,9 @@ +import tomli_w + + +def test_dump(tmp_path): + toml_obj = {"testing": "test\ntest"} + path = tmp_path / "test.toml" + with open(path, "wb") as f: + tomli_w.dump(toml_obj, f) + assert path.read_bytes().decode() == 'testing = "test\\ntest"\n' |