<commit_before><commit_msg>tests: use tox to setup and run tests<commit_after>[tox]
minversion = 1.6
envlist = py2-{unit,feature},integration,pycodestyle
skipsdist = True

[testenv]
basepython =
  {py2-unit,py2-feature,integration,pycodestyle}: python2
  {py3-unit,py3-feature}: python3
# python-rpm isn't available from PyPI so we need to use site-packages
sitepackages = True
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
  VIRTUAL_ENV={envdir}
  VIRTUALENV_NO_DOWNLOAD=1
  EMAIL=<EMAIL>
  PYTHONPATH=.
passenv =
  TERM
  HOME
whitelist_externals =
# for some reason tox complains about behave even though it's listed as dep
  behave
  git

[testenv:py2-unit]
deps = pytest
commands =
  py.test

[testenv:py3-unit]
deps = pytest
commands =
  py.test

[testenv:py2-feature]
deps = behave
commands =
  behave --format=progress

[testenv:py3-feature]
deps = behave
commands =
  behave --format=progress

[testenv:integration]
commands = {toxinidir}/tests/test_findpkg_integration.sh

[testenv:pycodestyle]
deps = pycodestyle
commands = pycodestyle

[pycodestyle]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
ignore = E123,E125,H803
show-source = True
exclude=.venv,.git,.tox,dist,doc,*egg,build

{'fraction_non_alphanumeric': 0.10344827586206896, 'fraction_numerical': 0.02586206896551724, 'mean_word_length': 5.080952380952381, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1382017', 'n_tokens_mistral': 493, 'n_tokens_neox': 459, 'n_words': 116}