Opened 12 years ago

Closed 12 years ago

#18326 closed Bug (fixed)

servers.LiveServerViews tests fail on windows due to line separator

Reported by: Michael Manfre Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The tests servers.LiveServerViews.test_static_files and servers.LiveServerViews.test_media_files are explicitly looking for '\n'. The test fails on windows with git autocrlf, which translates the read files to end with '\r\n'.

Attachments (1)

django-ticket18326.diff (882 bytes ) - added by Michael Manfre 12 years ago.

Download all attachments as: .zip

Change History (4)

by Michael Manfre, 12 years ago

Attachment: django-ticket18326.diff added

comment:1 by Claude Paroz, 12 years ago

Triage Stage: UnreviewedAccepted

Or use os.linesep?

comment:2 by Michael Manfre, 12 years ago

Depending on the git crlf setting, it's possible that os.linesep will not match the line separators used in the file, which is why I chose to strip them all.

comment:3 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [006c2b8fc166e53d4ffccda9c42ef9fc109e1c8d]:

Fixed #18326 -- Stripped ending chars in LiveServerViews tests.

Ending chars might be different depending on git crlf setting.
Thanks Michael Manfre for the report and the patch.

Note: See TracTickets for help on using tickets.
Back to Top