I'm not 100% sure if this is intentional or a regression, but there is different behavior in dumping subelements from 0.13.2 to 0.13.3. If this is not intentional behavior it is probably a regression from #419.
Test, passes on 0.13.2:
def test_tomlkit():
a = tomlkit.parse('[a.b]\nk="v"\n[a.c]\nk="v2"')["a"]
assert a == {"b": {"k": "v"}, "c": {"k": "v2"}}
assert tomlkit.dumps(a) == '[b]\nk="v"\n\n[c]\nk="v2"'
Error Output on 0.13.3:
________________________________ test_tomlkit _________________________________
def test_tomlkit():
a = tomlkit.parse('[a.b]\nk="v"\n[a.c]\nk="v2"')["a"]
assert a == {"b": {"k": "v"}, "c": {"k": "v2"}}
> assert tomlkit.dumps(a) == '[b]\nk="v"\n[c]\nk="v2"'
E assert '[a.b]\nk="v"\n[a.c]\nk="v2"' == '[b]\nk="v"\n[c]\nk="v2"'
E
E - [b]
E + [a.b]
E ? ++
E k="v"
E - [c]
E + [a.c]
E ? ++
E k="v2"
I'm not 100% sure if this is intentional or a regression, but there is different behavior in dumping subelements from 0.13.2 to 0.13.3. If this is not intentional behavior it is probably a regression from #419.
Test, passes on 0.13.2:
Error Output on 0.13.3: