From d67543175f730b3ec1bf39f0faf21b8bb0591f38 Mon Sep 17 00:00:00 2001 From: cocolato Date: Mon, 15 Jul 2024 22:52:04 +0800 Subject: [PATCH] remove skip on windows --- tests/test_http.py | 3 +++ tests/test_multiplexed.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_http.py b/tests/test_http.py index e5ac0e4..a9bc7a2 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -74,6 +74,9 @@ def get_headers(self): @pytest.fixture(scope="module") def server(request): + import thriftpy2 + addressbook = thriftpy2.load(os.path.join(os.path.dirname(__file__), + "addressbook.thrift")) server = make_server(addressbook.AddressBookService, Dispatcher(), host="127.0.0.1", port=6080) ps = multiprocess.Process(target=server.serve) diff --git a/tests/test_multiplexed.py b/tests/test_multiplexed.py index 9d62c59..335a21f 100644 --- a/tests/test_multiplexed.py +++ b/tests/test_multiplexed.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import +import sys import multiprocess import os @@ -77,7 +78,7 @@ def client_two(timeout=3000): socket_timeout=timeout, connect_timeout=timeout, proto_factory=multiplexing_factory) - +@pytest.mark.skipif(sys.platform == "win32", "requires socket.UNIX") def test_multiplexed_server(server): with client_one() as c: assert c.doThingOne() is True