File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 11import asyncio
2- import fcntl
32import logging
43import os
54import random
1110import unittest
1211import weakref
1312
13+
14+ if sys .platform != "win32" :
15+ import fcntl
16+
1417from unittest import mock
1518from uvloop ._testbase import UVTestCase , AIOTestCase
1619
@@ -833,10 +836,11 @@ def test_loop_call_later_handle_cancelled(self):
833836 self .assertFalse (handle .cancelled ())
834837
835838 def test_loop_std_files_cloexec (self ):
836- # See https://github.com/MagicStack/uvloop/issues/40 for details.
837- for fd in {0 , 1 , 2 }:
838- flags = fcntl .fcntl (fd , fcntl .F_GETFD )
839- self .assertFalse (flags & fcntl .FD_CLOEXEC )
839+ if sys .platform != "win32" :
840+ # See https://github.com/MagicStack/uvloop/issues/40 for details.
841+ for fd in {0 , 1 , 2 }:
842+ flags = fcntl .fcntl (fd , fcntl .F_GETFD )
843+ self .assertFalse (flags & fcntl .FD_CLOEXEC )
840844
841845 def test_default_exc_handler_broken (self ):
842846 logger = logging .getLogger ('asyncio' )
Original file line number Diff line number Diff line change 33import subprocess
44import sys
55import time
6+ import unittest
67
78from uvloop import _testbase as tb
89
@@ -348,6 +349,9 @@ async def f(): pass
348349 self .loop .run_until_complete (runner ())
349350
350351 def test_signals_fork_in_thread (self ):
352+ if sys .platform == "win32" and self .NEW_LOOP == "asyncio.new_event_loop()" :
353+ raise unittest .SkipTest ("no add_signal_handler on asyncio loop on Windows" )
354+
351355 # Refs #452, when forked from a thread, the main-thread-only signal
352356 # operations failed thread ID checks because we didn't update
353357 # MAIN_THREAD_ID after fork. It's now a lazy value set when needed and
You can’t perform that action at this time.
0 commit comments