Skip to content

Commit 63319e1

Browse files
committed
Unblock some tests
1 parent 6bbcba6 commit 63319e1

5 files changed

Lines changed: 102 additions & 108 deletions

File tree

Src/IronPythonTest/Cases/CPythonCasesManifest.ini

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,9 +1173,6 @@ Ignore=true # blocking
11731173
[CPython.test_base64]
11741174
Ignore=true # https://github.com/IronLanguages/ironpython3/issues/1135
11751175

1176-
[CPython.test_baseexception]
1177-
Ignore=true # ModuleNotFoundError
1178-
11791176
[CPython.test_bytes]
11801177
Ignore=true # 5 failures
11811178

@@ -1219,10 +1216,10 @@ Ignore=true # AssertionError: 5 != 4
12191216
Ignore=true # blocked by https://github.com/IronLanguages/ironpython3/issues/98
12201217

12211218
[CPython.test_hashlib]
1222-
Ignore=true # NameError: name 'ModuleNotFoundError' is not defined
1219+
Ignore=true # AttributeError: 'module' object has no attribute 'shake_128'
12231220

12241221
[CPython.test_int]
1225-
Ignore=true # blocked by test_grammar
1222+
Ignore=true # blocked by https://github.com/IronLanguages/ironpython3/issues/105
12261223

12271224
[CPython.test_linecache]
12281225
Ignore=true # two failures
@@ -1284,9 +1281,6 @@ Ignore=true # AssertionError: DeprecationWarning not triggered
12841281
[CPython.test_support]
12851282
Ignore=true # lots of failures
12861283

1287-
[CPython.test_tokenize]
1288-
Ignore=true # blocked by test_grammar
1289-
12901284
[CPython.test_unpack]
12911285
Ignore=true # 4 failures
12921286

@@ -1300,7 +1294,7 @@ Ignore=true # blocking
13001294
Ignore=true # LookupError: unknown encoding: oem
13011295

13021296
[CPython.test_winreg]
1303-
Ignore=true # NameError: name 'REG_QWORD' is not defined
1297+
Ignore=true # 3 failures
13041298

13051299
[CPython.test_winsound]
13061300
Ignore=true # test_keyword_args

Src/IronPythonTest/Cases/IronPythonCasesManifest.ini

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,14 @@ Ignore=true # test_doc
179179
[IronPython.test_builtin_stdlib]
180180
Ignore=true # NameError: name 'ModuleNotFoundError' is not defined / multiple other things
181181

182-
[IronPython.test_bz2_stdlib]
183-
Ignore=true # TypeError: integer argument expected, got 'WindowsPath'
184-
185182
[IronPython.test_codecs_stdlib]
186183
Ignore=true # multiple failures
187184

188185
[IronPython.test_codeccallbacks_stdlib]
189186
Ignore=true # multiple failures
190187

191188
[IronPython.test_complex_stdlib]
192-
Ignore=true # blocked by test_grammar
189+
Ignore=true # 1 failure https://github.com/IronLanguages/ironpython3/issues/105
193190

194191
[IronPython.test_datetime_stdlib]
195192
Ignore=true # multiple failures
@@ -198,7 +195,7 @@ Ignore=true # multiple failures
198195
Ignore=true # blocking
199196

200197
[IronPython.test_float_stdlib]
201-
Ignore=true # blocked by test_grammar
198+
Ignore=true # 2 failures https://github.com/IronLanguages/ironpython3/issues/105
202199

203200
[IronPython.test_functools_stdlib]
204201
Ignore=true # StackOverflowException

