mark failing tests for unittest

This commit is contained in:
Jeong Yunwon
2022-07-16 03:25:31 +09:00
parent 799c78670b
commit c87c8dcb7d
3 changed files with 11 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ def tearDownModule():
asyncio.set_event_loop_policy(None)
@unittest.skip("TODO: RUSTPYTHON; requires sys.get_coroutine_origin_tracking_depth()")
class TestAsyncCase(unittest.TestCase):
maxDiff = None

View File

@@ -220,6 +220,8 @@ class Test_TestResult(unittest.TestCase):
self.assertIs(test_case, test)
self.assertIsInstance(formatted_exc, str)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_addFailure_filter_traceback_frames(self):
class Foo(unittest.TestCase):
def test_1(self):
@@ -246,6 +248,8 @@ class Test_TestResult(unittest.TestCase):
self.assertEqual(len(dropped), 1)
self.assertIn("raise self.failureException(msg)", dropped[0])
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_addFailure_filter_traceback_frames_context(self):
class Foo(unittest.TestCase):
def test_1(self):

View File

@@ -672,6 +672,8 @@ class AsyncIteratorTest(unittest.TestCase):
async def __anext__(self): pass
# TODO: RUSTPYTHON; async for
"""
def test_aiter_set_return_value(self):
mock_iter = AsyncMock(name="tester")
mock_iter.__aiter__.return_value = [1, 2, 3]
@@ -679,6 +681,7 @@ class AsyncIteratorTest(unittest.TestCase):
return [i async for i in mock_iter]
result = run(main())
self.assertEqual(result, [1, 2, 3])
"""
def test_mock_aiter_and_anext_asyncmock(self):
def inner_test(mock_type):
@@ -697,6 +700,8 @@ class AsyncIteratorTest(unittest.TestCase):
inner_test(mock_type)
# TODO: RUSTPYTHON; async for
"""
def test_mock_async_for(self):
async def iterate(iterator):
accumulator = []
@@ -730,7 +735,7 @@ class AsyncIteratorTest(unittest.TestCase):
with self.subTest(f"set return_value iterator with {mock_type}"):
test_set_return_value_iter(mock_type)
"""
class AsyncMockAssert(unittest.TestCase):
def setUp(self):