Skip to content

Commit

Permalink
Update tox.ini file
Browse files Browse the repository at this point in the history
Moves dependencies out to shared test-requirements.txt, except for
pytest-operator, as that patches pytest in ways that take longer to run
and are unnecessary for the unit/lint tests.
  • Loading branch information
knkski committed Nov 8, 2021
1 parent 831b6ca commit 7725cef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
6 changes: 6 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bcrypt<3.3
black==20.8b1
flake8<4.1
juju<2.10
pytest<6.3
pyyaml<6.1
17 changes: 5 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,19 @@ envlist = lint,unit,integration
setenv =
PYTHONPATH={toxinidir}:{toxinidir}/src
PYTHONBREAKPOINT=ipdb.set_trace

[testenv:unit]
deps =
pyyaml
pytest
bcrypt
-r{toxinidir}/requirements.txt
commands = pytest -v --tb native -s {posargs} {toxinidir}/tests/unit
-r{toxinidir}/test-requirements.txt

[testenv:unit]
commands = pytest -vvs {toxinidir}/tests/unit {posargs}

[testenv:integration]
deps =
juju
pytest
pytest-operator
commands = pytest -v --tb native --show-capture=no --log-cli-level=INFO -s {posargs} {toxinidir}/tests/integration
commands = pytest -vvs --log-cli-level=INFO {toxinidir}/tests/integration {posargs}

[testenv:lint]
deps =
black
flake8
commands =
flake8 {toxinidir}/tests {toxinidir}/src
black --check --diff {toxinidir}/tests {toxinidir}/src

0 comments on commit 7725cef

Please sign in to comment.