Skip to content

Commit 4c4dfc0

Browse files
committed
Mark failing tests from test_threading
1 parent c932ad8 commit 4c4dfc0

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

Lib/test/test_threadedtempfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import threading
2222
from traceback import print_exc
2323

24+
import sys # XXX: RUSTPYTHON
25+
2426

2527
NUM_THREADS = 20
2628
FILES_PER_THREAD = 50

Lib/test/test_threading.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,8 @@ def test_shutdown_locks(self):
880880
# Daemon threads must never add it to _shutdown_locks.
881881
self.assertNotIn(tstate_lock, threading._shutdown_locks)
882882

883+
# TODO: RUSTPYTHON
884+
@unittest.expectedFailure
883885
def test_locals_at_exit(self):
884886
# bpo-19466: thread locals must not be deleted before destructors
885887
# are called
@@ -1599,6 +1601,11 @@ def test_release_save_unacquired(self):
15991601
class EventTests(lock_tests.EventTests):
16001602
eventtype = staticmethod(threading.Event)
16011603

1604+
# TODO: RUSTPYTHON
1605+
@unittest.expectedFailure
1606+
def test_reset_internal_locks(): # TODO: RUSTPYTHON; remove this when done
1607+
super().test_reset_internal_locks()
1608+
16021609
class ConditionAsRLockTests(lock_tests.RLockTests):
16031610
# Condition uses an RLock by default and exports its API.
16041611
locktype = staticmethod(threading.Condition)
@@ -1715,6 +1722,8 @@ def worker(started, cont, interrupted):
17151722

17161723
class AtexitTests(unittest.TestCase):
17171724

1725+
# TODO: RUSTPYTHON
1726+
@unittest.expectedFailure
17181727
def test_atexit_output(self):
17191728
rc, out, err = assert_python_ok("-c", """if True:
17201729
import threading
@@ -1728,6 +1737,8 @@ def run_last():
17281737
self.assertFalse(err)
17291738
self.assertEqual(out.strip(), b'parrot')
17301739

1740+
# TODO: RUSTPYTHON
1741+
@unittest.expectedFailure
17311742
def test_atexit_called_once(self):
17321743
rc, out, err = assert_python_ok("-c", """if True:
17331744
import threading
@@ -1743,6 +1754,8 @@ def test_atexit_called_once(self):
17431754

17441755
self.assertFalse(err)
17451756

1757+
# TODO: RUSTPYTHON
1758+
@unittest.expectedFailure
17461759
def test_atexit_after_shutdown(self):
17471760
# The only way to do this is by registering an atexit within
17481761
# an atexit, which is intended to raise an exception.

Lib/test/test_threading_local.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ def f():
110110

111111
self.assertTrue(passed)
112112

113-
# TODO: RUSTPYTHON, __new__ vs __init__ cooperation
114-
@unittest.expectedFailure
115113
def test_arguments(self):
116114
# Issue 1522237
117115
class MyLocal(self._local):
@@ -202,6 +200,12 @@ class X:
202200
class ThreadLocalTest(unittest.TestCase, BaseLocalTest):
203201
_local = _thread._local
204202

203+
# TODO: RUSTPYTHON, __new__ vs __init__ cooperation
204+
@unittest.expectedFailure
205+
def test_arguments():
206+
super().test_arguments()
207+
208+
205209
class PyThreadingLocalTest(unittest.TestCase, BaseLocalTest):
206210
_local = _threading_local.local
207211

0 commit comments

Comments
 (0)