Edgewall Software

Changes between Initial Version and Version 1 of Ticket #11366, comment 10


Ignore:
Timestamp:
Dec 4, 2013, 7:06:32 PM (6 years ago)
Author:
Jun Omae

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11366, comment 10

    initial v1  
    2222}}}
    2323
    24 I would like to skip `ParseDateWithoutBabelTestCase` because it's difficult to test it on Windows.
    25 {{{#!diff
    26 diff --git a/trac/util/tests/datefmt.py b/trac/util/tests/datefmt.py
    27 index 342db94..a80567c 100644
    28 --- a/trac/util/tests/datefmt.py
    29 +++ b/trac/util/tests/datefmt.py
    30 @@ -243,16 +243,9 @@ class ParseISO8601TestCase(unittest.TestCase):
    31 
    32  class ParseDateWithoutBabelTestCase(unittest.TestCase):
    33 
    34 -    if os.name != 'nt':
    35 -        locales = {'en_US': 'en_US.UTF8', 'en_GB': 'en_GB.UTF8',
    36 -                   'fr': 'fr_FR.UTF8', 'ja': 'ja_JP.UTF8',
    37 -                   'zh_CN': 'zh_CN.UTF8'}
    38 -    else:
    39 -        # http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx
    40 -        locales = {'en_US': 'English_United States',
    41 -                   'en_GB': 'English_United Kingdom',
    42 -                   'fr': 'French_France', 'ja': 'Japanese_Japan',
    43 -                   'zh_CN': "Chinese_People's Republic of China"}
    44 +    locales = {'en_US': 'en_US.UTF8', 'en_GB': 'en_GB.UTF8',
    45 +               'fr': 'fr_FR.UTF8', 'ja': 'ja_JP.UTF8',
    46 +               'zh_CN': 'zh_CN.UTF8'}
    47 
    48      def setUp(self):
    49          rv = locale.getlocale(locale.LC_TIME)
    50 @@ -1485,7 +1478,10 @@ def suite():
    51      else:
    52          print "SKIP: utils/tests/datefmt.py (no babel installed)"
    53      suite.addTest(unittest.makeSuite(ParseISO8601TestCase))
    54 -    suite.addTest(unittest.makeSuite(ParseDateWithoutBabelTestCase))
    55 +    if os.name != 'nt':
    56 +        # Don't run on Windows because MSVC locale depends on date formats
    57 +        # settings in user session
    58 +        suite.addTest(unittest.makeSuite(ParseDateWithoutBabelTestCase))
    59      suite.addTest(unittest.makeSuite(ParseRelativeDateTestCase))
    60      suite.addTest(unittest.makeSuite(ParseDateValidRangeTestCase))
    61      suite.addTest(unittest.makeSuite(HttpDateTestCase))
    62 }}}
     24I would like to skip `ParseDateWithoutBabelTestCase` because it's difficult to test it on Windows, log:jomae.git:ticket11366.2.