From 6ea6ed6969d627e32c0dd948c15b5f7b1fea8935 Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Tue, 8 Feb 2022 19:17:26 +0800 Subject: [PATCH] add test case to cover the change --- tests/test_api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_api.py b/tests/test_api.py index f4ecf353..88b97723 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -382,3 +382,13 @@ def test_value_rejects_values_with_appendage(raw): """Values that appear valid at the beginning but leave chars unparsed are rejected.""" with pytest.raises(tomlkit.exceptions.ParseError): tomlkit.value(raw) + + +def test_create_super_table_with_table(): + data = {"foo": {"bar": {"a": 1}}} + assert dumps(data) == "[foo.bar]\na = 1\n" + + +def test_create_super_table_with_aot(): + data = {"foo": {"bar": [{"a": 1}]}} + assert dumps(data) == "[[foo.bar]]\na = 1\n"