|
8 | 8 | import io |
9 | 9 | import locale |
10 | 10 | import os |
| 11 | +import platform |
11 | 12 | import sys |
12 | 13 | import time |
13 | 14 |
|
@@ -557,7 +558,29 @@ def test_months(self): |
557 | 558 | # verify it "acts like a sequence" in two forms of iteration |
558 | 559 | self.assertEqual(value[::-1], list(reversed(value))) |
559 | 560 |
|
560 | | - def test_standalone_month_name_and_abbr(self): |
| 561 | + @support.run_with_locale('LC_ALL', 'pl_PL') |
| 562 | + @unittest.skipUnless(sys.platform == 'darwin' or platform.libc_ver()[0] == 'glibc', |
| 563 | + "Guaranteed to work with glibc and macOS") |
| 564 | + def test_standalone_month_name_and_abbr_pl_locale(self): |
| 565 | + expected_standalone_month_names = [ |
| 566 | + "", "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", |
| 567 | + "lipiec", "sierpień", "wrzesień", "październik", "listopad", |
| 568 | + "grudzień" |
| 569 | + ] |
| 570 | + expected_standalone_month_abbr = [ |
| 571 | + "", "sty", "lut", "mar", "kwi", "maj", "cze", |
| 572 | + "lip", "sie", "wrz", "paź", "lis", "gru" |
| 573 | + ] |
| 574 | + self.assertEqual( |
| 575 | + list(calendar.standalone_month_name), |
| 576 | + expected_standalone_month_names |
| 577 | + ) |
| 578 | + self.assertEqual( |
| 579 | + list(calendar.standalone_month_abbr), |
| 580 | + expected_standalone_month_abbr |
| 581 | + ) |
| 582 | + |
| 583 | + def test_standalone_month_name_and_abbr_C_locale(self): |
561 | 584 | # Ensure that the standalone month names and abbreviations are |
562 | 585 | # equal to the regular month names and abbreviations for |
563 | 586 | # the "C" locale. |
|
0 commit comments