Skip to content

Commit a4a414c

Browse files
authored
Enable test_tokenize (#1166)
1 parent 1e9cffd commit a4a414c

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

Src/IronPython/Runtime/Enumerate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected virtual void Dispose(bool notFinalizing) {
107107
#endregion
108108
}
109109

110-
[PythonType("SentinelIterator")]
110+
[PythonType("callable_iterator")]
111111
public sealed class SentinelIterator : IEnumerator, IEnumerator<object> {
112112
private readonly object _target;
113113
private readonly object _sentinel;
@@ -120,7 +120,7 @@ public SentinelIterator(CodeContext/*!*/ context, object target, object sentinel
120120
_target = target;
121121
_sentinel = sentinel;
122122
_context = context;
123-
_site = CallSite<Func<CallSite, CodeContext, object, object>>.Create(_context.LanguageContext.InvokeOne);
123+
_site = CallSite<Func<CallSite, CodeContext, object, object>>.Create(_context.LanguageContext.InvokeNone);
124124
}
125125

126126
public object __iter__() {

Src/IronPythonTest/Cases/CPythonCasesManifest.ini

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Reason=ImportError: No module named audioop
186186
Ignore=true
187187

188188
[CPython.test_binhex]
189-
Ignore=true
189+
Ignore=true # blocked by https://github.com/IronLanguages/ironpython3/issues/673
190190

191191
[CPython.test_builtin] # IronPython.test_builtin_stdlib
192192
Ignore=true
@@ -518,7 +518,7 @@ Reason=Blocking
518518

519519
[CPython.test_idle]
520520
Ignore=true
521-
Reason=ImportError: No module named _tkinter
521+
Reason=ImportError: No module named '_tkinter'
522522

523523
[CPython.test_imaplib]
524524
Ignore=true
@@ -965,7 +965,7 @@ Ignore=true
965965

966966
[CPython.test_tcl]
967967
Ignore=true
968-
Reason=ImportError: No module named _tkinter
968+
Reason=ImportError: No module named '_tkinter'
969969

970970
[CPython.test_telnetlib]
971971
RunCondition=NOT $(IS_LINUX) # TODO: debug
@@ -1001,9 +1001,6 @@ RunCondition=NOT $(IS_MONO) # TODO: investigate
10011001
Ignore=true
10021002
Reason=ImportError: No module named '_tkinter'
10031003

1004-
[CPython.test_tokenize]
1005-
Ignore=true
1006-
10071004
[CPython.test_tools]
10081005
Ignore=true
10091006

Src/StdLib/Lib/test/test_tokenize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ def test_random_files(self):
12081208
for f in ('buffer', 'builtin', 'fileio', 'inspect', 'os', 'platform', 'sys'):
12091209
testfiles.remove(os.path.join(tempdir, "test_%s.py") % f)
12101210

1211-
if not support.is_resource_enabled("cpu"):
1211+
if not support.is_resource_enabled("cpu") or True: # ironpython: don't process the whole folder since it's slow
12121212
testfiles = random.sample(testfiles, 10)
12131213

12141214
for testfile in testfiles:

0 commit comments

Comments
 (0)