Skip to content

Commit

Permalink
Use WindowsSelectorEventLoopPolicy to run Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Oct 7, 2023
1 parent 763f5a4 commit fb608a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

class DNSTest(unittest.TestCase):
def setUp(self):
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
self.loop = asyncio.new_event_loop()
self.addCleanup(self.loop.close)
self.resolver = aiodns.DNSResolver(loop=self.loop, timeout=5.0)
Expand Down

0 comments on commit fb608a2

Please sign in to comment.