From fb60c309c6ef16186261f77212f0de8923cf65b7 Mon Sep 17 00:00:00 2001 From: Philip May Date: Mon, 31 May 2021 10:02:10 +0200 Subject: [PATCH] fix assert (#11935) --- tests/test_tokenization_deberta_v2.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_tokenization_deberta_v2.py b/tests/test_tokenization_deberta_v2.py index fbc1c2d10d..ce354b021a 100644 --- a/tests/test_tokenization_deberta_v2.py +++ b/tests/test_tokenization_deberta_v2.py @@ -102,10 +102,11 @@ class DebertaV2TokenizationTest(TokenizerTesterMixin, unittest.TestCase): encoded_sentence = tokenizer.build_inputs_with_special_tokens(text) encoded_pair = tokenizer.build_inputs_with_special_tokens(text, text_2) - assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] - assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_2 + [ - tokenizer.sep_token_id - ] + self.assertEqual([tokenizer.cls_token_id] + text + [tokenizer.sep_token_id], encoded_sentence) + self.assertEqual( + [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_2 + [tokenizer.sep_token_id], + encoded_pair, + ) def test_tokenizer_integration(self): tokenizer_classes = [self.tokenizer_class]