Skip to content

Commit

Permalink
Update test_label_ops.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hicricket authored Aug 19, 2024
1 parent 0edd614 commit 6836fbf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_label_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ def setup_ctc_label_encode_tibetan(tmp_path):
character_dict_path = generate_character_dict(
tmp_path, ["ཀ", "ཁ", "ག", "ང", "ཀྵ", "ཀྪོ", "ཀྩོ", "ཀྤྲེ", "ཀླཱ", "གྒྲ"]
)
print(f"Character dictionary path: {character_dict_path}")
with open(character_dict_path, "r", encoding="utf-8") as f:
print(f"Character dictionary content:\n{f.read()}")
print(f"Character dictionary content:\n{f.read()}")
return CTCLabelEncode(max_text_length=25, character_dict_path=character_dict_path)


Expand Down Expand Up @@ -103,7 +102,7 @@ def test_cls_label_encode_call(setup_cls_label_encode, label, expected):
("unknown", None),
("", None),
("a" * 20, None),
]
],
)
def test_ctc_label_encode_call(setup_ctc_label_encode, label, expected):
encoder = setup_ctc_label_encode
Expand Down Expand Up @@ -262,7 +261,7 @@ def test_attn_label_encode_call(
encoded_data is None
), f"Expected None for label: {label}, but got {encoded_data}"


@pytest.mark.parametrize(
"label, expected_shape, expected_length",
[
Expand Down

0 comments on commit 6836fbf

Please sign in to comment.