[tox]
envlist = py36, tavern, tavern-benchmark
skipsdist = true

[testenv]
setenv = 
  PYTHONPATH = {toxinidir}/tests/tests_api/scripts/:{env:PYTHONPATH:}

passenv =
  HIVEMIND_ADDRESS
  HIVEMIND_PORT
  PYTHONPATH
  TAVERN_DIR

changedir = {env:TAVERN_DIR}

deps = 
  pytest
  pytest-cov
  pytest-pylint
  pytest-asyncio
  pytest-console-scripts
  pytest-parallel
  git-pylint-commit-hook
  pep8
  yapf
  tavern
  deepdiff[murmur]
  jsondiff

commands = pytest {posargs}

[testenv:tavern]
setenv =
  PYTHONPATH = {toxinidir}/tests/tests_api/scripts/:{env:PYTHONPATH:}

passenv =
  HIVEMIND_ADDRESS
  HIVEMIND_PORT
  TAVERN_DIR
  PYTHONPATH

changedir = {env:TAVERN_DIR}

deps =
  {[testenv]deps}
  pytest-parallel
  tavern
  deepdiff[murmur]
  jsondiff

commands = pytest {posargs}

[testenv:tavern-benchmark]
setenv =
  {[testenv:tavern]setenv}

passenv =
  {[testenv:tavern]passenv}
  TAVERN_DISABLE_COMPARATOR
  HIVEMIND_BENCHMARKS_IDS_FILE

changedir = {env:TAVERN_DIR}

deps =
  {[testenv:tavern]deps}
  git+https://gitlab.syncad.com/dkedzierski/tavern_time_request.git@dk-save-request-data#egg=tavern-time-request

commands = pytest --tavern-http-backend time_request {posargs}

