"docs/vscode:/vscode.git/clone" did not exist on "7291ea0bff57a017e71b1ea8ec01ff19da298bf0"
Commit fb393ad9 authored by Lysandre's avatar Lysandre
Browse files

Added test for all special tokens

parent 90debb9f
......@@ -133,6 +133,14 @@ class CommonTestCases:
self.assertNotEqual(len(toks), len(toks0)) # toks0 should be longer
self.assertListEqual(toks, toks2)
# Check that none of the special tokens are lowercased
sequence_with_special_tokens = "A " + " yEs ".join(tokenizer.all_special_tokens) + " B"
tokenized_sequence = tokenizer.tokenize(sequence_with_special_tokens)
for special_token in tokenizer.all_special_tokens:
print(special_token, special_token in tokenized_sequence)
assert special_token in tokenized_sequence
tokenizer = self.get_tokenizer(do_lower_case=False)
added = tokenizer.add_tokens(new_toks)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment