Edgewall Software

Opened 5 years ago

Last modified 5 years ago

#13178 closed defect

unit-test with de_DE.UTF8 locale is failing after r16959 — at Initial Version

Reported by: Jun Omae Owned by:
Priority: normal Milestone: 1.2.5
Component: general Version: 1.2dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal 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()

Change History (0)

Note: See TracTickets for help on using tickets.