Skip to content

Commit f0c7aa8

Browse files
committed
format and test.
Signed-off-by: Yuchuan <[email protected]>
1 parent e1f3741 commit f0c7aa8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/python/test_structural_tag_converter.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,8 +1986,7 @@ def test_from_structural_tag_with_structural_tag_instance(
19861986
stag_format: xgr.structural_tag.Format, instance: str, is_accepted: bool
19871987
):
19881988
stag = xgr.StructuralTag(format=stag_format)
1989-
grammar = xgr.Grammar.from_structural_tag(stag)
1990-
assert _is_grammar_accept_string(grammar, instance) == is_accepted
1989+
check_stag_with_instance_in_stag_style(stag, instance, is_accepted)
19911990

19921991

19931992
@pytest.mark.parametrize(
@@ -1996,9 +1995,7 @@ def test_from_structural_tag_with_structural_tag_instance(
19961995
def test_from_structural_tag_with_format_instance(
19971996
stag_format: xgr.structural_tag.Format, instance: str, is_accepted: bool
19981997
):
1999-
stag = xgr.StructuralTag(format=stag_format)
2000-
grammar = xgr.Grammar.from_structural_tag(stag)
2001-
assert _is_grammar_accept_string(grammar, instance) == is_accepted
1998+
check_stag_with_instance_in_format_style(stag_format, instance, is_accepted)
20021999

20032000

20042001
if __name__ == "__main__":

0 commit comments

Comments
 (0)