Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#7696 closed (fixed)

model_forms tests break on Windows after [7814]

Reported by: Marty Alchin Owned by: Marty Alchin
Component: Core (Other) Version: dev
Severity: Keywords: 2070-fix
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

in [7025], addition model_forms tests were introduced that opened a PNG in the test suite, but no mode was specified. Then, when [7814] went in, the tests were updated to use ImageField instead of FileField, which runs the content through PIL. This works fine in Unix-like environments, but on Windows, that opens the file in text mode, which only reads for 5 bytes. Then, when run through PIL, it rightfully doesn't recognize it as a valid image.

Attachments (1)

7696-r7871.diff (621 bytes ) - added by Marty Alchin 16 years ago.
Adds an explicit , 'rb' to open() to fix this on Windows

Download all attachments as: .zip

Change History (3)

by Marty Alchin, 16 years ago

Attachment: 7696-r7871.diff added

Adds an explicit , 'rb' to open() to fix this on Windows

comment:1 by Jacob, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in [7909].

comment:2 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

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