Opened 7 years ago

Closed 7 years ago

#7613 closed (fixed)

file_uploads regression test fails when LANG=C

Reported by: eddymul@… Owned by: axiak
Component: Testing framework Version: master
Severity: Keywords: 2070-fix
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by ramiro)

tests/regressiontests/file_uploads/tests.py (and BuildBot) assumes LANG=en_US.UTF-8 when tests are run. When LANG=C, tests break.

steps to reproduce:

  1. run Django r7826 tests with LANG=C as environment

expected:
Django passes test suite.

bug:

======================================================================
ERROR: test_large_upload (regressiontests.file_uploads.tests.FileUploadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/buildd/python-django-0.97~svn7826/tests/regressiontests/file_uploads/tests.py", line 28, in test_large_upload
    file3 = open(os.path.join(tdir, u'test_中文_Orl\u00e9ans.jpg'), 'w+b')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 30: ordinal not in range(128)

----------------------------------------------------------------------

Attachments (1)

ticket7613_regressiontests__file_uploads__tests_py.diff (610 bytes) - added by eddymul@… 7 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from regression tests fail when LANG=C to file_uploads regression test fails when LANG=C

comment:2 Changed 7 years ago by ramiro

  • Description modified (diff)

comment:3 Changed 7 years ago by programmerq

  • Component changed from Uncategorized to Unit test system
  • milestone set to 1.0
  • Triage Stage changed from Unreviewed to Accepted

comment:4 Changed 7 years ago by axiak

  • Keywords 2070-fix added
  • milestone 1.0 deleted
  • Owner changed from nobody to axiak

comment:5 Changed 7 years ago by axiak

  • Triage Stage changed from Accepted to Ready for checkin

This patch looks good.

comment:6 Changed 7 years ago by axiak

  • Status changed from new to assigned

comment:7 Changed 7 years ago by jacob

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [7904]) Fixed #7613: fixed file_upload tests when LANG=C. Thanks, eddymul.

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