Skip to content

Commit 8c33592

Browse files
faizan-mtensorflower-gardener
authored andcommitted
Fix casting-dependent tests
PiperOrigin-RevId: 507607482
1 parent d7259ca commit 8c33592

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_model_optimization/python/core/internal/tensor_encoding/core/simple_encoder_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ def test_input_signature_enforced(self):
172172
tf.TensorSpec.from_tensor(x))
173173

174174
state = encoder.initial_state()
175-
with self.assertRaises(ValueError):
175+
with self.assertRaises((TypeError, ValueError)):
176176
bad_x = tf.stack([x, x])
177177
encoder.encode(bad_x, state)
178-
with self.assertRaises(ValueError):
178+
with self.assertRaises((TypeError, ValueError)):
179179
bad_state = state + (x,)
180180
encoder.encode(x, bad_state)
181181
encoded_x = encoder.encode(x, state)

0 commit comments

Comments
 (0)