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:
@@ -280,14 +280,14 @@ class Pop2PianoFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittes
|
||||
def test_padding_from_array(self):
|
||||
pass
|
||||
|
||||
@unittest.skip("Pop2PianoFeatureExtractor does not support truncation")
|
||||
@unittest.skip(reason="Pop2PianoFeatureExtractor does not support truncation")
|
||||
def test_attention_mask_with_truncation(self):
|
||||
pass
|
||||
|
||||
@unittest.skip("Pop2PianoFeatureExtractor does not supports truncation")
|
||||
@unittest.skip(reason="Pop2PianoFeatureExtractor does not supports truncation")
|
||||
def test_truncation_from_array(self):
|
||||
pass
|
||||
|
||||
@unittest.skip("Pop2PianoFeatureExtractor does not supports truncation")
|
||||
@unittest.skip(reason="Pop2PianoFeatureExtractor does not supports truncation")
|
||||
def test_truncation_from_list(self):
|
||||
pass
|
||||
|
||||
@@ -372,7 +372,7 @@ class Pop2PianoTokenizerTest(unittest.TestCase):
|
||||
notes = self.get_input_notes()
|
||||
|
||||
if self.tokenizer.pad_token is None:
|
||||
self.skipTest("No padding token.")
|
||||
self.skipTest(reason="No padding token.")
|
||||
else:
|
||||
normal_tokens = self.tokenizer(notes[0], padding=True, pad_to_multiple_of=8)
|
||||
for key, value in normal_tokens.items():
|
||||
@@ -400,9 +400,9 @@ class Pop2PianoTokenizerTest(unittest.TestCase):
|
||||
|
||||
def test_padding_with_attention_mask(self):
|
||||
if self.tokenizer.pad_token is None:
|
||||
self.skipTest("No padding token.")
|
||||
self.skipTest(reason="No padding token.")
|
||||
if "attention_mask" not in self.tokenizer.model_input_names:
|
||||
self.skipTest("This model does not use attention mask.")
|
||||
self.skipTest(reason="This model does not use attention mask.")
|
||||
|
||||
features = [
|
||||
{"token_ids": [1, 2, 3, 4, 5, 6], "attention_mask": [1, 1, 1, 1, 1, 0]},
|
||||
|
||||
Reference in New Issue
Block a user