Karthikeyan, my apologies for the slow reply -- I posted this right before I went to bed.
To emphasize, the change to the formatting of the string contents, by adding the filename, I think is not problematic: I'm using ellipses to elide everything before and after my custom "warning" message.
Rather, I think the problem is that the string is being rendered as a '' string, instead of as a "" string; IOW:
'Test string with \'enclosing\' single quotes'
vs
"Test string with 'enclosing' double quotes"
---
In the interim, as you suggest, Karthikeyan, I can just conditionally skip the doctests on 3.8 with a suitable pytest -k flag. |