gh-101326: Fix regression when passing None to FutureIter.throw (#101327)

This commit is contained in:
Shantanu 2023-01-25 12:01:01 -08:00 committed by GitHub
parent 952a1d9cc9
commit a178ba82bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -612,6 +612,8 @@ class BaseFutureTests:
Exception, Exception("elephant"), 32)
self.assertRaises(TypeError, fi.throw,
Exception("elephant"), Exception("elephant"))
# https://github.com/python/cpython/issues/101326
self.assertRaises(ValueError, fi.throw, ValueError, None, None)
self.assertRaises(TypeError, fi.throw, list)
def test_future_del_collect(self):