def test_raises_validation_error(input_case): with pytest.raises(ValidationError): ja_to_arabic(input_case)
def test_raises_not_supported_error(input_case): with pytest.raises(NotSupportedError): ja_to_arabic(input_case)
def test_raises_parse_error(input_case): with pytest.raises(ParseError): ja_to_arabic(input_case)
def test_valid_cases(input_case, expected): assert ja_to_arabic(input_case) == expected
def parse_japanese_number(s: str) -> int: try: return int(s) except ValueError: return jnc.ja_to_arabic(s)