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

@@ -15,7 +15,6 @@
from __future__ import absolute_import, division, print_function
import random
import unittest
from transformers import XLNetConfig, is_tf_available
@@ -401,7 +400,3 @@ class TFXLNetModelTest(TFCommonTestCases.TFCommonModelTester):
for model_name in list(TF_XLNET_PRETRAINED_MODEL_ARCHIVE_MAP.keys())[:1]:
model = TFXLNetModel.from_pretrained(model_name, cache_dir=CACHE_DIR)
self.assertIsNotNone(model)
if __name__ == "__main__":
unittest.main()