Skip to content

Add AST tests #24

@dominickpastore

Description

@dominickpastore

The HTML tests cover a lot of the HTML generation features, but there are details that are parsed out that aren't used for HTML generation. All of these details make it into the ASTs from DOMParser, so we should add tests to validate them.

This will likely be time consuming work.

Proposal:

  • Move the spec reader a separate module from test_html.py
  • The spec reader currently loads Markdown source and expected HTML for each example, with the two separated by a dot. Add the ability to read a third part for each example: AST. The AST would be stored in YAML format (readable by PyYAML). If there is a second dot, the spec reader will know to read an AST for this test.
  • This way, we can add ASTs to tests over time.
  • AST YAMLs need to contain a full tree with wach node specifying type and all detail attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions