awx/awxkit/tox.ini
Jeff Bradberry 9b6fa55433 Deal with breaking tests for 3.1
- Django's PostgreSQL JSONField wraps values in a JsonAdapter, so deal
  with that when it happens.  This goes away in Django 3.1.
- Setting related *_id fields clears the actual relation field, so
  trying to fake objects for tests is a problem
- Instance.objects.me() was inappropriately creating stub objects
  every time while running tests, but some of our tests now create
  real db objects. Ditch that logic and use a proper fixture where needed.
- awxkit tox.ini was pinned at Python 3.8
2022-03-07 18:11:36 -05:00

46 lines
859 B
INI

[tox]
distshare = {homedir}/.tox/distshare
envlist =
lint,
test
skip_missing_interpreters = true
# recreate = true
# skipsdist = true
[testenv]
basepython = python3.9
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
setenv =
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}:.
deps =
websocket-client
coverage
mock
pytest
pytest-mock
commands = coverage run --parallel --source awxkit -m pytest --doctest-glob='*.md' --junit-xml=report.xml {posargs}
[testenv:lint]
deps =
{[testenv]deps}
flake8
commands =
flake8 awxkit
# pylama --report report.pylama awxkit
# py.test awxkit --pylama --junitxml=report.pylama {posargs}
- coverage erase
[testenv:coveralls]
commands=
- coverage combine
- coverage report -m
- coveralls
[flake8]
max-line-length = 120
[pytest]
addopts = -v --tb=native
junit_family=xunit2