mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
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:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user