Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/module/_io/test/apptest_io.py::test_tell_univnewlines

tempfile = W_UnicodeObject('d:\\systemtemp\\pytest\\pytest-of-matti\\pytest-431\\tempfile')

    def test_tell_univnewlines(tempfile):
        import io
        import sys
    
        NEWLINE = '\r\n'
    
        with io.open(tempfile, "w") as fp:
            fp.write(DATA_CRLF)
    
        with io.open(tempfile, "r") as fp:
            assert repr(fp.newlines) == repr(None)
            data = fp.readline()
            pos = fp.tell()
        if "__pypy__" in sys.modules:
>           assert repr(fp.newlines)  == repr(NEWLINE)
E           (application-level) AssertionError: assert "'\\r'" == "'\\r\\n'"
E            +  where "'\\r'" = repr('\r')
E            +    where '\r' = <_io.TextIOWrapper name='d:\\systemtemp\\pytest\\pytest-of-matti\\pytest-431\\tempfile' mode='r' encoding='utf-8'>.newlines
E            +  and   "'\\r\\n'" = repr('\r\n')

module\_io\test\apptest_io.py:559: AssertionError
builder: own-win-x86-64 build #2234
test: pypy/module/_io/test/apptest_io/py/test_tell_univnewlines