Skip to content

Commit

Permalink
win: Skip tests that are known not to work on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Nov 24, 2016
1 parent 4d04920 commit e671939
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def connection_lost(self, exc):
self.done.set_result(None)


@tb.skip_windows
class _BasePipeTest:
def test_read_pipe(self):
proto = MyReadPipeProto(loop=self.loop)
Expand Down
4 changes: 4 additions & 0 deletions tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ def cancel_make_transport():
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_lated_stdio_init(self):
Expand Down Expand Up @@ -626,13 +627,16 @@ async def test():
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
1 change: 1 addition & 0 deletions tests/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
DELAY = 0.1


@tb.skip_windows
class _TestSignal:
NEW_LOOP = None

Expand Down
2 changes: 2 additions & 0 deletions tests/test_unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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
Expand Down Expand Up @@ -418,6 +419,7 @@ class Test_AIO_Unix(_TestUnix, tb.AIOTestCase):
pass


@tb.skip_windows
class _TestSSL(tb.SSLTestCase):

def test_create_unix_server_ssl_1(self):
Expand Down
7 changes: 7 additions & 0 deletions uvloop/_testbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@
import re
import socket
import ssl
import sys
import tempfile
import threading
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))
Expand Down

0 comments on commit e671939

Please sign in to comment.