]> granicus.if.org Git - python/commitdiff
test_threading now skips testing alternate thread stack sizes on
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>
Sun, 6 Aug 2006 12:37:03 +0000 (12:37 +0000)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>
Sun, 6 Aug 2006 12:37:03 +0000 (12:37 +0000)
platforms that don't support changing thread stack size.

Lib/test/test_threading.py
Misc/NEWS

index ac4a010bc0cd88f2f6538ff969b6e9bd45af5437..79335eaca062391e4a77cd56c30e24f7ea209add 100644 (file)
@@ -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)
 
index 95b2d4eb3cb4a86bef8e474dcdd56c4ed62c4ab5..04549b919558186507848b306b914faf32ae184a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -53,6 +53,9 @@ Tests
 
 - Bug #1535182: really test the xreadlines() method of bz2 objects.
 
+- test_threading now skips testing alternate thread stack sizes on
+  platforms that don't support changing thread stack size.
+
 
 Documentation
 -------------