Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8615 closed defect (fixed)

SVN functional tests fail because of non-english locale

Reported by: Felix Schwarz <felix.schwarz@…> Owned by: Remy Blank
Priority: low Milestone: 0.12
Component: version control Version: 0.11-stable
Severity: normal Keywords: testing
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

In 0.11 and 0.12 I have two failures when I run the test suite on Fedora Linux 10 (x86_64) with de_DE.UTF-8:

ERROR: Verify browser log for a new file
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../trac/versioncontrol/tests/functional.py", line 94, in runTest
    revision = self._testenv.svn_add(fulltempfilename, '')
  File ".../trac/tests/functional/svntestenv.py", line 75, in svn_add
    raise Exception(*args)
Exception: ("'NoneType' object has no attribute 'group'", 'Hinzuf\xc3\xbcgen     
component1/trunk/two\n\xc3\x9cbertrage Daten .\nRevision 3 \xc3\xbcbertragen.\n')

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

This happens obviously because the locale is not inherited when child processes are called.

Attachments (1)

force_locale_for_functional_tests_012.patch (1.3 KB ) - added by Felix Schwarz <felix.schwarz@…> 15 years ago.
Fix for 0.12 - this patch applies for 0.11 as well (with a bit of fuzz)

Download all attachments as: .zip

Change History (6)

by Felix Schwarz <felix.schwarz@…>, 15 years ago

Fix for 0.12 - this patch applies for 0.11 as well (with a bit of fuzz)

comment:1 by Remy Blank, 15 years ago

Owner: set to Remy Blank

I'll look into this.

comment:2 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

The issue was specific to calling svn ci and parsing its output, so I have fixed it by passing a modified environment to Popen in that particular case only in [8639].

OT: Felix, are you really running a Linux box with non-English messages? I just can't stand a non-English OS (French Windows gives me the creeps :).

in reply to:  2 ; comment:3 by Felix Schwarz <felix.schwarz@…>, 15 years ago

Replying to rblank:

The issue was specific to calling svn ci and parsing its output, so I have fixed it by passing a modified environment to Popen in that particular case only in [8639].

Hmm, the problem kicks in also when you re-use trac's functional test infrastructure (though it is no public api officially) and you need to call other commands which return different output depending on the locale. So just defaulting to English would be better for these use cases.

OT: Felix, are you really running a Linux box with non-English messages? I just can't stand a non-English OS (French Windows gives me the creeps :).

Yes, of course. How can I test where Fedora's translations need to be improved? ;-)

in reply to:  3 comment:4 by Remy Blank, 15 years ago

Replying to Felix Schwarz <felix.schwarz@…>:

So just defaulting to English would be better for these use cases.

I understand. Still, I prefer having this explicit for the calls where it is necessary, rather than overriding in all cases.

comment:5 by Remy Blank, 15 years ago

Milestone: 0.12

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank 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.