From 542fb9b6d8cf5b7529a6522d50a3893f4bf17194 Mon Sep 17 00:00:00 2001 From: Kris Gesling Date: Thu, 25 Nov 2021 11:41:29 +0930 Subject: [PATCH 1/2] Remove random commented out code For some reason a nice_time function signature was left in as a comment this has been copied across to multiple languages. --- test/test_format.py | 3 --- test/test_format_da.py | 2 -- test/test_format_de.py | 2 -- test/test_format_fa.py | 3 --- test/test_format_fr.py | 2 -- test/test_format_hu.py | 2 -- test/test_format_nl.py | 2 -- test/test_format_sv.py | 2 -- 8 files changed, 18 deletions(-) diff --git a/test/test_format.py b/test/test_format.py index 2a3800b9..af6d0a3e 100644 --- a/test/test_format.py +++ b/test/test_format.py @@ -385,9 +385,6 @@ def test_ordinals(self): short_scale=False), "eighteen " "trillionth") -# def nice_time(dt, lang="en-us", speech=True, use_24hour=False, -# use_ampm=False): - class TestNiceDateFormat(unittest.TestCase): @classmethod diff --git a/test/test_format_da.py b/test/test_format_da.py index 981ee90a..1b1f938b 100644 --- a/test/test_format_da.py +++ b/test/test_format_da.py @@ -202,8 +202,6 @@ def test_convert_dacimals_da(self): "minus enogtyve komma to tre fire nul nul") -# def nice_time(dt, lang="da-dk", speech=True, use_24hour=False, -# use_ampm=False): class TestNiceDateFormat_da(unittest.TestCase): def test_convert_times_da(self): dt = datetime.datetime(2017, 1, 31, 13, 22, 3, tzinfo=default_timezone()) diff --git a/test/test_format_de.py b/test/test_format_de.py index b04ad519..12f8fe90 100644 --- a/test/test_format_de.py +++ b/test/test_format_de.py @@ -208,8 +208,6 @@ def test_convert_decimals_de(self): "minus einundzwanzig Komma zwei drei vier null null") -# def nice_time(dt, lang="de-de", speech=True, use_24hour=False, -# use_ampm=False): class TestNiceDateFormat_de(unittest.TestCase): def setUp(self): self.old_lang = get_default_lang() diff --git a/test/test_format_fa.py b/test/test_format_fa.py index 8bc01119..effcd43a 100644 --- a/test/test_format_fa.py +++ b/test/test_format_fa.py @@ -214,9 +214,6 @@ def test_variant(self): -# def nice_time(dt, lang="en-us", speech=True, use_24hour=False, -# use_ampm=False): - class TestNiceDateFormat(unittest.TestCase): @classmethod def setUpClass(cls): diff --git a/test/test_format_fr.py b/test/test_format_fr.py index a7b5e710..16502003 100644 --- a/test/test_format_fr.py +++ b/test/test_format_fr.py @@ -180,8 +180,6 @@ def test_convert_decimals_fr(self): "moins vingt-et-un virgule deux trois quatre") -# def nice_time(dt, lang="en-us", speech=True, use_24hour=False, -# use_ampm=False): class TestNiceDateFormat_fr(unittest.TestCase): def test_convert_times_fr(self): dt = datetime.datetime(2017, 1, 31, diff --git a/test/test_format_hu.py b/test/test_format_hu.py index 6d4b1e73..9d21cdce 100644 --- a/test/test_format_hu.py +++ b/test/test_format_hu.py @@ -204,8 +204,6 @@ def test_convert_decimals_hu(self): "huszonháromezer-négyszáz százezred") -# def nice_time(dt, lang="hu-hu", speech=True, use_24hour=False, -# use_ampm=False): class TestNiceDateFormat_hu(unittest.TestCase): def test_convert_times_hu(self): dt = datetime.datetime(2017, 1, 31, diff --git a/test/test_format_nl.py b/test/test_format_nl.py index 3e16a4df..82096a54 100644 --- a/test/test_format_nl.py +++ b/test/test_format_nl.py @@ -195,8 +195,6 @@ def test_convert_decimals_nl(self): "min éénentwintig komma twee drie vier nul nul") -# def nice_time(dt, lang="nl-nl", speech=True, use_24hour=False, -# use_ampm=False): class TestNiceDateFormat_nl(unittest.TestCase): def test_convert_times_nl(self): dt = datetime.datetime(2017, 1, 31, diff --git a/test/test_format_sv.py b/test/test_format_sv.py index 625b9bd0..9db2ec1f 100644 --- a/test/test_format_sv.py +++ b/test/test_format_sv.py @@ -202,8 +202,6 @@ def test_convert_dacimals_sv(self): "minus tjugoen komma två tre fyra noll noll") -# def nice_time(dt, lang="sv-se", speech=True, use_24hour=False, -# use_ampm=False): class TestNiceDateFormat_sv(unittest.TestCase): def test_convert_times_sv(self): dt = datetime.datetime(2017, 1, 31, 13, 22, 3, tzinfo=default_timezone()) From 1f57a16c8c27635ce595ad8cac8d3f5e1b358f72 Mon Sep 17 00:00:00 2001 From: Kris Gesling Date: Thu, 25 Nov 2021 13:51:13 +0930 Subject: [PATCH 2/2] Fix strangely commented print statements Left in as they can be useful for debugging --- test/test_format.py | 3 +-- test/test_format_cs.py | 2 +- test/test_format_sl.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/test_format.py b/test/test_format.py index af6d0a3e..08e25acf 100644 --- a/test/test_format.py +++ b/test/test_format.py @@ -600,8 +600,7 @@ def test_nice_year(self): dt = datetime.datetime(i, 1, 31, 13, 2, 3, tzinfo=default_timezone()) self.assertTrue(len(nice_year(dt, lang=lang)) > 0) # Looking through the date sequence can be helpful - -# print(nice_year(dt, lang=lang)) + # print(nice_year(dt, lang=lang)) def test_nice_duration(self): self.assertEqual(nice_duration(1), "one second") diff --git a/test/test_format_cs.py b/test/test_format_cs.py index cdf4c5a3..fc93e933 100644 --- a/test/test_format_cs.py +++ b/test/test_format_cs.py @@ -579,8 +579,8 @@ def test_nice_year(self): tzinfo=default_timezone()) self.assertTrue(len(nice_year(dt, lang=lang)) > 0) # Looking through the date sequence can be helpful + # print(nice_year(dt, lang=lang)) -# print(nice_year(dt, lang=lang)) def test_nice_duration(self): self.assertEqual(nice_duration(1), "jedna sekunda") diff --git a/test/test_format_sl.py b/test/test_format_sl.py index 423127f6..f5f5ec92 100644 --- a/test/test_format_sl.py +++ b/test/test_format_sl.py @@ -525,8 +525,7 @@ def test_nice_year(self): tzinfo=default_timezone()) self.assertTrue(len(nice_year(dt, lang=lang)) > 0) # Looking through the date sequence can be helpful - -# print(nice_year(dt, lang=lang)) + # print(nice_year(dt, lang=lang)) def test_nice_duration(self): # TODO implement better plural support for nice_duration