Opened 8 years ago

Closed 8 years ago

Last modified 5 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: master
Severity: Keywords: 2070-fix
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 8 years ago.
Adds an explicit , 'rb' to open() to fix this on Windows

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Marty Alchin

Attachment: 7696-r7871.diff added

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

comment:1 Changed 8 years ago by Jacob

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: fixed
Status: newclosed

Fixed in [7909].

comment:2 Changed 5 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

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