Skip to content

Commit bfbf04e

Browse files
authored
bpo-32296: Unbreak tests on Windows (#4850)
1 parent 11a247d commit bfbf04e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Lib/test/test_asyncio/test_events.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,13 +2735,16 @@ def setUp(self):
27352735
self.loop = asyncio.new_event_loop()
27362736
asyncio.set_event_loop(self.loop)
27372737

2738-
watcher = asyncio.SafeChildWatcher()
2739-
watcher.attach_loop(self.loop)
2740-
asyncio.set_child_watcher(watcher)
2738+
if sys.platform != 'win32':
2739+
watcher = asyncio.SafeChildWatcher()
2740+
watcher.attach_loop(self.loop)
2741+
asyncio.set_child_watcher(watcher)
27412742

27422743
def tearDown(self):
27432744
try:
2744-
asyncio.set_child_watcher(None)
2745+
if sys.platform != 'win32':
2746+
asyncio.set_child_watcher(None)
2747+
27452748
super().tearDown()
27462749
finally:
27472750
self.loop.close()

0 commit comments

Comments
 (0)