[issue22731] test_capi test fails because of mismatched newlines

Steve Dower report at bugs.python.org
Mon Oct 27 20:16:22 CET 2014


Steve Dower added the comment:

> Argh, you're making me page _testembed back into my brain. I try to avoid having to do that ;)

Hehe, sorry.

> My guess would be that VC10 is translating '\n' to '\r\n' in the
> printf() calls, and VC14 has stopped doing that.
>
> To confirm my theory: check if it is only the lines that start 
> with "Expected" that end with '\n' rather than '\r\n' under VC14
> (those are the ones produced directly from C - the others are
> produced via Python's print builtin).

Confirmed. Enabling universal_newlines and using '\n'.join() instead of os.linesep.join() for the expected result works.

Does that sound like it would be the correct fix? Or is the printf() change something that we should try and keep consistent with VC10?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22731>
_______________________________________


More information about the Python-bugs-list mailing list