diff options
author | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2006-08-06 12:37:03 +0000 |
---|---|---|
committer | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2006-08-06 12:37:03 +0000 |
commit | 16ee33adfc45279544ec593f5123142ab12a302d (patch) | |
tree | e0ab00c2630b339c5d6650d71ad650147c539c24 /Lib/test/test_threading.py | |
parent | d336e98ed999c80df2fa8829622aa443136c655d (diff) | |
download | cpython-git-16ee33adfc45279544ec593f5123142ab12a302d.tar.gz |
test_threading now skips testing alternate thread stack sizes on
platforms that don't support changing thread stack size.
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index ac4a010bc0..79335eaca0 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -89,7 +89,12 @@ class ThreadTests(unittest.TestCase): def test_various_ops_small_stack(self): if verbose: print 'with 256kB thread stack size...' - threading.stack_size(262144) + try: + threading.stack_size(262144) + except thread.error: + if verbose: + print 'platform does not support changing thread stack size' + return self.test_various_ops() threading.stack_size(0) @@ -97,7 +102,12 @@ class ThreadTests(unittest.TestCase): def test_various_ops_large_stack(self): if verbose: print 'with 1MB thread stack size...' - threading.stack_size(0x100000) + try: + threading.stack_size(0x100000) + except thread.error: + if verbose: + print 'platform does not support changing thread stack size' + return self.test_various_ops() threading.stack_size(0) |