Skip to content

Commit

Permalink
support mp spawn mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cocolato committed Apr 18, 2024
1 parent a66b339 commit febc303
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"sphinx-rtd-theme>=0.1.9",
"sphinx>=1.3",
"pytest>=6.1.1",
"multiprocess"
] + tornado_requires


Expand Down
11 changes: 8 additions & 3 deletions tests/test_all_protocols_binary_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import time
import traceback
from multiprocessing import Process
from multiprocess import Process

import pytest
import six
Expand All @@ -26,8 +26,8 @@
from thriftpy2.transport import TBufferedTransportFactory, TCyMemoryBuffer


if sys.platform == "win32":
pytest.skip("requires fork", allow_module_level=True)
# if sys.platform == "win32":
# pytest.skip("requires fork", allow_module_level=True)


protocols = [TApacheJSONProtocolFactory,
Expand Down Expand Up @@ -72,6 +72,11 @@ def test(t):
trans_factory = TBufferedTransportFactory

def run_server():
import thriftpy2
test_thrift = thriftpy2.load(
"apache_json_test.thrift",
module_name="test_thrift"
)
server = server_func[0](
test_thrift.TestService,
handler=Handler(),
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ deps =
tornado>=4.0,<6.0
cython
py35,py36,py37,py38,py39,pypy3,coverage: pytest_asyncio
multiprocess

[testenv:flake8]
deps =
Expand Down

0 comments on commit febc303

Please sign in to comment.