def test_highlight_iso8601_regex(test: str, spans: List[Span]):
    """Tests for the regular expressions used in ISO8601Highlighter."""
    text = Text(test)
    highlighter = ISO8601Highlighter()
    highlighter.highlight(text)
    print(text.spans)
    assert text.spans == spans
Tests for the regular expressions used in ISO8601Highlighter.
tests/test_highlighter.py