File: test_write_file.py

package info (click to toggle)
python-dom-toml 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,080 kB
  • sloc: python: 1,778; makefile: 7
file content (12 lines) | stat: -rw-r--r-- 263 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# stdlib
import pathlib

# this package
import dom_toml


def test_dump(tmp_path: pathlib.Path):
	toml_obj = {"testing": "test\ntest"}
	path = tmp_path / "test.toml"
	dom_toml.dump(toml_obj, path)
	assert path.read_bytes().decode() == 'testing = "test\\ntest"\n'