Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AST tests #24

Open
dominickpastore opened this issue May 21, 2021 · 0 comments
Open

Add AST tests #24

dominickpastore opened this issue May 21, 2021 · 0 comments

Comments

@dominickpastore
Copy link
Owner

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.
@dominickpastore dominickpastore added this to the Thorough tests milestone May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant