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:
amyeroberts
2024-06-26 21:59:08 +01:00
committed by GitHub
parent 1f9f57ab4c
commit 1de7dc7403
254 changed files with 1721 additions and 1298 deletions

View File

@@ -642,7 +642,7 @@ class Swin2BartModelTest(EncoderDecoderMixin, unittest.TestCase):
(decoder_config.num_attention_heads, cross_attention_input_seq_len, encoder_seq_len),
)
# there are no published pretrained BART-causal checkpoints for now
@unittest.skip(reason="There are no published pretrained BART-causal checkpoints for now")
def test_real_model_save_load_from_pretrained(self):
pass
@@ -677,7 +677,7 @@ class ViT2TrOCR(EncoderDecoderMixin, unittest.TestCase):
"labels": decoder_input_ids,
}
# there are no published pretrained TrOCR checkpoints for now
@unittest.skip(reason="There are no published pretrained TrOCR checkpoints for now")
def test_real_model_save_load_from_pretrained(self):
pass
@@ -799,7 +799,7 @@ class LayoutLMv32TrOCR(EncoderDecoderMixin, unittest.TestCase):
)
self.assertEqual(generated_output.shape, (pixel_values.shape[0],) + (decoder_config.max_length,))
@unittest.skip("There are no published pretrained TrOCR checkpoints for now")
@unittest.skip(reason="There are no published pretrained TrOCR checkpoints for now")
def test_real_model_save_load_from_pretrained(self):
pass