Django

Code

Ticket #7696 (closed: fixed)

Opened 2 months ago

Last modified 2 months ago

model_forms tests break on Windows after [7814]

Reported by: Gulopine Assigned to: Gulopine
Milestone: 1.0 beta Component: Core framework
Version: SVN Keywords: 2070-fix
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

7696-r7871.diff (0.6 kB) - added by Gulopine on 07/09/08 22:22:30.
Adds an explicit , 'rb' to open() to fix this on Windows

Change History

07/09/08 22:22:30 changed by Gulopine

  • attachment 7696-r7871.diff added.

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

07/12/08 15:44:45 changed by jacob

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to fixed.
  • needs_tests changed.
  • needs_docs changed.

Fixed in [7909].


Add/Change #7696 (model_forms tests break on Windows after [7814])




Change Properties
Action