We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f72a065 commit fe32344Copy full SHA for fe32344
tests/test_pytypes.py
@@ -396,3 +396,8 @@ def test_pass_actual_bytes_or_unicode_to_string_types():
396
397
assert m.pass_to_std_string(actual_bytes) == 5
398
assert m.pass_to_std_string(actual_unicode) == 3
399
+
400
+ malformed_utf8 = b"\x80"
401
+ with pytest.raises(UnicodeDecodeError) as excinfo:
402
+ m.pass_to_pybind11_unicode(malformed_utf8)
403
+ assert 'invalid start byte' in str(excinfo.value)
0 commit comments