Always display python type information in cast errors (#4463)

* Always display python type information in cast errors

* Address comments

* Update comment
This commit is contained in:
Dustin Spicuzza
2023-02-10 00:21:17 -05:00
committed by GitHub
parent 531144dddc
commit 8dcced29ae
6 changed files with 49 additions and 19 deletions

View File

@@ -536,7 +536,7 @@ def test_print(capture):
assert str(excinfo.value) == "Unable to convert call argument " + (
"'1' of type 'UnregisteredType' to Python object"
if detailed_error_messages_enabled
else "to Python object (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)"
else "'1' to Python object (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)"
)