Skip to content

Commit 57a0ad2

Browse files
itamarokirklandsign
authored andcommitted
Fix deprecated unittest asserts in executorch
Differential Revision: D72616610 Pull Request resolved: #9960
1 parent 97a6740 commit 57a0ad2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backends/xnnpack/test/ops/test_check_quant_params.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _test_check_quant_message(self, ep_modifier, expected_message):
6565
with self.assertRaises(ValueError) as context:
6666
to_edge_transform_and_lower(aten, partitioner=[XnnpackPartitioner()])
6767

68-
self.assertEquals(str(context.exception), expected_message)
68+
self.assertEqual(str(context.exception), expected_message)
6969

7070
def test_in_per_tensor_quant(self):
7171
for invalid_scale in [

examples/models/llava/test/test_llava.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_llava_export(self):
131131
# being tested, using llama_transformer
132132
new_tokens = [torch.argmax(pte_prefill_after_img).item()]
133133
# TODO: uncomment this line
134-
# self.assertEquals(new_tokens[0], 1932) # When
134+
# self.assertEqual(new_tokens[0], 1932) # When
135135
for i in range(4):
136136
print(i, llava_model.tokenizer.decode(new_tokens[i]))
137137
token_embeds = llava_module.run_method(

0 commit comments

Comments
 (0)