Skip to content

Commit

Permalink
update python test
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Jan 19, 2024
1 parent bf1dbe6 commit af40ae2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bindings/python/tests/bindings/test_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,9 @@ def test_encode_special_tokens(self):
output = tokenizer.encode("Hey there<end_of_text> dear<eot>friend!", add_special_tokens=False)
assert output.tokens == ["▁Hey", "▁there", "<end_of_text>", "▁dear", "<eot>", "▁friend", "!"]

tokenizer.set_encode_special_tokens(True)
tokenizer.encode_special_tokens = True
assert tokenizer.encode_special_tokens == True

output = tokenizer.encode("Hey there<end_of_text> dear<eot>friend!", add_special_tokens=False)
assert output.tokens == [
"▁Hey",
Expand Down

0 comments on commit af40ae2

Please sign in to comment.