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:
Aymeric Augustin
2019-12-22 14:11:34 +01:00
parent 6be7cdda66
commit 7e98e211f0
51 changed files with 0 additions and 258 deletions

View File

@@ -16,7 +16,6 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import json
import os
import unittest
from transformers.tokenization_openai import VOCAB_FILES_NAMES, OpenAIGPTTokenizer
@@ -83,7 +82,3 @@ class OpenAIGPTTokenizationTest(CommonTestCases.CommonTokenizerTester):
input_tokens = tokens + ["<unk>"]
input_bpe_tokens = [14, 15, 20]
self.assertListEqual(tokenizer.convert_tokens_to_ids(input_tokens), input_bpe_tokens)
if __name__ == "__main__":
unittest.main()