tests/basics: Split out generator.throw tests that pass multiple args.

The three-argument form of `.throw()` is deprecated since CPython 3.12.  So
split out into separate tests (with .exp files) the parts of the generator
tests that test more than one argument.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-05-27 12:38:55 +10:00
parent 2e852522b1
commit 1a2fdcac0d
6 changed files with 69 additions and 28 deletions

View File

@@ -41,13 +41,3 @@ print(g.throw(GeneratorExit))
g = gen()
print(next(g))
print(g.throw(GeneratorExit()))
# thrown an instance with None as second arg
g = gen()
print(next(g))
print(g.throw(GeneratorExit(), None))
# thrown a class and instance
g = gen()
print(next(g))
print(g.throw(GeneratorExit, GeneratorExit(123)))