[tox]
envlist = py26, py27, py33, py34, py35, py36, lxml23

[testenv]
commands =
    nosetests stix
    # NOTE: python-stix does not have any doctests
    # sphinx-build -b doctest docs docs/_build/doctest
    sphinx-build -b html docs docs/_build/html
deps =
    -rrequirements.txt

# We call this "lxml23" instead of "rhel6", since RHEL6 ships with LXML 2.2.3.
# python-stix requires at least 2.3.
[testenv:lxml23]
basepython=python2.6
commands =
    nosetests stix
deps =
    # Pin specific versions of LXML and python-dateutil
    lxml==2.3
    python-dateutil==1.4.1
    -rrequirements.txt

[travis]
python =
  2.6: py26, lxml23
  2.7: py27, docs
  3.3: py33
  3.4: py34
  3.5: py35
  3.6: py36

[tox]
envlist = py26, py27, py33, py34, py35, py36, lxml23, no-maec

[testenv]
commands =
    nosetests stix
    # NOTE: python-stix does not have any doctests
    # sphinx-build -b doctest docs docs/_build/doctest
    sphinx-build -b html docs docs/_build/html
deps =
    -rrequirements.txt

# We call this "lxml23" instead of "rhel6", since RHEL6 ships with LXML 2.2.3.
# python-stix requires at least 2.3.
[testenv:lxml23]
basepython=python2.6
commands =
    nosetests stix
deps =
    # Pin specific versions of LXML and python-dateutil
    lxml==2.3
    python-dateutil==1.4.1
    -rrequirements.txt

# Test the behavior when MAEC is not installed in the environment.
[testenv:no-maec]
commands =
    nosetests stix
deps =
    nose==1.3.7
    tox==2.7.0

[travis]
python =
  2.6: py26, lxml23, no-maec
  2.7: py27, docs, no-maec
  3.3: py33, no-maec
  3.4: py34, no-maec
  3.5: py35, no-maec
  3.6: py36, no-maec

Add no-maec test environment to simulate behavior when 'maec' is not present.
Add no-maec test environment to simulate behavior when 'maec' is not present.
