win: Skip tests that are known not to work on windows

This commit is contained in:
Yury Selivanov 2016-11-23 19:32:24 -05:00
parent 80a5ee00ef
commit 6d8636cbe8
5 changed files with 15 additions and 0 deletions

View File

@ -62,6 +62,7 @@ class MyWritePipeProto(asyncio.BaseProtocol):
self.done.set_result(None)
@tb.skip_windows
class _BasePipeTest:
def test_read_pipe(self):
proto = MyReadPipeProto(loop=self.loop)

View File

@ -527,6 +527,7 @@ class _AsyncioTests:
test_utils.run_briefly(self.loop)
@tb.skip_windows # XXX tests will have to be fixed later
class Test_UV_Process(_TestProcess, tb.UVTestCase):
def test_process_streams_redirect(self):
@ -563,14 +564,17 @@ print('err', file=sys.stderr, flush=True)
self.assertEqual(se.read(), b'err\n')
@tb.skip_windows # Some tests fail under asyncio
class Test_AIO_Process(_TestProcess, tb.AIOTestCase):
pass
@tb.skip_windows # XXX tests will have to be fixed later
class TestAsyncio_UV_Process(_AsyncioTests, tb.UVTestCase):
pass
@tb.skip_windows # Some tests fail under asyncio
class TestAsyncio_AIO_Process(_AsyncioTests, tb.AIOTestCase):
pass

View File

@ -9,6 +9,7 @@ from uvloop import _testbase as tb
DELAY = 0.1
@tb.skip_windows
class _TestSignal:
NEW_LOOP = None

View File

@ -9,6 +9,7 @@ import unittest
from uvloop import _testbase as tb
@tb.skip_windows
class _TestUnix:
def test_create_unix_server_1(self):
CNT = 0 # number of clients that were successful
@ -453,6 +454,7 @@ class Test_AIO_Unix(_TestUnix, tb.AIOTestCase):
pass
@tb.skip_windows
class _TestSSL(tb.SSLTestCase):
ONLYCERT = tb._cert_fullname(__file__, 'ssl_cert.pem')

View File

@ -12,6 +12,7 @@ import re
import select
import socket
import ssl
import sys
import tempfile
import threading
import time
@ -19,6 +20,12 @@ import unittest
import uvloop
def skip_windows(o):
dec = unittest.skipIf(sys.platform in ('win32', 'cygwin', 'cli'),
'skipped on Windows')
return dec(o)
class MockPattern(str):
def __eq__(self, other):
return bool(re.search(str(self), other, re.S))