monasca-transform/tox.ini

56 lines
1.7 KiB
INI

[tox]
envlist = py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
PYTHONUNBUFFERED=1
VIRTUAL_ENV={envdir}
DISCOVER_DIRECTORY=tests
PYSPARK_HOME=/home/vagrant/pyspark_venv/bin/python
SPARK_HOME=/opt/spark/current
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
psutil==3.0.1
whitelist_externals = bash
find
commands =
find . -type f -name "*.pyc" -delete
nosetests \
tests/unit/builder/test_transform_builder.py \
tests/unit/config/config_initializer_test.py \
tests/unit/driver/first_attempt_at_spark_test.py \
tests/unit/data_driven_specs/test_data_driven_specs.py \
tests/unit/setter/test_set_aggregated_metric_name.py \
tests/unit/setter/test_setter_component.py \
tests/unit/test_json_kafka_offsets.py \
tests/unit/test_mysql_kafka_offsets.py \
tests/unit/usage/test_fetch_quantity_agg.py \
tests/unit/usage/test_fetch_quantity_util_agg.py \
tests/unit/usage/test_host_cpu_usage_component.py \
tests/unit/processor/test_pre_hourly_processor_agg.py \
tests/unit/usage/test_usage_component.py \
tests/unit/usage/test_vm_cpu_allocated_agg.py -e tests_to_fix
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[flake8]
max-complexity = 30
# TODO: ignored checks should be enabled in the future
# H302 import only modules
# H904 Wrap long lines in parentheses instead of a backslash (DEPRECATED)
# H405 Multiline docstring separated by empty line
# E402 module level import not at top of file FIXME remove this
ignore = H302,H904,H405,E402
show-source = True
exclude=.venv,.git,.tox,dist,*egg,build,tests_to_fix