Skip to content

Commit 6d8636c

Browse files
committed
win: Skip tests that are known not to work on windows
1 parent 80a5ee0 commit 6d8636c

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
@@ -527,6 +527,7 @@ def cancel_make_transport():
527527
test_utils.run_briefly(self.loop)
528528

529529

530+
@tb.skip_windows # XXX tests will have to be fixed later
530531
class Test_UV_Process(_TestProcess, tb.UVTestCase):
531532

532533
def test_process_streams_redirect(self):
@@ -563,14 +564,17 @@ async def test():
563564
self.assertEqual(se.read(), b'err\n')
564565

565566

567+
@tb.skip_windows # Some tests fail under asyncio
566568
class Test_AIO_Process(_TestProcess, tb.AIOTestCase):
567569
pass
568570

569571

572+
@tb.skip_windows # XXX tests will have to be fixed later
570573
class TestAsyncio_UV_Process(_AsyncioTests, tb.UVTestCase):
571574
pass
572575

573576

577+
@tb.skip_windows # Some tests fail under asyncio
574578
class TestAsyncio_AIO_Process(_AsyncioTests, tb.AIOTestCase):
575579
pass
576580

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
@@ -9,6 +9,7 @@
99
from uvloop import _testbase as tb
1010

1111

12+
@tb.skip_windows
1213
class _TestUnix:
1314
def test_create_unix_server_1(self):
1415
CNT = 0 # number of clients that were successful
@@ -453,6 +454,7 @@ class Test_AIO_Unix(_TestUnix, tb.AIOTestCase):
453454
pass
454455

455456

457+
@tb.skip_windows
456458
class _TestSSL(tb.SSLTestCase):
457459

458460
ONLYCERT = tb._cert_fullname(__file__, 'ssl_cert.pem')

uvloop/_testbase.py

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

2122

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

0 commit comments

Comments
 (0)