diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..2fa1884 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,592 @@ +# !!! WARNING !!! +# This file is automatically generated by ../rebuild-circleci-yaml +# !!! WARNING !!! +version: 2.1 + +jobs: + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py27-nose: + docker: + - image: circleci/python:2.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py27-nose + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py27-nose2: + docker: + - image: circleci/python:2.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py27-nose2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py27-pytest2: + docker: + - image: circleci/python:2.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py27-pytest2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py27-pytest3: + docker: + - image: circleci/python:2.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py27-pytest3 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py27-unit: + docker: + - image: circleci/python:2.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py27-unit + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py27-unit2: + docker: + - image: circleci/python:2.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py27-unit2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py35-nose: + docker: + - image: circleci/python:3.5 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py35-nose + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py35-nose2: + docker: + - image: circleci/python:3.5 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py35-nose2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py35-pytest2: + docker: + - image: circleci/python:3.5 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py35-pytest2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py35-pytest3: + docker: + - image: circleci/python:3.5 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py35-pytest3 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py35-unit: + docker: + - image: circleci/python:3.5 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py35-unit + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py35-unit2: + docker: + - image: circleci/python:3.5 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py35-unit2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py36-nose: + docker: + - image: circleci/python:3.6 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py36-nose + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py36-nose2: + docker: + - image: circleci/python:3.6 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py36-nose2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py36-pytest2: + docker: + - image: circleci/python:3.6 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py36-pytest2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py36-pytest3: + docker: + - image: circleci/python:3.6 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py36-pytest3 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py36-unit: + docker: + - image: circleci/python:3.6 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py36-unit + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py36-unit2: + docker: + - image: circleci/python:3.6 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py36-unit2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-pypy-nose: + docker: + - image: pypy:2 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e pypy-nose + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-pypy-nose2: + docker: + - image: pypy:2 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e pypy-nose2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-pypy-pytest2: + docker: + - image: pypy:2 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e pypy-pytest2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-pypy-pytest3: + docker: + - image: pypy:2 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e pypy-pytest3 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-pypy-unit: + docker: + - image: pypy:2 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e pypy-unit + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-pypy-unit2: + docker: + - image: pypy:2 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e pypy-unit2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py37-nose: + docker: + - image: circleci/python:3.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py37-nose + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py37-nose2: + docker: + - image: circleci/python:3.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py37-nose2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py37-pytest3: + docker: + - image: circleci/python:3.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py37-pytest3 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py37-unit: + docker: + - image: circleci/python:3.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py37-unit + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py37-unit2: + docker: + - image: circleci/python:3.7 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py37-unit2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py38-nose: + docker: + - image: circleci/python:3.8 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py38-nose + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py38-nose2: + docker: + - image: circleci/python:3.8 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py38-nose2 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py38-pytest3: + docker: + - image: circleci/python:3.8 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py38-pytest3 + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py38-unit: + docker: + - image: circleci/python:3.8 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py38-unit + + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-py38-unit2: + docker: + - image: circleci/python:3.8 + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e py38-unit2 + + +workflows: + main: + jobs: + - test-py27-nose + - test-py27-nose2 + - test-py27-pytest2 + - test-py27-pytest3 + - test-py27-unit + - test-py27-unit2 + - test-py35-nose + - test-py35-nose2 + - test-py35-pytest2 + - test-py35-pytest3 + - test-py35-unit + - test-py35-unit2 + - test-py36-nose + - test-py36-nose2 + - test-py36-pytest2 + - test-py36-pytest3 + - test-py36-unit + - test-py36-unit2 + - test-pypy-nose + - test-pypy-nose2 + - test-pypy-pytest2 + - test-pypy-pytest3 + - test-pypy-unit + - test-pypy-unit2 + - test-py37-nose + - test-py37-nose2 + - test-py37-pytest3 + - test-py37-unit + - test-py37-unit2 + - test-py38-nose + - test-py38-nose2 + - test-py38-pytest3 + - test-py38-unit + - test-py38-unit2 + # !!! WARNING !!! +# This file is automatically generated by ../rebuild-circleci-yaml +# !!! WARNING !!! \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 025e9b3..e69de29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,71 +0,0 @@ -# !!! WARNING !!! -# This file is automatically generated by ./rebuild-travis-yaml -# !!! WARNING !!! -language: python -sudo: false -matrix: - include: - - env: "TOXENV=py27-nose" - python: "2.7" - - env: "TOXENV=py27-nose2" - python: "2.7" - - env: "TOXENV=py27-pytest2" - python: "2.7" - - env: "TOXENV=py27-pytest3" - python: "2.7" - - env: "TOXENV=py27-unit" - python: "2.7" - - env: "TOXENV=py27-unit2" - python: "2.7" - - env: "TOXENV=py35-nose" - python: "3.5" - - env: "TOXENV=py35-nose2" - python: "3.5" - - env: "TOXENV=py35-pytest2" - python: "3.5" - - env: "TOXENV=py35-pytest3" - python: "3.5" - - env: "TOXENV=py35-unit" - python: "3.5" - - env: "TOXENV=py35-unit2" - python: "3.5" - - env: "TOXENV=py36-nose" - python: "3.6" - - env: "TOXENV=py36-nose2" - python: "3.6" - - env: "TOXENV=py36-pytest2" - python: "3.6" - - env: "TOXENV=py36-pytest3" - python: "3.6" - - env: "TOXENV=py36-unit" - python: "3.6" - - env: "TOXENV=py36-unit2" - python: "3.6" - - env: "TOXENV=pypy-nose" - python: "pypy" - - env: "TOXENV=pypy-nose2" - python: "pypy" - - env: "TOXENV=pypy-pytest2" - python: "pypy" - - env: "TOXENV=pypy-pytest3" - python: "pypy" - - env: "TOXENV=pypy-unit" - python: "pypy" - - env: "TOXENV=pypy-unit2" - python: "pypy" - - env: "TOXENV=py37-nose" - python: "3.7" - - env: "TOXENV=py37-nose2" - python: "3.7" - - env: "TOXENV=py37-pytest3" - python: "3.7" - - env: "TOXENV=py37-unit" - python: "3.7" - - env: "TOXENV=py37-unit2" - python: "3.7" - -install: pip install tox==3.7.0 -script: tox -# !!! WARNING !!! -# This file is automatically generated by ./rebuild-travis-yaml -# !!! WARNING !!! diff --git a/README.rst b/README.rst index 8ec1e09..5165bf6 100644 --- a/README.rst +++ b/README.rst @@ -1,15 +1,14 @@ Parameterized testing with any Python test framework ==================================================== -|pypi| |travis| - -.. |pypi| image:: https://img.shields.io/pypi/v/parameterized.svg +.. image:: https://img.shields.io/pypi/v/parameterized.svg :alt: PyPI :target: https://pypi.org/project/parameterized/ -.. |travis| image:: https://travis-ci.org/wolever/parameterized.svg?branch=master - :alt: Travis CI - :target: https://travis-ci.org/wolever/parameterized +.. image:: https://circleci.com/gh/wolever/parameterized.svg?style=svg + :alt: Circle CI + :target: https://circleci.com/gh/wolever/parameterized + Parameterized testing in Python sucks. diff --git a/rebuild-circleci-yaml b/rebuild-circleci-yaml new file mode 100755 index 0000000..e470c9c --- /dev/null +++ b/rebuild-circleci-yaml @@ -0,0 +1,76 @@ +#!/usr/bin/env python + +""" +Rebuilds the .circleci/config.yml file based on the output of ``tox --listenvs`` +""" + +import jinja2 +import subprocess as sp + +template = jinja2.Template("""\ +# !!! WARNING !!! +# This file is automatically generated by ../rebuild-circleci-yaml +# !!! WARNING !!! +version: 2.1 + +jobs: + {% for (tox_env, python_ver) in env_list: %} + # !!! WARNING !!! + # This file is automatically generated by ../rebuild-circleci-yaml + # !!! WARNING !!! + + test-{{ tox_env }}: + docker: + {% if python_ver == "pypy" -%} + - image: pypy:2 + {%- else -%} + - image: circleci/python:{{ python_ver }} + {%- endif %} + steps: + - checkout + - run: + name: install tox + command: pip install tox==3.7.0 + - run: + name: run tests + command: tox -e {{ tox_env }} + {% endfor %} + +workflows: + main: + jobs: + {% for (tox_env, _) in env_list: -%} + - test-{{ tox_env }} + {% endfor -%} + +# !!! WARNING !!! +# This file is automatically generated by ../rebuild-circleci-yaml +# !!! WARNING !!! +""") + +# Maps tox python versions (ex, "py27") to Travis Python versions (ex, "2.7") +py_version_map = { + "py26": "2.6", + "py27": "2.7", + "py35": "3.5", + "py36": "3.6", + "py37": "3.7", + "py38": "3.8", + "pypy": "pypy", +} + +def main(): + env_list_str = sp.check_output("tox --listenvs", shell=True).splitlines() + env_list = [] + for env in env_list_str: + if not env.strip(): + continue + py_ver, _, _ = env.partition("-") + env_list.append((env, py_version_map[py_ver])) + + with open(".circleci/config.yml", "w") as f: + f.write(template.render(env_list=env_list)) + + +if __name__ == "__main__": + main() diff --git a/rebuild-travis-yaml b/rebuild-travis-yaml deleted file mode 100755 index 8dc971a..0000000 --- a/rebuild-travis-yaml +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python - -""" -Rebuilds the .travis.yml file based on the output of ``tox --listenvs`` -""" - -import subprocess as sp - -template = """\ -# !!! WARNING !!! -# This file is automatically generated by ./rebuild-travis-yaml -# !!! WARNING !!! -language: python -sudo: false -matrix: - include: -{env_list} -install: pip install tox==3.7.0 -script: tox -# !!! WARNING !!! -# This file is automatically generated by ./rebuild-travis-yaml -# !!! WARNING !!! -""" - -# Maps tox python versions (ex, "py27") to Travis Python versions (ex, "2.7") -py_version_map = { - "py26": "2.6", - "py27": "2.7", - "py35": "3.5", - "py36": "3.6", - "py37": "3.7", - "py38": "3.8", - "pypy": "pypy", -} - -def main(): - tox_envs = sp.check_output("tox --listenvs", shell=True).splitlines() - env_list = [] - for env in tox_envs: - if not env.strip(): - continue - py_ver, _, _ = env.partition("-") - env_list.append("""\ - - env: "TOXENV=%s" - python: "%s" -""" %(env, py_version_map[py_ver])) - - with open(".travis.yml", "w") as f: - f.write(template.format(env_list="".join(env_list))) - - -if __name__ == "__main__": - main() diff --git a/setup.py b/setup.py index b869182..b7e66c0 100644 --- a/setup.py +++ b/setup.py @@ -26,5 +26,10 @@ 'License :: OSI Approved :: BSD License', ], packages=find_packages(), + extras_require={ + 'dev': [ + 'jinja2', + ] + }, long_description=long_description, )