Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed Apr 17, 2024
1 parent c52c6f9 commit 0aa4edc
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/test_w3c.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@

@htmls
def test_baseline_w3c_paths(html: Path, validate_html_path: "TVnuValidator") -> None:
result = validate_html_path(html).run().results.data
raise_if_errors(result)

exc = validate_html_path(html).run().exception()
try:
raise exc
except* ValidatorViolation["info"]:
...
except* ValidatorViolation["error-Unrecognized at-rule “@layer”"]:
...
except* ValidatorViolation["error-An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images."]:
...

def test_a11y_max(notebook, validate_html_url):
exc = (
Expand All @@ -74,6 +80,10 @@ def test_a11y_max(notebook, validate_html_url):
raise exc
except* ValidatorViolation["info"]:
...
except* ValidatorViolation["error-Unrecognized at-rule “@layer”"]:
...
except* ValidatorViolation["error-Bad value “none” for attribute “role” on element “table”."]:
...


def xfail_default(notebook, validate_html_url):
Expand Down

0 comments on commit 0aa4edc

Please sign in to comment.