[Python-checkins] python/dist/src/Lib/test test_decimal.py, 1.15, 1.16

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sat Dec 18 20:07:23 CET 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv562/test
Modified Files:
	test_decimal.py 
Log Message:
Bug #1083645
* The decimal module wouldn't load on builds without threads.
Index: test_decimal.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_decimal.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- test_decimal.py	24 Nov 2004 07:28:48 -0000	1.15
+++ test_decimal.py	18 Dec 2004 19:07:19 -0000	1.16
@@ -32,8 +32,11 @@
 import pickle, copy
 from decimal import *
 from test.test_support import TestSkipped, run_unittest, run_doctest, is_resource_enabled
-import threading
 import random
+try:
+ import threading
+except ImportError:
+ threading = None
 
 # Useful Test Constant
 Signals = getcontext().flags.keys()
@@ -724,7 +727,11 @@
 class DecimalUseOfContextTest(unittest.TestCase):
 '''Unit tests for Use of Context cases in Decimal.'''
 
- import threading
+ try:
+ import threading
+ except ImportError:
+ threading = None
+
 # Take care executing this test from IDLE, there's an issue in threading
 # that hangs IDLE and I couldn't find it
 
@@ -745,6 +752,9 @@
 self.finish1.wait()
 return
 
+ if threading is None:
+ del test_threading
+
 
 class DecimalUsabilityTest(unittest.TestCase):
 '''Unit tests for Usability cases of Decimal.'''


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /