Some tests misusing assertTrue for comparisons fix (#16771)

* Fix issue avoid-misusing-assert-true found at https://codereview.doctor

* fix tests

* fix tf

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
This commit is contained in:
code-review-doctor
2022-04-19 13:44:08 +01:00
committed by GitHub
parent d3bd9ac728
commit a2392415e9
11 changed files with 30 additions and 26 deletions

View File

@@ -185,7 +185,7 @@ class SequenceFeatureExtractionTestMixin(FeatureExtractionSavingTestMixin):
expected_mult_pad_length = pad_max_length if pad_max_length % 10 == 0 else (pad_max_length // 10 + 1) * 10
self.assertTrue(all(len(x) == expected_mult_pad_length for x in input_8))
self.assertTrue(input_9.shape[:2], (batch_size, expected_mult_pad_length))
self.assertEqual(input_9.shape[:2], (batch_size, expected_mult_pad_length))
if feature_size > 1:
self.assertTrue(input_9.shape[2] == feature_size)