Hi :) Nice lib! <3
The shortest way to expose the issue:
from tomlkit import dumps, parse
def test_reproducer():
a = parse("a.b.c.d='e'")["a"]
assert a == {"b": {"c": {"d": "e"}}} # ok
assert dumps(a) == "b.c.d='e'"
$ pytest
____________ test_reproducer ____________
def test_reproducer():
a = parse("a.b.c.d='e'")["a"]
assert a == {"b": {"c": {"d": "e"}}} # ok
> assert dumps(a) == "b.c.d='e'"
E assert "c.d='e'" == "b.c.d='e'"
E
E - b.c.d='e'
E ? --
E + c.d='e'
script.py:9: AssertionError
======== short test summary info ========
FAILED script.py::test_reproducer - assert "c.d='e'" == "b.c.d='e'"
- b.c.d='e'
? --
+ c.d='e'
=========== 1 failed in 0.03s ===========
This doesn't happen if the dict is less nested than 4 levels, but it happens for higher levels of nesting too.
Hi :) Nice lib! <3
The shortest way to expose the issue:
This doesn't happen if the dict is less nested than 4 levels, but it happens for higher levels of nesting too.