From bddc534e96618a1ff05df1481c96a72083994388 Mon Sep 17 00:00:00 2001 From: Jordan Speicher Date: Wed, 7 Feb 2018 22:12:44 -0600 Subject: [PATCH] Fixes for python3 --- .travis.yml | 5 ++++- pytest_mp/plugin.py | 4 ++-- setup.py | 3 +++ tox.ini | 1 - 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 448f9e0..16389b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: python -python: 2.7 +python: + - 2.7 + - 3.5 + - 3.6 cache: pip env: diff --git a/pytest_mp/plugin.py b/pytest_mp/plugin.py index ac3c545..279b421 100644 --- a/pytest_mp/plugin.py +++ b/pytest_mp/plugin.py @@ -123,7 +123,7 @@ def get_item_batch_name_and_strategy(item): # In general, multiple mp_group decorations aren't supported. # This is a best effort, since kwargs will be overwritten. - distilled = list(marker_args) + marker_kwargs.values() + distilled = list(marker_args) + list(marker_kwargs.values()) if len(distilled) > 2 \ or (len(distilled) == 2 and 'strategy' not in marker_kwargs and not any([x in distilled for x in ('free', 'isolated_free', 'serial', 'isolated_serial')])): @@ -170,7 +170,7 @@ def batch_tests(session): for test in batches[group]['tests']: total_tests += 1 - print 'There should be {} tests run.'.format(total_tests) + print('There should be {} tests run.'.format(total_tests)) return batches diff --git a/setup.py b/setup.py index cc4e265..501b7b6 100644 --- a/setup.py +++ b/setup.py @@ -42,6 +42,9 @@ def run_tests(self): 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Operating System :: OS Independent', 'License :: OSI Approved :: MIT License'], diff --git a/tox.ini b/tox.ini index f3bfd37..86474a3 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,6 @@ envlist = lint, test [testenv] recreate = True -basepython = python2.7 passenv = PYTHONPATH setenv = PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}:.