[Python-Dev] test_fileinput failing on Windows

Tim Peters tim.peters at gmail.com
Sun Feb 19 22:07:47 CET 2006

This started failing since last night:

C:\Code\python\PCbuild>python ..\lib\test\test_fileinput.py
1. Simple iteration (bs=0)
2. Status variables (bs=0)
3. Nextfile (bs=0)
4. Stdin (bs=0)
5. Boundary conditions (bs=0)
6. Inplace (bs=0)
7. Simple iteration (bs=30)
8. Status variables (bs=30)
9. Nextfile (bs=30)
10. Stdin (bs=30)
11. Boundary conditions (bs=30)
12. Inplace (bs=30)
13. 0-byte files
14. Files that don't end with newline
15. Unicode filenames
16. fileno()
17. Specify opening mode
Traceback (most recent call last):
  File "..\lib\test\test_fileinput.py", line 201, in <module>
    verify(lines == ["A\n", "B\n", "C\n", "D"])
  File "C:\Code\python\lib\test\test_support.py", line 204, in verify
    raise TestFailed(reason)
test.test_support.TestFailed: test failed

`lines` at that point is

    ['A\n', 'B\n', '\n', 'C\n', 'D']

which indeed doesn't equal

    ["A\n", "B\n", "C\n", "D"]

More information about the Python-Dev mailing list