[tox]
envlist =
    py26,py27,cover,docs,lint

[testenv]
commands =
    nosetests
deps =
    nose
    unittest2

[testenv:cover]
basepython =
    python2.7
commands =
    nosetests --with-xunit --with-xcoverage --cover-package=gcloud \
        --nocapture --cover-erase --cover-tests --cover-branches
deps =
    nose
    unittest2
    coverage
    nosexcover

[testenv:docs]
basepython =
    python2.7
commands =
    sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html
deps =
    Sphinx

[pep8]
exclude = gcloud/datastore/datastore_v1_pb2.py,docs/conf.py,*.egg/,.*/
verbose = 1

[testenv:lint]
basepython =
    python2.7
commands =
    pep8
    python run_pylint.py
deps =
    pep8
    pylint
    unittest2

[testenv:regression]
basepython =
    python2.7
commands =
    python regression/run_regression.py --package datastore
deps =
    unittest2

[tox]
envlist =
    py26,py27,cover,docs,lint

[testenv:py26]
commands =
    nosetests
deps =
    nose
    unittest2
    protobuf==2.6.0

[testenv]
commands =
    nosetests
deps =
    nose
    unittest2

[testenv:cover]
basepython =
    python2.7
commands =
    nosetests --with-xunit --with-xcoverage --cover-package=gcloud \
        --nocapture --cover-erase --cover-tests --cover-branches
deps =
    nose
    unittest2
    coverage
    nosexcover

[testenv:docs]
basepython =
    python2.7
commands =
    sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html
deps =
    Sphinx

[pep8]
exclude = gcloud/datastore/datastore_v1_pb2.py,docs/conf.py,*.egg/,.*/
verbose = 1

[testenv:lint]
basepython =
    python2.7
commands =
    pep8
    python run_pylint.py
deps =
    pep8
    pylint
    unittest2

[testenv:regression]
basepython =
    python2.7
commands =
    python regression/run_regression.py --package datastore
deps =
    unittest2

Work around protobuf 2.6.1 install failure on Python 2.6.x.
Work around protobuf 2.6.1 install failure on Python 2.6.x.
