Modify ↓
Opened 6 years ago
Closed 6 years 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: | |||
| 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): 213 213 """Error is returned when a command is executed in interpreter 214 214 with optimizations enabled. 215 215 """ 216 env = os.environ.copy() 217 env['LC_ALL'] = env['LANG'] = 'C' # use en_US locale messages 216 218 proc = Popen((sys.executable, '-O', '-m', 'trac.admin.console', 217 219 'help'), stdin=PIPE, stdout=PIPE, stderr=PIPE, 218 close_fds=close_fds )220 close_fds=close_fds, env=env) 219 221 stdout, stderr = proc.communicate(input='') 220 222 for f in (proc.stdin, proc.stdout, proc.stderr): 221 223 f.close()
Attachments (0)
Change History (5)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Okay. Committed in [16967].
comment:3 by , 6 years ago
| Milestone: | 1.2.5 → 1.2.4 |
|---|---|
| Owner: | set to |
comment:4 by , 6 years ago
| Milestone: | 1.2.4 → 1.2.5 |
|---|---|
| Resolution: | fixed |
| Status: | closed → reopened |
The issue comes back since [16969/branches/1.2-stable/trac/admin/tests/console.py].
Note:
See TracTickets
for help on using tickets.



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