We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab8ae94 + eb65675 commit 9dc7e1cCopy full SHA for 9dc7e1c
tests/test_thread.py
@@ -83,13 +83,22 @@ def test_ignoreAll():
83
84
def test_threadKilling():
85
"""This test is for testing that threads are killed properly"""
86
+ stdout = []
87
+
88
+ def _dummy_target_killThread(x: int, delay: float = 0):
89
+ for i in range(x):
90
+ stdout.append(i)
91
+ time.sleep(delay)
92
93
new = Thread(
- target = _dummy_iterative,
- args = [5, 0.1, 0]
94
+ target = _dummy_target_killThread,
95
+ args = [4, 1],
96
+ daemon = True
97
)
98
new.start()
99
new.kill(True)
100
assert not new.is_alive()
101
+ assert len(stdout) != 4
102
103
104
0 commit comments