Edgewall Software
Modify

Opened 5 months ago

Closed 4 months ago

#13178 closed defect (fixed)

unit-test with de_DE.UTF8 locale is failing after r16959

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.2.5
Component: general Version: 1.2dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix unit-test failing with non en_US locale.

API Changes:

Description

$ LC_ALL=de_DE.UTF8 make clean Trac.egg-info {unit,functional}-test
....
======================================================================
FAIL: Error is returned when a command is executed in interpreter
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jun66j5/src/tracdev/git/trac/admin/tests/console.py", line 224, in test_python_with_optimizations_returns_error
    stderr.strip())
  File "/home/jun66j5/src/tracdev/git/trac/admin/tests/console.py", line 175, in assertEqual
    output, diff()))
AssertionError: 'Python with optimizations is not supported.' != 'Python mit Optimierungen wird nicht unterst\xc3\xbctzt.'
--- expected
+++ actual
@@ -1,1 +1,1 @@
-Python with optimizations is not supported.
+Python mit Optimierungen wird nicht unterstützt.


----------------------------------------------------------------------
Ran 2412 tests in 69.956s

FAILED (failures=1)
Makefile:381: recipe for target 'unit-test' failed
make: *** [unit-test] Error 1
  • trac/admin/tests/console.py

    diff --git a/trac/admin/tests/console.py b/trac/admin/tests/console.py
    index a7139cade..04319fb9a 100644
    a b class TracadminTestCase(TracAdminTestCaseBase):  
    213213        """Error is returned when a command is executed in interpreter
    214214        with optimizations enabled.
    215215        """
     216        env = os.environ.copy()
     217        env['LC_ALL'] = env['LANG'] = 'C'  # use en_US locale messages
    216218        proc = Popen((sys.executable, '-O', '-m', 'trac.admin.console',
    217219                      'help'), stdin=PIPE, stdout=PIPE, stderr=PIPE,
    218                      close_fds=close_fds)
     220                     close_fds=close_fds, env=env)
    219221        stdout, stderr = proc.communicate(input='')
    220222        for f in (proc.stdin, proc.stdout, proc.stderr):
    221223            f.close()

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 5 months ago

I think it'd be okay to include in 1.2.4. I'll resume with the release process in about 8 hours.

comment:2 by Jun Omae, 5 months ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Okay. Committed in [16967].

comment:3 by Jun Omae, 5 months ago

Milestone: 1.2.51.2.4
Owner: set to Jun Omae

comment:4 by Jun Omae, 4 months ago

Milestone: 1.2.41.2.5
Resolution: fixed
Status: closedreopened

comment:5 by Jun Omae, 4 months ago

Resolution: fixed
Status: reopenedclosed

Fixed in [17073].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.