Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mark failing tests for unittest
  • Loading branch information
youknowone committed Jul 17, 2022
commit c87c8dcb7d46377f49f87f243cd9a4c3059d2aed
1 change: 1 addition & 0 deletions Lib/unittest/test/test_async_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions Lib/unittest/test/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def test_1(self):
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):
Expand All @@ -246,6 +248,8 @@ def get_exc_info():
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):
Expand Down
7 changes: 6 additions & 1 deletion Lib/unittest/test/testmock/testasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,13 +672,16 @@ def __aiter__(self): pass

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]
async def main():
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):
Expand All @@ -697,6 +700,8 @@ def inner_test(mock_type):
inner_test(mock_type)


# TODO: RUSTPYTHON; async for
"""
def test_mock_async_for(self):
async def iterate(iterator):
accumulator = []
Expand Down Expand Up @@ -730,7 +735,7 @@ def test_set_return_value_iter(mock_type):

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):
Expand Down