Skip to content

Commit 8b215f2

Browse files
committed
win: Skip tests that are known not to work on windows
1 parent 3608c52 commit 8b215f2

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

tests/test_pipes.py

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def connection_lost(self, exc):
6262
self.done.set_result(None)
6363

6464

65+
@tb.skip_windows
6566
class _BasePipeTest:
6667
def test_read_pipe(self):
6768
proto = MyReadPipeProto(loop=self.loop)

tests/test_process.py

+4
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ def cancel_make_transport():
505505
test_utils.run_briefly(self.loop)
506506

507507

508+
@tb.skip_windows # XXX tests will have to be fixed later
508509
class Test_UV_Process(_TestProcess, tb.UVTestCase):
509510

510511
def test_process_lated_stdio_init(self):
@@ -626,13 +627,16 @@ async def test():
626627
self.assertEqual(se.read(), b'err\n')
627628

628629

630+
@tb.skip_windows # Some tests fail under asyncio
629631
class Test_AIO_Process(_TestProcess, tb.AIOTestCase):
630632
pass
631633

632634

635+
@tb.skip_windows # XXX tests will have to be fixed later
633636
class TestAsyncio_UV_Process(_AsyncioTests, tb.UVTestCase):
634637
pass
635638

636639

640+
@tb.skip_windows # Some tests fail under asyncio
637641
class TestAsyncio_AIO_Process(_AsyncioTests, tb.AIOTestCase):
638642
pass

tests/test_signals.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
DELAY = 0.1
1010

1111

12+
@tb.skip_windows
1213
class _TestSignal:
1314
NEW_LOOP = None
1415

tests/test_unix.py

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from uvloop import _testbase as tb
88

99

10+
@tb.skip_windows
1011
class _TestUnix:
1112
def test_create_unix_server_1(self):
1213
CNT = 0 # number of clients that were successful
@@ -418,6 +419,7 @@ class Test_AIO_Unix(_TestUnix, tb.AIOTestCase):
418419
pass
419420

420421

422+
@tb.skip_windows
421423
class _TestSSL(tb.SSLTestCase):
422424

423425
def test_create_unix_server_ssl_1(self):

uvloop/_testbase.py

+7
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,19 @@
1212
import re
1313
import socket
1414
import ssl
15+
import sys
1516
import tempfile
1617
import threading
1718
import unittest
1819
import uvloop
1920

2021

22+
def skip_windows(o):
23+
dec = unittest.skipIf(sys.platform in ('win32', 'cygwin', 'cli'),
24+
'skipped on Windows')
25+
return dec(o)
26+
27+
2128
class MockPattern(str):
2229
def __eq__(self, other):
2330
return bool(re.search(str(self), other, re.S))

0 commit comments

Comments
 (0)