Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 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:

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

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by Gulopine

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

comment:1 Changed 6 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 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.