Visitar URL original
Enable test_listcomp and test_setcomp · IronLanguages/ironpython3@3db4865 · GitHub
Skip to content

Commit 3db4865

Browse files
committed
Enable test_listcomp and test_setcomp
1 parent 5dbed9f commit 3db4865

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

‎Src/IronPython/Compiler/Ast/Comprehension.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ internal override bool ExposesLocalVariable(PythonVariable variable) {
239239

240240
internal override bool TryBindOuter(ScopeStatement from, PythonReference reference, out PythonVariable variable) {
241241
ContainsNestedFreeVariables = true;
242-
if (TryGetVariable(reference.Name, out variable) && variable.Kind != VariableKind.Nonlocal) {
242+
if (TryGetVariable(reference.Name, out variable)) {
243+
Debug.Assert(variable.Kind != VariableKind.Nonlocal, "there should be no nonlocals in a comprehension");
243244
variable.AccessedInNestedScope = true;
244245

245246
if (variable.Kind == VariableKind.Local || variable.Kind == VariableKind.Parameter) {

‎Src/IronPythonTest/Cases/CPythonCasesManifest.ini‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,6 @@ Ignore=true
570570
IsolationLevel=ENGINE
571571
MaxRecursion=100
572572

573-
[CPython.test_listcomps]
574-
Ignore=true
575-
576573
[CPython.test_locale]
577574
Ignore=true
578575

@@ -831,9 +828,6 @@ Ignore=true
831828
RunCondition=NOT $(IS_MONO) # weakref failures; https://github.com/IronLanguages/ironpython3/issues/544
832829
IsolationLevel=PROCESS # Also weakref failures; https://github.com/IronLanguages/ironpython3/issues/489
833830

834-
[CPython.test_setcomps]
835-
Ignore=true
836-
837831
[CPython.test_shelve]
838832
NotParallelSafe=true
839833

0 commit comments

Comments
 (0)