diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-10 15:32:38 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-10 15:32:38 -0500 |
commit | 814af30b248db20ceed68e57f7272fe874e471ca (patch) | |
tree | 12da8f35cc210ba959a20bce0b77832a1097930e | |
parent | ac9482d95d48a66c80e2f10bdbf4e6cbef571c36 (diff) | |
download | pytest-runner-814af30b248db20ceed68e57f7272fe874e471ca.tar.gz |
Use itertools.product to produce the cross-product of setuptools versions and args to test.
-rw-r--r-- | tests/test_ptr.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/test_ptr.py b/tests/test_ptr.py index a37b0e3..3148234 100644 --- a/tests/test_ptr.py +++ b/tests/test_ptr.py @@ -7,6 +7,7 @@ import sys import tarfile import textwrap import time +import itertools import pytest @@ -39,16 +40,19 @@ def venv(virtualenv): virtualenv.teardown() -@pytest.mark.parametrize('setuptools_req, test_args', ( - ('setuptools==27.3.0', ''), - ('setuptools==27.3.0', '--extras'), - ('setuptools==32.3.1', ''), - ('setuptools==32.3.1', '--extras'), - ('setuptools==36.3.0', ''), - ('setuptools==36.3.0', '--extras'), - ('setuptools' , ''), - ('setuptools' , '--extras'), -)) +setuptools_reqs = [ + 'setuptools', + 'setuptools==27.3.0', + 'setuptools==32.3.1', + 'setuptools==36.3.0', +] +args_variants = ['', '--extras'] + + +@pytest.mark.parametrize( + 'setuptools_req, test_args', + itertools.product(setuptools_reqs, args_variants), +) def test_egg_fetcher(venv, setuptools_req, test_args): test_args = test_args.split() # Install pytest & pytest-runner. |