[tox]
envlist = py3, style
basepython = python3

[testenv]
deps =
  pytest
commands =
  python -m pytest
  python dev/whitelist.py
  python win/sampleapp.py
sitepackages = true

[testenv:style]
skipsdist = true
extras = dev_style
commands =
  bash dev/check-style.sh
allowlist_externals =
  bash
sitepackages = false

[testenv:fix-style]
skipsdist = true
extras = dev_style
commands =
  black .
  isort rednotebook/ tests/
  bash -c 'pyupgrade --py36-plus --exit-zero `find rednotebook tests -name "*.py" -not -path "*external*"`'
allowlist_externals =
  bash
sitepackages = false
