]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Fix doctests
authorbenselme <benselme@gmail.com>
Sun, 11 Jan 2015 22:12:47 +0000 (17:12 -0500)
committerbenselme <benselme@gmail.com>
Sun, 11 Jan 2015 22:12:47 +0000 (17:12 -0500)
babel/dates.py
babel/numbers.py

index 4d326d20e9d9c0c6f284850546e6f827341e00c4..63c6eb16e77e17e719dc0dd53061ecc265405ccc 100644 (file)
@@ -320,14 +320,14 @@ def get_timezone_gmt(datetime=None, width='long', locale=LC_TIME):
 
 
 def get_timezone_location(dt_or_tzinfo=None, locale=LC_TIME):
-    """Return a representation of the given timezone using "location format".
+    u"""Return a representation of the given timezone using "location format".
 
     The result depends on both the local display name of the country and the
     city associated with the time zone:
 
     >>> tz = get_timezone('America/St_Johns')
-    >>> get_timezone_location(tz, locale='de_DE')
-    u"Kanada (St. John's) Zeit"
+    >>> print(get_timezone_location(tz, locale='de_DE'))
+    Kanada (St. John’s) Zeit
     >>> tz = get_timezone('America/Mexico_City')
     >>> get_timezone_location(tz, locale='de_DE')
     u'Mexiko (Mexiko-Stadt) Zeit'
@@ -582,7 +582,7 @@ def format_datetime(datetime=None, format='medium', tzinfo=None,
 
     >>> format_datetime(dt, 'full', tzinfo=get_timezone('Europe/Paris'),
     ...                 locale='fr_FR')
-    u'dimanche 1 avril 2007 17:30:00 heure avanc\xe9e d\u2019Europe centrale'
+    u'dimanche 1 avril 2007 17:30:00 heure d\u2019\xe9t\xe9 d\u2019Europe centrale'
     >>> format_datetime(dt, "yyyy.MM.dd G 'at' HH:mm:ss zzz",
     ...                 tzinfo=get_timezone('US/Eastern'), locale='en')
     u'2007.04.01 AD at 11:30:00 EDT'
@@ -640,7 +640,7 @@ def format_time(time=None, format='medium', tzinfo=None, locale=LC_TIME):
     >>> tzinfo = get_timezone('Europe/Paris')
     >>> t = tzinfo.localize(t)
     >>> format_time(t, format='full', tzinfo=tzinfo, locale='fr_FR')
-    u'15:30:00 heure avanc\xe9e d\u2019Europe centrale'
+    u'15:30:00 heure d\u2019\xe9t\xe9 d\u2019Europe centrale'
     >>> format_time(t, "hh 'o''clock' a, zzzz", tzinfo=get_timezone('US/Eastern'),
     ...             locale='en')
     u"09 o'clock AM, Eastern Daylight Time"
index 587d640706f5170f089f93ffb8e375a18d19ac1d..01af774dd7e9d361109d1265a53f89209f6b4c7c 100644 (file)
@@ -98,7 +98,8 @@ def get_territory_currencies(territory, start_date=None, end_date=None,
 
     >>> get_territory_currencies('US')
     ['USD']
-    >>> get_territory_currencies('US', tender=False, non_tender=True)
+    >>> get_territory_currencies('US', tender=False, non_tender=True,
+    ...                          start_date=date(2014, 1, 1))
     ['USN', 'USS']
 
     .. versionadded:: 2.0