(func)
| 238 | "func", [m.native_enum_ctor_malformed_utf8, m.native_enum_value_malformed_utf8] |
| 239 | ) |
| 240 | def test_native_enum_malformed_utf8(func): |
| 241 | if env.GRAALPY and func is m.native_enum_ctor_malformed_utf8: |
| 242 | pytest.skip("GraalPy does not raise UnicodeDecodeError") |
| 243 | malformed_utf8 = b"\x80" |
| 244 | with pytest.raises(UnicodeDecodeError): |
| 245 | func(malformed_utf8) |
| 246 | |
| 247 | |
| 248 | def test_native_enum_double_finalize(): |