Autopilot tests assume English locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Calendar App |
Fix Released
|
Medium
|
Olivier Tilloy |
Bug Description
Some autopilot tests fail when run locally on a system with a locale setting that is not English.
On my laptop (where LANG=fr_FR.UTF-8), one of such failures is for calendar_
Traceback (most recent call last):
File "/home/
Equals(
File "/usr/lib/
raise MismatchError(
MismatchError: 'January' != u'janvier'
The tests should be fixed to not make implicit assumptions on the current locale.
Related branches
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
- Nicholas Skaggs (community): Approve
-
Diff: 15 lines (+5/-0)1 file modifiedtests/autopilot/calendar_app/tests/__init__.py (+5/-0)
description: | updated |
Changed in ubuntu-calendar-app: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in ubuntu-calendar-app: | |
assignee: | nobody → Olivier Tilloy (osomon) |
status: | Triaged → In Progress |
Changed in ubuntu-calendar-app: | |
status: | Fix Committed → Fix Released |
The quickest way to fix that (tested here locally) is probably to unset the locale before launching the application in the autopilot tests:
=== modified file 'tests/ autopilot/ calendar_ app/tests/ __init_ _.py' /calendar_ app/tests/ __init_ _.py 2014-01-18 23:29:11 +0000 /calendar_ app/tests/ __init_ _.py 2014-01-28 15:06:16 +0000
# disabling for now
# self.addCleanup (os.system( "start maliit-server"))
--- tests/autopilot
+++ tests/autopilot
@@ -62,6 +62,11 @@
+ # Unset the current locale to ensure locale-specific data environment( 'LC_ALL' , 'C') exists( self.local_ location) :
self. launch_ test_local( ) exists( self.installed_ location) :
+ # (day and month names, first day of the week, …) doesn’t get
+ # in the way of test expectations.
+ self.patch_
+
if os.path.
elif os.path.