File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -200,17 +200,21 @@ def test_alt_digits_nl_langinfo(self):
200200 # Test nl_langinfo(ALT_DIGITS)
201201 tested = False
202202 for loc , (count , samples ) in known_alt_digits .items ():
203- try :
204- setlocale (LC_TIME , loc )
205- except Error :
206- continue
207203 with self .subTest (locale = loc ):
208- alt_digits = nl_langinfo (locale .ALT_DIGITS )
209- self .assertIsInstance (alt_digits , tuple )
210- self .assertEqual (len (alt_digits ), count )
211- for i in samples :
212- self .assertEqual (alt_digits [i ], samples [i ])
213- tested = True
204+ try :
205+ setlocale (LC_TIME , loc )
206+ except Error :
207+ self .skipTest (f'no locale { loc !r} ' )
208+ continue
209+ with self .subTest (locale = loc ):
210+ alt_digits = nl_langinfo (locale .ALT_DIGITS )
211+ self .assertIsInstance (alt_digits , tuple )
212+ if count and not alt_digits and sys .platform == 'darwin' :
213+ self .skipTest (f'ALT_DIGITS is not set for locale { loc !r} on macOS' )
214+ self .assertEqual (len (alt_digits ), count )
215+ for i in samples :
216+ self .assertEqual (alt_digits [i ], samples [i ])
217+ tested = True
214218 if not tested :
215219 self .skipTest ('no suitable locales' )
216220
You can’t perform that action at this time.
0 commit comments