Skip to content

Instantly share code, notes, and snippets.

@xnuinside
Last active December 10, 2018 09:35
Show Gist options
  • Save xnuinside/0a0cccf8321ad736628ec2b8ad166d2b to your computer and use it in GitHub Desktop.
Save xnuinside/0a0cccf8321ad736628ec2b8ad166d2b to your computer and use it in GitHub Desktop.
Tox.ini example for Airflow Project (plugins, dags and etc) tests runner
# example for tox.ini with test mode for airflow turned on
[tox]
envlist = flake8, py27
[testenv]
basepython = python2.7
[testenv:flake8]
deps=
flake8
commands=
flake8 package_name/
flake8 tests/
[testenv:py27]
deps= -r {toxinidir}/test-requirements.txt
setenv = AIRFLOW__CORE__UNIT_TEST_MODE = True
commands=
printenv
python -m unittest discover {toxinidir}/tests/unittests
[flake8]
exclude = package_name/folder_to_exclud
max-line-length = 90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment