Skip to content

Commit 714092d

Browse files
committed
Mark failing tests from test_threading
1 parent c932ad8 commit 714092d

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-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: 15 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)
@@ -1657,6 +1664,8 @@ def check_interrupt_main_noerror(self, signum):
16571664
# Restore original handler
16581665
signal.signal(signum, handler)
16591666

1667+
# TODO: RUSTPYTHON
1668+
@unittest.expectedFailure
16601669
def test_interrupt_main_subthread(self):
16611670
# Calling start_new_thread with a function that executes interrupt_main
16621671
# should raise KeyboardInterrupt upon completion.
@@ -1715,6 +1724,8 @@ def worker(started, cont, interrupted):
17151724

17161725
class AtexitTests(unittest.TestCase):
17171726

1727+
# TODO: RUSTPYTHON
1728+
@unittest.expectedFailure
17181729
def test_atexit_output(self):
17191730
rc, out, err = assert_python_ok("-c", """if True:
17201731
import threading
@@ -1728,6 +1739,8 @@ def run_last():
17281739
self.assertFalse(err)
17291740
self.assertEqual(out.strip(), b'parrot')
17301741

1742+
# TODO: RUSTPYTHON
1743+
@unittest.expectedFailure
17311744
def test_atexit_called_once(self):
17321745
rc, out, err = assert_python_ok("-c", """if True:
17331746
import threading
@@ -1743,6 +1756,8 @@ def test_atexit_called_once(self):
17431756

17441757
self.assertFalse(err)
17451758

1759+
# TODO: RUSTPYTHON
1760+
@unittest.expectedFailure
17461761
def test_atexit_after_shutdown(self):
17471762
# The only way to do this is by registering an atexit within
17481763
# 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)