| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,13 @@ | |||
| 19 | 19 | else: | |
| 20 | 20 | glibc_ver = None | |
| 21 | 21 | ||
| 22 | + def skip_cygwin_locale(): | ||
| 23 | + if sys.platform != 'cygwin': | ||
| 24 | + return | ||
| 25 | + loc = locale.getlocale(locale.LC_TIME)[0] | ||
| 26 | + if loc in ('my_MM', 'or_IN'): | ||
| 27 | + raise unittest.SkipTest('test fails on Cygwin') | ||
| 28 | + | ||
| 22 | 29 | ||
| 23 | 30 | class getlang_Tests(unittest.TestCase): | |
| 24 | 31 | """Test _getlang""" | |
@@ -509,6 +516,8 @@ def test_bad_timezone(self): | |||
| 509 | 516 | 'my_MM', 'or_IN', 'shn_MM', 'az_IR', | |
| 510 | 517 | 'byn_ER', 'wal_ET', 'lzh_TW') | |
| 511 | 518 | def test_date_time_locale(self): | |
| 519 | + skip_cygwin_locale() | ||
| 520 | + | ||
| 512 | 521 | # Test %c directive | |
| 513 | 522 | loc = locale.getlocale(locale.LC_TIME)[0] | |
| 514 | 523 | if glibc_ver and glibc_ver < (2, 31) and loc == 'br_FR': | |
@@ -536,6 +545,8 @@ def test_date_time_locale(self): | |||
| 536 | 545 | 'csb_PL', 'br_FR', 'gez_ET', 'brx_IN', | |
| 537 | 546 | 'my_MM', 'shn_MM') | |
| 538 | 547 | def test_date_time_locale2(self): | |
| 548 | + skip_cygwin_locale() | ||
| 549 | + | ||
| 539 | 550 | # Test %c directive | |
| 540 | 551 | loc = locale.getlocale(locale.LC_TIME)[0] | |
| 541 | 552 | if sys.platform.startswith('sunos'): | |
@@ -550,6 +561,8 @@ def test_date_time_locale2(self): | |||
| 550 | 561 | 'he_IL', 'eu_ES', 'ar_AE', | |
| 551 | 562 | 'az_IR', 'my_MM', 'or_IN', 'shn_MM', 'lzh_TW') | |
| 552 | 563 | def test_date_locale(self): | |
| 564 | + skip_cygwin_locale() | ||
| 565 | + | ||
| 553 | 566 | # Test %x directive | |
| 554 | 567 | now = time.time() | |
| 555 | 568 | self.roundtrip('%x', slice(0, 3), time.localtime(now)) | |
@@ -567,6 +580,8 @@ def test_date_locale(self): | |||
| 567 | 580 | @run_with_locales('LC_TIME', 'en_US', 'fr_FR', 'de_DE', 'ja_JP', | |
| 568 | 581 | 'eu_ES', 'ar_AE', 'my_MM', 'shn_MM', 'lzh_TW') | |
| 569 | 582 | def test_date_locale2(self): | |
| 583 | + skip_cygwin_locale() | ||
| 584 | + | ||
| 570 | 585 | # Test %x directive | |
| 571 | 586 | loc = locale.getlocale(locale.LC_TIME)[0] | |
| 572 | 587 | if sys.platform.startswith(('sunos', 'aix')): | |
@@ -587,6 +602,8 @@ def test_date_locale2(self): | |||
| 587 | 602 | 'ti_ET', 'tig_ER', 'wal_ET', 'lzh_TW', | |
| 588 | 603 | 'ar_SA', 'bg_BG') | |
| 589 | 604 | def test_time_locale(self): | |
| 605 | + skip_cygwin_locale() | ||
| 606 | + | ||
| 590 | 607 | # Test %X directive | |
| 591 | 608 | loc = locale.getlocale(locale.LC_TIME)[0] | |
| 592 | 609 | pos = slice(3, 6) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments