MCPcopy
hub / github.com/pex-tool/pex / test_roundtrip

Function test_roundtrip

tests/test_toml.py:10–24  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

8
9
10def test_roundtrip(tmpdir):
11 # type: (Tempdir) -> None
12
13 data = {
14 "top-level-key": ["a", "b", "c"],
15 "second": {"more-nest": 1 / 137, "on": True, "age": 53},
16 }
17
18 assert data == toml.loads(toml.dumps(data))
19
20 with open(tmpdir.join("example.toml"), "wb+") as fp:
21 toml.dump(data, fp)
22 fp.flush()
23 fp.seek(0)
24 assert data == toml.load(fp)

Callers

nothing calls this directly

Calls 3

joinMethod · 0.45
dumpMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected