Skip to content

Commit 1ee1a66

Browse files
AssertionError is replaced by ValueError.
1 parent 231fc6a commit 1ee1a66

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_generated_cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ def test_missing_override_failure(self):
20372037
"""
20382038
output = """
20392039
"""
2040-
with self.assertRaisesRegex(AssertionError, "All abstract uops"):
2040+
with self.assertRaisesRegex(ValueError, "All abstract uops"):
20412041
self.run_cases_test(input, input2, output)
20422042

20432043
def test_validate_uop_input_length_mismatch(self):

Tools/cases_generator/optimizer_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def generate_abstract_interpreter(
399399
base_uop_names = set([uop.name for uop in base.uops.values()])
400400
for abstract_uop_name in abstract.uops:
401401
if abstract_uop_name not in base_uop_names:
402-
raise AssertionError(f"All abstract uops should override base uops, "
402+
raise ValueError(f"All abstract uops should override base uops, "
403403
"but {abstract_uop_name} is not.")
404404

405405
for uop in base.uops.values():

0 commit comments

Comments
 (0)