mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-10 05:30:16 +00:00
Fix tests
This commit is contained in:
parent
004f2bb3ad
commit
f32394817f
@ -62,7 +62,8 @@ static std::string convert_python_object_to_string(PyObject* obj, VM* vm){
|
||||
}
|
||||
}
|
||||
else if (is_type(obj, vm->tp_str)){
|
||||
return std::string("\"") + CAST(Str&, obj).c_str() + std::string("\"");
|
||||
std::string str = CAST(Str&, obj).replace("\n", "\\n").replace("\"", "\\\"").c_str();
|
||||
return std::string("\"") + str + std::string("\"");
|
||||
}
|
||||
else if (is_type(obj, vm->tp_dict)){
|
||||
return covert_dict_to_string(CAST(Dict&, obj), vm);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user