Skip to content

Commit

Permalink
suppress errors in later
Browse files Browse the repository at this point in the history
Differential Revision: D53151098

fbshipit-source-id: 74da97182dff6cbf5316685756846d0e68e88378
  • Loading branch information
generatedunixname89002005307016 authored and facebook-github-bot committed Jan 27, 2024
1 parent e1bd3d3 commit 9bd1008
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion later/unittest/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ def _callTestMethod(self, testMethod: Callable[..., None]) -> None:
getattr(testMethod, _IGNORE_TASK_LEAKS_ATTR, False),
)
if sys.version_info >= (3, 11): # pragma: nocover
# pyre-fixme[16]: `TestCase` has no attribute `_asyncioRunner`.
loop = self._asyncioRunner.get_loop()
else:
# pyre-fixme[16]: `TestCase` has no attribute `_asyncioTestLoop`.
loop = self._asyncioTestLoop
if not ignore_tasks:
# install our own task factory for monitoring usage
Expand All @@ -218,6 +218,7 @@ def _callTestMethod(self, testMethod: Callable[..., None]) -> None:
if sys.version_info < (3, 11):
# Lets join the queue to insure all the tasks created by this case
# are cleaned up
# pyre-fixme[16]: `TestCase` has no attribute `_asyncioCallsQueue`.
loop.run_until_complete(self._asyncioCallsQueue.join())
left_over_tasks = set(all_tasks(loop)) - set(start_tasks)
for task in list(left_over_tasks):
Expand Down

0 comments on commit 9bd1008

Please sign in to comment.