]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Download CLDR 33.0; fix test changes
authorAarni Koskela <akx@iki.fi>
Mon, 28 May 2018 13:22:03 +0000 (16:22 +0300)
committerAarni Koskela <akx@iki.fi>
Mon, 28 May 2018 13:32:04 +0000 (16:32 +0300)
scripts/download_import_cldr.py
tests/test_dates.py
tests/test_numbers.py

index 1d3c17bf6ed7ef4858b46f03e66372387d67fc61..b6e6f430151057e2e9dd1afe0b028e9c28ca91b7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import contextlib
 import os
@@ -13,9 +13,9 @@ except ImportError:
     from urllib import urlretrieve
 
 
-URL = 'http://unicode.org/Public/cldr/32.0.1/core.zip'
-FILENAME = 'core-32.0.1.zip'
-FILESUM = '571e33f482543f02ebd06c9b43d127a87c637c8c'
+URL = 'https://unicode.org/Public/cldr/33/core.zip'
+FILENAME = 'core-33.0.zip'
+FILESUM = 'fa3490082c086d21257153609642f54fcf788fcfda4966fe67f3f6daca0d58b9'
 BLKSIZE = 131072
 
 
@@ -53,7 +53,7 @@ def is_good_file(filename):
     if not os.path.isfile(filename):
         log('Local copy \'%s\' not found', filename)
         return False
-    h = hashlib.sha1()
+    h = hashlib.sha256()
     with open(filename, 'rb') as f:
         while 1:
             blk = f.read(BLKSIZE)
index 1cb60f1698c31407bff3296e2fc44e6ef3b356e8..b8c293ba646acb4f55e714ec9307c8a4b6be4392 100644 (file)
@@ -134,16 +134,16 @@ class DateTimeFormatTestCase(unittest.TestCase):
         self.assertEqual('7', fmt['e'])  # monday is first day of week
         fmt = dates.DateTimeFormat(d, locale='en_US')
         self.assertEqual('01', fmt['ee'])  # sunday is first day of week
-        fmt = dates.DateTimeFormat(d, locale='bn_BD')
-        self.assertEqual('03', fmt['ee'])  # friday is first day of week
+        fmt = dates.DateTimeFormat(d, locale='ar_BH')
+        self.assertEqual('02', fmt['ee'])  # saturday is first day of week
 
         d = date(2007, 4, 2)  # a monday
         fmt = dates.DateTimeFormat(d, locale='de_DE')
         self.assertEqual('1', fmt['e'])  # monday is first day of week
         fmt = dates.DateTimeFormat(d, locale='en_US')
         self.assertEqual('02', fmt['ee'])  # sunday is first day of week
-        fmt = dates.DateTimeFormat(d, locale='bn_BD')
-        self.assertEqual('04', fmt['ee'])  # friday is first day of week
+        fmt = dates.DateTimeFormat(d, locale='ar_BH')
+        self.assertEqual('03', fmt['ee'])  # saturday is first day of week
 
     def test_local_day_of_week_standalone(self):
         d = date(2007, 4, 1)  # a sunday
@@ -151,16 +151,16 @@ class DateTimeFormatTestCase(unittest.TestCase):
         self.assertEqual('7', fmt['c'])  # monday is first day of week
         fmt = dates.DateTimeFormat(d, locale='en_US')
         self.assertEqual('1', fmt['c'])  # sunday is first day of week
-        fmt = dates.DateTimeFormat(d, locale='bn_BD')
-        self.assertEqual('3', fmt['c'])  # friday is first day of week
+        fmt = dates.DateTimeFormat(d, locale='ar_BH')
+        self.assertEqual('2', fmt['c'])  # saturday is first day of week
 
         d = date(2007, 4, 2)  # a monday
         fmt = dates.DateTimeFormat(d, locale='de_DE')
         self.assertEqual('1', fmt['c'])  # monday is first day of week
         fmt = dates.DateTimeFormat(d, locale='en_US')
         self.assertEqual('2', fmt['c'])  # sunday is first day of week
-        fmt = dates.DateTimeFormat(d, locale='bn_BD')
-        self.assertEqual('4', fmt['c'])  # friday is first day of week
+        fmt = dates.DateTimeFormat(d, locale='ar_BH')
+        self.assertEqual('3', fmt['c'])  # saturday is first day of week
 
     def test_pattern_day_of_week(self):
         dt = datetime(2016, 2, 6)
index cdbe0663c2eb754e3d5323e75b9d17751b11405d..493c1a7fef6ae283173ea5feaabe983c2ddd7048 100644 (file)
@@ -179,7 +179,7 @@ def test_list_currencies():
 
     assert list_currencies(locale='pa_Arab') == {'PKR', 'INR', 'EUR'}
 
-    assert len(list_currencies()) == 299
+    assert len(list_currencies()) == 300
 
 
 def test_validate_currency():