#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)
Note:
See TracTickets
for help on using tickets.
Adds an explicit
, 'rb'
toopen()
to fix this on Windows