test_threading now skips testing alternate thread stack sizes on
platforms that don't support changing thread stack size.
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index ac4a010..79335ea 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -89,7 +89,12 @@
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 @@
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)
diff --git a/Misc/NEWS b/Misc/NEWS
index 95b2d4e..04549b9 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -53,6 +53,9 @@
- 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
-------------