Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_missing_right(name: str, latex: str, exception: Exception):
with pytest.raises(exception):
aggregate(latex)
def test_aggregator(name: str, latex: str, expected: list):
assert aggregate(latex) == expected
def convert(
latex: str,
xmlns: str = "http://www.w3.org/1998/Math/MathML",
display: str = "inline",
) -> str:
math = Element("math", xmlns=xmlns, display=display)
row = SubElement(math, "mrow")
_classify_subgroup(aggregate(latex), row)
return _convert(math)