Replace CommonTestCases for tokenizers with a mixin.

This is the same change as for (TF)CommonTestCases for modeling.
This commit is contained in:
Aymeric Augustin
2019-12-22 15:34:15 +01:00
parent a3c5883f2c
commit 00204f2b4c
16 changed files with 412 additions and 411 deletions

View File

@@ -15,16 +15,17 @@
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import unittest
from transformers.tokenization_albert import AlbertTokenizer
from .test_tokenization_commo import CommonTestCases
from .test_tokenization_common import TokenizerTesterMixin
SAMPLE_VOCAB = os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures/spiece.model")
class AlbertTokenizationTest(CommonTestCases.CommonTokenizerTester):
class AlbertTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
tokenizer_class = AlbertTokenizer