at 23.11-beta 561 B view raw
1import nixos_render_docs 2 3from markdown_it.token import Token 4import pytest 5 6def test_option_headings() -> None: 7 c = nixos_render_docs.options.DocBookConverter({}, 'local', 'none', 'vars', 'opt-') 8 with pytest.raises(RuntimeError) as exc: 9 c._render("# foo") 10 assert exc.value.args[0] == 'md token not supported in options doc' 11 assert exc.value.args[1] == Token( 12 type='heading_open', tag='h1', nesting=1, attrs={}, map=[0, 1], level=0, children=None, 13 content='', markup='#', info='', meta={}, block=True, hidden=False 14 )