Commit ced0a942 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Switch test files to the standard test_*.py scheme.

parent 067395d5
...@@ -58,7 +58,7 @@ jobs: ...@@ -58,7 +58,7 @@ jobs:
- run: sudo pip install --progress-bar off . - run: sudo pip install --progress-bar off .
- run: sudo pip install pytest pytest-xdist - run: sudo pip install pytest pytest-xdist
- run: sudo pip install mecab-python3 - run: sudo pip install mecab-python3
- run: RUN_CUSTOM_TOKENIZERS=1 python -m pytest -sv ./tests/tokenization_bert_japanese_test.py - run: RUN_CUSTOM_TOKENIZERS=1 python -m pytest -sv ./tests/test_tokenization_bert_japanese.py
run_examples_py3_torch: run_examples_py3_torch:
working_directory: ~/transformers working_directory: ~/transformers
docker: docker:
......
...@@ -110,8 +110,8 @@ Depending on which framework is installed (TensorFlow 2.0 and/or PyTorch), the i ...@@ -110,8 +110,8 @@ Depending on which framework is installed (TensorFlow 2.0 and/or PyTorch), the i
You can run the tests from the root of the cloned repository with the commands: You can run the tests from the root of the cloned repository with the commands:
```bash ```bash
python -m unittest discover -s tests -p "*test.py" -t . python -m unittest -v discover -s tests -t . -v
python -m unittest discover -s examples -p "*test.py" -t examples python -m unittest -v discover -s examples -t examples -v
``` ```
or or
......
...@@ -29,8 +29,8 @@ Tests can be run using `unittest` or `pytest` (install pytest if needed with `pi ...@@ -29,8 +29,8 @@ Tests can be run using `unittest` or `pytest` (install pytest if needed with `pi
Run all the tests from the root of the cloned repository with the commands: Run all the tests from the root of the cloned repository with the commands:
```bash ```bash
python -m unittest discover -s tests -p "*test.py" -t . python -m unittest discover -s tests -t . -v
python -m unittest discover -s examples -p "*test.py" -t examples python -m unittest discover -s examples -t examples -v
``` ```
or or
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import XxxConfig, is_tf_available from transformers import XxxConfig, is_tf_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_tf_common_test import TFCommonTestCases, ids_tensor from .test_modeling_tf_common import TFCommonTestCases, ids_tensor
from .utils import CACHE_DIR, require_tf, slow from .utils import CACHE_DIR, require_tf, slow
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, ids_tensor from .test_modeling_common import CommonTestCases, ids_tensor
from .utils import CACHE_DIR, require_torch, slow, torch_device from .utils import CACHE_DIR, require_torch, slow, torch_device
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, ids_tensor from .test_modeling_common import CommonTestCases, ids_tensor
from .utils import CACHE_DIR, require_torch, slow, torch_device from .utils import CACHE_DIR, require_torch, slow, torch_device
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, floats_tensor, ids_tensor from .test_modeling_common import CommonTestCases, floats_tensor, ids_tensor
from .utils import CACHE_DIR, require_torch, slow, torch_device from .utils import CACHE_DIR, require_torch, slow, torch_device
......
...@@ -17,8 +17,8 @@ import unittest ...@@ -17,8 +17,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, ids_tensor from .test_modeling_common import CommonTestCases, ids_tensor
from .utils import CACHE_DIR, require_torch, slow, torch_device from .utils import CACHE_DIR, require_torch, slow, torch_device
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, ids_tensor from .test_modeling_common import CommonTestCases, ids_tensor
from .utils import require_torch, torch_device from .utils import require_torch, torch_device
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, ids_tensor from .test_modeling_common import CommonTestCases, ids_tensor
from .utils import CACHE_DIR, require_torch, slow, torch_device from .utils import CACHE_DIR, require_torch, slow, torch_device
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, ids_tensor from .test_modeling_common import CommonTestCases, ids_tensor
from .utils import CACHE_DIR, require_torch, slow, torch_device from .utils import CACHE_DIR, require_torch, slow, torch_device
......
...@@ -18,8 +18,8 @@ import unittest ...@@ -18,8 +18,8 @@ import unittest
from transformers import is_torch_available from transformers import is_torch_available
from .configuration_common_test import ConfigTester from .test_configuration_common import ConfigTester
from .modeling_common_test import CommonTestCases, ids_tensor from .test_modeling_common import CommonTestCases, ids_tensor
from .utils import CACHE_DIR, require_torch, slow, torch_device from .utils import CACHE_DIR, require_torch, slow, torch_device
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment