Skip tests properly (#31308)
* Skip tests properly * [test_all] * Add 'reason' as kwarg for skipTest * [test_all] Fix up * [test_all]
This commit is contained in:
@@ -26,7 +26,7 @@ from transformers.testing_utils import require_tf, require_torch, slow
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
@unittest.skip("Temporarily disable the doc tests.")
|
||||
@unittest.skip(reason="Temporarily disable the doc tests.")
|
||||
@require_torch
|
||||
@require_tf
|
||||
@slow
|
||||
|
||||
@@ -159,11 +159,11 @@ class ModelOutputTester(unittest.TestCase):
|
||||
)
|
||||
|
||||
# TODO: @ydshieh
|
||||
@unittest.skip("CPU OOM")
|
||||
@unittest.skip(reason="CPU OOM")
|
||||
@require_torch
|
||||
def test_export_serialization(self):
|
||||
if not is_torch_greater_or_equal_than_2_2:
|
||||
return
|
||||
self.skipTest(reason="Export serialization requires torch >= 2.2.0")
|
||||
|
||||
model_cls = AlbertForMaskedLM
|
||||
model_config = model_cls.config_class()
|
||||
|
||||
Reference in New Issue
Block a user