Skip to content

Commit 38c75b9

Browse files
author
Anselm Kruis
committed
Adapt to Stackless 3.7
Fix two minor failures caused by changes in the Python argument processing and error handling.
1 parent 6e783cc commit 38c75b9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

stackless_testsuite/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ def _checkSignature(self, func, nb_mandatory, accept_arbitrary, additionalArg, *
185185
func, *(args + [additionalArg]))
186186
if nb_mandatory > 0:
187187
exc_msg = r"(takes|expected) at least {0} argument|Required argument '{1}' \(pos 1\) not found".format(nb_mandatory, names[0])
188+
exc_msg += r"|{0}\(\) missing required argument '{1}' \(pos 1\)".format(func.__name__, names[0])
188189
if len(args) == nb_mandatory:
189190
if nb_mandatory == 1:
190191
exc_msg = r"takes exactly one argument"

stackless_testsuite/v3_1/tasklet/test_thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def test_bind_to_bogus_tid(self):
470470
t.remove()
471471
with theThread:
472472
self.assertEqual(t.thread_id, theThread.ident)
473-
self.assertRaises(ValueError, t.bind_thread, -2)
473+
self.assertRaises((ValueError, OverflowError), t.bind_thread, -2)
474474
t.bind_thread(current_id)
475475
self.assertEqual(t.thread_id, current_id)
476476
t.run()

0 commit comments

Comments
 (0)