Src/StdLib/Lib/test/ann_module.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
Empty lines above are for good reason (testing for correct line numbers)
66
"""
77

8+
__annotations__ = {} # https://github.com/IronLanguages/ironpython3/issues/106
9+
810
from typing import Optional
911

1012
__annotations__[1] = 2

Src/StdLib/Lib/test/test_grammar.py

Lines changed: 71 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,76 +1415,77 @@ def __imatmul__(self, o):
14151415
m @= 42
14161416
self.assertEqual(m.other, 42)
14171417

1418-
def test_async_await(self):
1419-
async def test():
1420-
def sum():
1421-
pass
1422-
if 1:
1423-
await someobj()
1424-
1425-
self.assertEqual(test.__name__, 'test')
1426-
self.assertTrue(bool(test.__code__.co_flags & inspect.CO_COROUTINE))
1427-
1428-
def decorator(func):
1429-
setattr(func, '_marked', True)
1430-
return func
1431-
1432-
@decorator
1433-
async def test2():
1434-
return 22
1435-
self.assertTrue(test2._marked)
1436-
self.assertEqual(test2.__name__, 'test2')
1437-
self.assertTrue(bool(test2.__code__.co_flags & inspect.CO_COROUTINE))
1438-
1439-
def test_async_for(self):
1440-
class Done(Exception): pass
1441-
1442-
class AIter:
1443-
def __aiter__(self):
1444-
return self
1445-
async def __anext__(self):
1446-
raise StopAsyncIteration
1447-
1448-
async def foo():
1449-
async for i in AIter():
1450-
pass
1451-
async for i, j in AIter():
1452-
pass
1453-
async for i in AIter():
1454-
pass
1455-
else:
1456-
pass
1457-
raise Done
1458-
1459-
with self.assertRaises(Done):
1460-
foo().send(None)
1461-
1462-
def test_async_with(self):
1463-
class Done(Exception): pass
1464-
1465-
class manager:
1466-
async def __aenter__(self):
1467-
return (1, 2)
1468-
async def __aexit__(self, *exc):
1469-
return False
1470-
1471-
async def foo():
1472-
async with manager():
1473-
pass
1474-
async with manager() as x:
1475-
pass
1476-
async with manager() as (x, y):
1477-
pass
1478-
async with manager(), manager():
1479-
pass
1480-
async with manager() as x, manager() as y:
1481-
pass
1482-
async with manager() as x, manager():
1483-
pass
1484-
raise Done
1485-
1486-
with self.assertRaises(Done):
1487-
foo().send(None)
1418+
# https://github.com/IronLanguages/ironpython3/issues/1428
1419+
# def test_async_await(self):
1420+
# async def test():
1421+
# def sum():
1422+
# pass
1423+
# if 1:
1424+
# await someobj()
1425+
#
1426+
# self.assertEqual(test.__name__, 'test')
1427+
# self.assertTrue(bool(test.__code__.co_flags & inspect.CO_COROUTINE))
1428+
#
1429+
# def decorator(func):
1430+
# setattr(func, '_marked', True)
1431+
# return func
1432+
#
1433+
# @decorator
1434+
# async def test2():
1435+
# return 22
1436+
# self.assertTrue(test2._marked)
1437+
# self.assertEqual(test2.__name__, 'test2')
1438+
# self.assertTrue(bool(test2.__code__.co_flags & inspect.CO_COROUTINE))
1439+
#
1440+
# def test_async_for(self):
1441+
# class Done(Exception): pass
1442+
#
1443+
# class AIter:
1444+
# def __aiter__(self):
1445+
# return self
1446+
# async def __anext__(self):
1447+
# raise StopAsyncIteration
1448+
#
1449+
# async def foo():
1450+
# async for i in AIter():
1451+
# pass
1452+
# async for i, j in AIter():
1453+
# pass
1454+
# async for i in AIter():
1455+
# pass
1456+
# else:
1457+
# pass
1458+
# raise Done
1459+
#
1460+
# with self.assertRaises(Done):
1461+
# foo().send(None)
1462+
#
1463+
# def test_async_with(self):
1464+
# class Done(Exception): pass
1465+
#
1466+
# class manager:
1467+
# async def __aenter__(self):
1468+
# return (1, 2)
1469+
# async def __aexit__(self, *exc):
1470+
# return False
1471+
#
1472+
# async def foo():
1473+
# async with manager():
1474+
# pass
1475+
# async with manager() as x:
1476+
# pass
1477+
# async with manager() as (x, y):
1478+
# pass
1479+
# async with manager(), manager():
1480+
# pass
1481+
# async with manager() as x, manager() as y:
1482+
# pass
1483+
# async with manager() as x, manager():
1484+
# pass
1485+
# raise Done
1486+
#
1487+
# with self.assertRaises(Done):
1488+
# foo().send(None)
14881489

14891490

14901491
if __name__ == '__main__':

Src/StdLib/Lib/typing.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,30 +1975,30 @@ class AsyncContextManager(Generic[T_co],
19751975
__slots__ = ()
19761976

19771977
__all__.append('AsyncContextManager')
1978-
elif sys.version_info[:2] >= (3, 5):
1979-
exec("""
1980-
class AsyncContextManager(Generic[T_co]):
1981-
__slots__ = ()
1982-
1983-
async def __aenter__(self):
1984-
return self
1985-
1986-
@abc.abstractmethod
1987-
async def __aexit__(self, exc_type, exc_value, traceback):
1988-
return None
1989-
1990-
@classmethod
1991-
def __subclasshook__(cls, C):
1992-
if cls is AsyncContextManager:
1993-
if sys.version_info[:2] >= (3, 6):
1994-
return _collections_abc._check_methods(C, "__aenter__", "__aexit__")
1995-
if (any("__aenter__" in B.__dict__ for B in C.__mro__) and
1996-
any("__aexit__" in B.__dict__ for B in C.__mro__)):
1997-
return True
1998-
return NotImplemented
1999-
2000-
__all__.append('AsyncContextManager')
2001-
""")
1978+
#elif sys.version_info[:2] >= (3, 5):
1979+
# exec("""
1980+
#class AsyncContextManager(Generic[T_co]):
1981+
# __slots__ = ()
1982+
#
1983+
# async def __aenter__(self):
1984+
# return self
1985+
#
1986+
# @abc.abstractmethod
1987+
# async def __aexit__(self, exc_type, exc_value, traceback):
1988+
# return None
1989+
#
1990+
# @classmethod
1991+
# def __subclasshook__(cls, C):
1992+
# if cls is AsyncContextManager:
1993+
# if sys.version_info[:2] >= (3, 6):
1994+
# return _collections_abc._check_methods(C, "__aenter__", "__aexit__")
1995+
# if (any("__aenter__" in B.__dict__ for B in C.__mro__) and
1996+
# any("__aexit__" in B.__dict__ for B in C.__mro__)):
1997+
# return True
1998+
# return NotImplemented
1999+
#
2000+
#__all__.append('AsyncContextManager')
2001+
#""")
20022002

20032003

20042004
class Dict(dict, MutableMapping[KT, VT], extra=dict):

0 commit comments

Comments
 (0)