summaryrefslogtreecommitdiff
path: root/tests/run/generators_py.py
Commit message (Collapse)AuthorAgeFilesLines
* Generator expression and comprehension scope (#4254)da-woods2022-08-081-0/+17
| | | | | | | | Fixes #1159. This should be a simpler way of dealing with the long-standing generator and comprehension scoping issues. Unlike the previous PR it is fairly non-intrusive (i.e. doesn't wrap everything in `ResultRefNodes`) and therefore the changes should be more reasonable. Instead it: * Gives `IteratorNode` a scope (pointed at the outer scope rather than the scope of the generator/comprehension) * Tags each `ExprNode` inside the generator iterator sequence with a number, and uses those tags later to work out what needs to be converted to an argument for the generator. If an `ExprNode` is optimized out then that's fine - one of its children will have been tagged.
* Make a test work in Py3.7 that changed behaviour in Python 3.7 ↵Stefan Behnel2018-08-031-11/+0
| | | | ("generator_stop" future import became active by default).
* Work around test failure in Py2.x.Stefan Behnel2017-08-251-1/+3
|
* Terminate generator in test to avoid having its exception state hang around, ↵Stefan Behnel2017-08-241-0/+3
| | | | which leads to exception leaks in Py3.3 for the pure Python comparison test.
* Improve handling of exception state in coroutines to prevent swallowing ↵Stefan Behnel2017-08-201-11/+26
| | | | | | exceptions of the caller. See #1731.
* remove test that doesn't apply to normal Python (only to the corresponding ↵Stefan Behnel2015-04-261-25/+0
| | | | .pyx test where it remains)
* patch Generator ABC into "collections.abc" when using Cython generators so ↵Stefan Behnel2015-04-241-3/+22
| | | | that foreign code can test for the Generator protocol instead of the generator type
* Py3 test fixStefan Behnel2012-12-091-2/+2
|
* simplify and generalise comprehension/genexpr handling fix for if-const ↵Stefan Behnel2012-12-091-0/+22
| | | | optimisation
* fix refnanny code for del statement inside of generatorsStefan Behnel2012-11-301-0/+12
|
* additional test caseStefan Behnel2012-04-171-0/+15
|
* Close generator before deallocation, resurrection code taken from CPythonVitja Makarov2011-11-151-0/+15
|
* moved yield-in-lambda test to new test file to disable it in Py2.6Stefan Behnel2011-05-291-13/+0
|
* extended test case: coroutine.throw() while handling an exception alreadyStefan Behnel2011-04-281-0/+34
|
* Fix yield inside lambdaVitja Makarov2011-04-171-3/+4
|
* Generators tests are supported with python >=2.6Vitja Makarov2011-04-171-4/+0
|
* added failing exception test for generatorsStefan Behnel2011-04-171-0/+16
|
* copied generators tests into a .py file in order to compare their results ↵Stefan Behnel2011-04-171-0/+288
with CPython --HG-- rename : tests/run/generators.pyx => tests/run/generators_py.py