Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#7696 closed (fixed)

model_forms tests break on Windows after [7814]

Reported by: Gulopine Owned by: Gulopine
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:


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

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Gulopine

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

comment:1 Changed 7 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [7909].

comment:2 Changed 4 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

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