Skip to content

Commit

Permalink
disable a test since during coverage runs it blows up
Browse files Browse the repository at this point in the history
Summary:
I'm not sure how to fix this one.  The issue is with an error that occurs in asyncio outside of a test. But the test was expected to fail.  We do want to look for asnycio issues that happen after a test otherwise we would never know about weird ways people break the eventloop.

For now lets just disable it.

Also add some nocovers around python version gated code

Reviewed By: itamaro

Differential Revision: D58595923

fbshipit-source-id: 43e54a02b89a4f135d9f85f680392406204b624a
  • Loading branch information
fried authored and facebook-github-bot committed Jun 14, 2024
1 parent ccbfad4 commit 01399f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion later/tests/unittest/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def coro(e: asyncio.Event) -> None:
await event.wait()

@unittest.expectedFailure
async def test_unmanaged_task_done_value(self) -> None:
async def dtest_unmanaged_task_done_value(self) -> None:
async def coro(e: asyncio.Event) -> bool:
e.set()
return False
Expand Down
4 changes: 2 additions & 2 deletions later/unittest/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def _callTestMethod(self, testMethod: Callable[..., None]) -> None:
)
if sys.version_info >= (3, 11): # pragma: nocover
loop = self._asyncioRunner.get_loop()
else:
else: # pragma: nocover
# pyre-fixme[16]: `TestCase` has no attribute `_asyncioTestLoop`.
loop = self._asyncioTestLoop
if not ignore_tasks:
Expand All @@ -217,7 +217,7 @@ def _callTestMethod(self, testMethod: Callable[..., None]) -> None:
# pyre-fixme[16]: `AsyncioTestCase` has no attribute `_callTestMethod`.
super()._callTestMethod(testMethod)

if sys.version_info < (3, 11):
if sys.version_info < (3, 11): # pragma: nocover
# Lets join the queue to insure all the tasks created by this case
# are cleaned up
# pyre-fixme[16]: `TestCase` has no attribute `_asyncioCallsQueue`.
Expand Down

0 comments on commit 01399f7

Please sign in to comment.