[tox]
envlist = py{27,35,36}-xblock{10,11,12},flake8

[travis]
python =
  2.7: py27-xblock{10,11,12},flake8
  3.5: py35-xblock{10,11,12},flake8
  3.6: py36-xblock{10,11,12},flake8

[flake8]
ignore = E124,W504

[testenv]
deps =
    -rrequirements/setup.txt
    -rrequirements/test.txt
    xblock10: XBlock==1.0.0
    xblock11: XBlock==1.1.1
    xblock12: XBlock==1.2.2
commands =
    py27: python run_tests.py []
    # In Python 3.5, we have an issue with JSON getting binary input
    # where it expects a string. This issue was fixed in Python 3.6:
    #
    # https://docs.python.org/3/whatsnew/3.6.html#json
    #
    # Until we decide to either drop Python 3.5 support or make our
    # use of JSON play nicely with 3.5, run the tests but ignore
    # errors ("- " prefix).
    py35: - python run_tests.py []
    py36: python run_tests.py []

[testenv:flake8]
deps =
    -rrequirements/flake8.txt
commands = flake8

[tox]
envlist = py{27,35,36}-xblock{10,11,12},flake8

[travis]
python =
  2.7: py27-xblock{10,11,12},flake8
  3.5: py35-xblock{10,11,12},flake8
  3.6: py36-xblock{10,11,12},flake8

[flake8]
ignore = E124,W504
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,src

[testenv]
deps =
    -rrequirements/setup.txt
    -rrequirements/test.txt
    xblock10: XBlock==1.0.0
    xblock11: XBlock==1.1.1
    xblock12: XBlock==1.2.2
commands =
    py27: python run_tests.py []
    # In Python 3.5, we have an issue with JSON getting binary input
    # where it expects a string. This issue was fixed in Python 3.6:
    #
    # https://docs.python.org/3/whatsnew/3.6.html#json
    #
    # Until we decide to either drop Python 3.5 support or make our
    # use of JSON play nicely with 3.5, run the tests but ignore
    # errors ("- " prefix).
    py35: - python run_tests.py []
    py36: python run_tests.py []

[testenv:flake8]
deps =
    -rrequirements/flake8.txt
commands = flake8

Add `src` to flake8 exclude list
Add `src` to flake8 exclude list

This avoids flake8 warnings from xblock-utils, over which we have no
control.
