Skip to content

Commit

Permalink
suppress errors in later
Browse files Browse the repository at this point in the history
Reviewed By: amyreese

Differential Revision: D53099729

fbshipit-source-id: fc3103940dbbdf0c212d5a5f043ca88a147a6ec6
  • Loading branch information
generatedunixname89002005307016 authored and facebook-github-bot committed Jan 26, 2024
1 parent 4247cd6 commit e1bd3d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions 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,7 +218,6 @@ 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 e1bd3d3

Please # to comment.