@@ -290,7 +290,6 @@ def eval_file(self, file):
290290 global skip_expected
291291 if skip_expected :
292292 raise unittest .SkipTest
293- return
294293 with open (file ) as f :
295294 for line in f :
296295 line = line .replace ('\r \n ' , '' ).replace ('\n ' , '' )
@@ -301,7 +300,6 @@ def eval_file(self, file):
301300 #Exception raised where there shouldn't have been one.
302301 self .fail ('Exception "' + exception .__class__ .__name__ + '" raised on line ' + line )
303302
304- return
305303
306304 def eval_line (self , s ):
307305 if s .find (' -> ' ) >= 0 and s [:2 ] != '--' and not s .startswith (' --' ):
@@ -461,7 +459,6 @@ def FixQuotes(val):
461459
462460 self .assertEqual (myexceptions , theirexceptions ,
463461 'Incorrect flags set in ' + s + ' -- got ' + str (myexceptions ))
464- return
465462
466463 def getexceptions (self ):
467464 return [e for e in Signals [self .decimal ] if self .context .flags [e ]]
@@ -1073,7 +1070,7 @@ def test_n_format(self):
10731070 try :
10741071 from locale import CHAR_MAX
10751072 except ImportError :
1076- return
1073+ self . skipTest ( 'locale.CHAR_MAX not available' )
10771074
10781075 def make_grouping (lst ):
10791076 return '' .join ([chr (x ) for x in lst ]) if self .decimal == C else lst
@@ -1164,8 +1161,12 @@ def test_wide_char_separator_decimal_point(self):
11641161
11651162 decimal_point = locale .localeconv ()['decimal_point' ]
11661163 thousands_sep = locale .localeconv ()['thousands_sep' ]
1167- if decimal_point != '\u066b ' or thousands_sep != '\u066c ' :
1168- return
1164+ if decimal_point != '\u066b ' :
1165+ self .skipTest ('inappropriate decimal point separator'
1166+ '({!r} not {!r})' .format (decimal_point , '\u066b ' ))
1167+ if thousands_sep != '\u066c ' :
1168+ self .skipTest ('inappropriate thousands separator'
1169+ '({!r} not {!r})' .format (thousands_sep , '\u066c ' ))
11691170
11701171 self .assertEqual (format (Decimal ('100000000.123' ), 'n' ),
11711172 '100\u066c 000\u066c 000\u066b 123' )
@@ -1515,7 +1516,6 @@ def thfunc1(cls):
15151516 cls .assertTrue (c1 .flags [Inexact ])
15161517 for sig in Overflow , Underflow , DivisionByZero , InvalidOperation :
15171518 cls .assertFalse (c1 .flags [sig ])
1518- return
15191519
15201520def thfunc2 (cls ):
15211521 Decimal = cls .decimal .Decimal
@@ -1560,7 +1560,6 @@ def thfunc2(cls):
15601560 cls .assertTrue (thiscontext .flags [Inexact ])
15611561 for sig in Overflow , Underflow , DivisionByZero , InvalidOperation :
15621562 cls .assertFalse (thiscontext .flags [sig ])
1563- return
15641563
15651564class ThreadingTest (unittest .TestCase ):
15661565 '''Unit tests for thread local contexts in Decimal.'''
@@ -1602,7 +1601,6 @@ def test_threading(self):
16021601 DefaultContext .prec = save_prec
16031602 DefaultContext .Emax = save_emax
16041603 DefaultContext .Emin = save_emin
1605- return
16061604
16071605@unittest .skipUnless (threading , 'threading required' )
16081606class CThreadingTest (ThreadingTest ):
@@ -4525,7 +4523,6 @@ def checkSameDec(operation, useOther=False):
45254523 self .assertEqual (d1 ._sign , b1 ._sign )
45264524 self .assertEqual (d1 ._int , b1 ._int )
45274525 self .assertEqual (d1 ._exp , b1 ._exp )
4528- return
45294526
45304527 Decimal (d1 )
45314528 self .assertEqual (d1 ._sign , b1 ._sign )
@@ -5271,7 +5268,7 @@ def test_invalid_override(self):
52715268 try :
52725269 from locale import CHAR_MAX
52735270 except ImportError :
5274- return
5271+ self . skipTest ( 'locale.CHAR_MAX not available' )
52755272
52765273 def make_grouping (lst ):
52775274 return '' .join ([chr (x ) for x in lst ])
0 commit comments