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.
1 parent 18249d9 commit dfa715eCopy full SHA for dfa715e
Lib/test/test_threading.py
@@ -174,6 +174,21 @@ def test_args_argument(self):
174
t.start()
175
t.join()
176
177
+ def test_args_invalid_arguments_raises_typeerror(self):
178
+ def task(x):
179
+ pass
180
+
181
+ invalid_args = (
182
+ "test string",
183
+ 1,
184
+ b"Bytes"
185
+ )
186
187
+ for args in invalid_args:
188
+ with self.subTest(args=args):
189
+ with self.assertRaises(TypeError):
190
+ threading.Thread(target=task, args=args)
191
192
def test_lock_no_args(self):
193
threading.Lock() # works
194
self.assertRaises(TypeError, threading.Lock, 1)
0 commit comments