Make windows job names explicit

try_trip^2
Tyler Goodlet 2020-01-26 22:09:32 -05:00
parent e18fec9b17
commit 7c1bc1fce4
2 changed files with 15 additions and 13 deletions

View File

@ -4,7 +4,7 @@ sudo: required
matrix:
include:
- name: "Windows, Python Latest"
- name: "Windows, Python Latest: multiprocessing"
os: windows
language: sh
python: 3.x # only works on linux
@ -13,7 +13,7 @@ matrix:
- export PATH="/c/Python:/c/Python/Scripts:$PATH"
- python -m pip install --upgrade pip wheel
- name: "Windows, Python 3.7"
- name: "Windows, Python 3.7: multiprocessing"
os: windows
python: 3.7 # only works on linux
language: sh
@ -24,17 +24,17 @@ matrix:
- name: "Python 3.7: multiprocessing"
python: 3.7 # this works for Linux but is ignored on macOS or Windows
env: SPAWN_BACKEND=mp
env: SPAWN_BACKEND="mp"
- name: "Python 3.7: trio-run-in-process"
python: 3.7 # this works for Linux but is ignored on macOS or Windows
env: SPAWN_BACKEND=trio_run_in_process
env: SPAWN_BACKEND="trio_run_in_process"
- name: "Pytron 3.8: multiprocessing"
python: 3.8 # this works for Linux but is ignored on macOS or Windows
env: SPAWN_BACKEND=mp
env: SPAWN_BACKEND="mp"
- name: "Python 3.8: trio-run-in-process"
python: 3.8 # this works for Linux but is ignored on macOS or Windows
env: SPAWN_BACKEND=trio_run_in_process
env: SPAWN_BACKEND="trio_run_in_process"
install:
- cd $TRAVIS_BUILD_DIR
@ -43,4 +43,4 @@ install:
script:
- mypy tractor/ --ignore-missing-imports
- pytest tests/ --no-print-logs --spawn-backend=$SPAWN_BACKEND
- pytest tests/ --no-print-logs --spawn-backend=${SPAWN_BACKEND}

View File

@ -16,7 +16,7 @@ _arb_addr = '127.0.0.1', random.randint(1000, 9999)
def pytest_addoption(parser):
parser.addoption(
"--ll", action="store", dest='loglevel',
default=None, help="logging level to set when testing"
default=None, help="logging level to set when testing"
)
parser.addoption(
@ -29,7 +29,7 @@ def pytest_addoption(parser):
def pytest_configure(config):
backend = config.option.spawn_backend
if plaform.system() == "Windows":
if platform.system() == "Windows":
backend = 'mp'
if backend == 'mp':
@ -59,13 +59,15 @@ def pytest_generate_tests(metafunc):
if spawn_backend == 'mp':
from multiprocessing import get_all_start_methods
methods = get_all_start_methods()
if 'fork' in methods: # fork not available on windows, so check before removing
# XXX: the fork method is in general incompatible with
# trio's global scheduler state
if 'fork' in methods:
# fork not available on windows, so check before
# removing XXX: the fork method is in general
# incompatible with trio's global scheduler state
methods.remove('fork')
elif spawn_backend == 'trio_run_in_process':
if platform.system() == "Windows":
pytest.fail("Only `--spawn-backend=mp` is supported on Windows")
pytest.fail(
"Only `--spawn-backend=mp` is supported on Windows")
methods = ['trio_run_in_process']