From 3ebb02dfca262be5570790b446144091122b8d4e Mon Sep 17 00:00:00 2001 From: David Dean Date: Mon, 3 Jun 2019 14:52:32 -0500 Subject: [PATCH] Add tox initialization. --- tests/test_stack_yaml.py | 1 - tox.ini | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tox.ini diff --git a/tests/test_stack_yaml.py b/tests/test_stack_yaml.py index 7cface1..e3e002b 100644 --- a/tests/test_stack_yaml.py +++ b/tests/test_stack_yaml.py @@ -1,5 +1,4 @@ import os -import pytest def test_stack_functions(stack_data): diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..b7d9061 --- /dev/null +++ b/tox.ini @@ -0,0 +1,30 @@ +[tox] +minversion = 3.8.6 +envlist = + lint + +[testenv] +basepython = python3.7 +passenv = * +setenv = + PYTHONDONTWRITEBYTECODE=1 +commands_pre = + find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -path '*/__pycache__/*' -path '*/build/*' -name '*.py[c|o]' -delete +whitelist_externals = + find + bash +# Enabling sitepackages is needed if you need to avoid encountering exceptions +# caused by missing selinux python bindinds in ansible modules like template. +# Selinux python bindings are binary and they cannot be installed using pip +# in virtualenvs. Details: https://github.com/ansible/molecule/issues/1724 +sitepackages = false + +[flake8] +max-line-length = 90 +max-complexity = 10 + +[testenv:lint] +deps = flake8>=3.6.0,<4 +commands = flake8 tests +skip_install = true +usedevelop = false