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
|
||||
|
||||
import unittest
|
||||
|
||||
from transformers import BertConfig, is_tf_available
|
||||
|
||||
from .test_configuration_common import ConfigTester
|
||||
@@ -315,7 +313,3 @@ class TFBertModelTest(TFCommonTestCases.TFCommonModelTester):
|
||||
for model_name in ["bert-base-uncased"]:
|
||||
model = TFBertModel.from_pretrained(model_name, cache_dir=CACHE_DIR)
|
||||
self.assertIsNotNone(model)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user