expecttest icon indicating copy to clipboard operation
expecttest copied to clipboard

Does not work for UTF-8 string assertions

Open darkone23 opened this issue 10 months ago • 1 comments

Library was failing on my project with an internal error.

https://github.com/pytorch/expecttest/blob/main/expecttest/init.py#L156

Dug into the source code to find the above line with a comment.

Feature should support UTF-8 strings or docs could add a warning saying 'string replacement only supports ascii chars'

darkone23 avatar Feb 26 '25 02:02 darkone23

This assert can be relaxed for characters that are valid UTF-8

ezyang avatar Mar 19 '25 17:03 ezyang