Skip to content

Commit

Permalink
fix: lint issues with test_asyncio_wait.py
Browse files Browse the repository at this point in the history
  • Loading branch information
smoke committed Jun 26, 2024
1 parent 67d1006 commit 3c7766f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ async def main():
self.assertEqual(len(spans), 2)

def test_asyncio_wait_for_with_timeout(self):
ex = None
expected_timeout_error = None

async def main():
nonlocal ex
nonlocal expected_timeout_error
try:
await asyncio.wait_for(async_func(), 0.01)
except asyncio.TimeoutError as e:
ex = e
except asyncio.TimeoutError as timeout_error:
expected_timeout_error = timeout_error

asyncio.run(main())
self.assertNotEqual(ex, None)
self.assertNotEqual(expected_timeout_error, None)

def test_asyncio_as_completed(self):
async def main():
Expand Down

0 comments on commit 3c7766f

Please sign in to comment.