16 lines
475 B
Python
16 lines
475 B
Python
from latex_lab.views import ExerciseSubmitView
|
|
|
|
|
|
def test_normalize_忽略公式结构外的空白():
|
|
left = ExerciseSubmitView.normalize(r"\frac { a } { b }")
|
|
right = ExerciseSubmitView.normalize(r"\frac{a}{b}")
|
|
|
|
assert left == right
|
|
|
|
|
|
def test_normalize_保留_text_命令内部的语义空格():
|
|
with_space = ExerciseSubmitView.normalize(r"\text{a b}")
|
|
without_space = ExerciseSubmitView.normalize(r"\text{ab}")
|
|
|
|
assert with_space != without_space
|