Remove unittest.main() in test modules.
This construct isn't used anymore these days. Running python tests/test_foo.py puts the tests/ directory on PYTHONPATH, which isn't representative of how we run tests. Use python -m unittest tests/test_foo.py instead.
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
# limitations under the License.
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
from transformers.tokenization_distilbert import DistilBertTokenizer
|
||||
|
||||
from .test_tokenization_bert import BertTokenizationTest
|
||||
@@ -43,7 +41,3 @@ class DistilBertTokenizationTest(BertTokenizationTest):
|
||||
assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_2 + [
|
||||
tokenizer.sep_token_id
|
||||
]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user