Skip to content

Commit f7d9112

Browse files
Chris1221claude
andcommitted
test: add coverage for ListElement.to_markdown and mixed list key parsing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ec06ce5 commit f7d9112

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/test_examples.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,16 @@ def test_mixed_list_does_not_crash(self):
251251
self.assertIn("123", output)
252252
self.assertIn("`y`", output)
253253

254+
def test_mixed_list_key_has_no_dash_prefix(self):
255+
output = get_output("test/yaml/mixed_list.yaml")
256+
self.assertIn("| `x` |", output)
257+
self.assertNotIn("| `- x` |", output)
258+
259+
def test_list_element_to_markdown(self):
260+
el = yamldoc.entries.ListElement("foo")
261+
self.assertEqual(el.to_markdown(), "| `foo` | | |")
262+
self.assertEqual(el.to_markdown(schema=True), "| `foo` | | Unknown | |")
263+
254264

255265
class TestPackage(unittest.TestCase):
256266
def test_version_is_set(self):

0 commit comments

Comments
 (0)