<commit_before>[tox]
envlist = py{2.7,3.4,3.5,3.6,pypy}, pythonlint, npmbuild, node6.x, docs, node, postgres, pythonbuild{2.7, 3.4, 3.5, 3.6}

[testenv]
usedevelop = True
whitelist_externals=
    rm
    make
setenv =
    PYTHONPATH = {toxinidir}
    KOLIBRI_HOME = {envtmpdir}/.kolibri
    DJANGO_SETTINGS_MODULE = kolibri.deployment.default.settings.test
    KOLIBRI_RUN_MODE = tox
basepython =
    pythonbuild2.7: python2.7
    pythonbuild3.4: python3.4
    pythonbuild3.5: python3.5
    pythonbuild3.6: python3.6
    licenses: python2.7
    py2.7: python2.7
    py3.4: python3.4
    py3.5: python3.5
    py3.6: python3.6
    pypy: pypy
    docs: python3.5
    pythonlint: python2.7
    node6.x: python2.7
    npmbuild: python2.7
deps =
    -r{toxinidir}/requirements/test.txt
commands =
    make staticdeps
    # Enable the plugins to ensure the configuration is read without error
    coverage run -p kolibri plugin kolibri.plugins.learn enable
    coverage run -p kolibri plugin kolibri.plugins.management enable
    coverage run -p kolibri start
    coverage run -p kolibri stop
    py.test {posargs:--cov=kolibri --color=no}
    # This is currently disabled because some process seems to be locking
    # the directory:
    # /bin/rm: cannot remove `/home/travis/build/learningequality/kolibri/.tox/py3.5/tmp/.kolibri': Directory not empty
    # rm -rf {env:KOLIBRI_HOME}

[testenv:postgres]
passenv = TOX_ENV<commit_msg>Tox fails if models have changes that are not yet reflected in a migration<commit_after>[tox]
envlist = py{2.7,3.4,3.5,3.6,pypy}, pythonlint, npmbuild, node6.x, docs, node, postgres, pythonbuild{2.7, 3.4, 3.5, 3.6}

[testenv]
usedevelop = True
whitelist_externals=
    rm
    make
    sh
setenv =
    PYTHONPATH = {toxinidir}
    KOLIBRI_HOME = {envtmpdir}/.kolibri
    DJANGO_SETTINGS_MODULE = kolibri.deployment.default.settings.test
    KOLIBRI_RUN_MODE = tox
basepython =
    pythonbuild2.7: python2.7
    pythonbuild3.4: python3.4
    pythonbuild3.5: python3.5
    pythonbuild3.6: python3.6
    licenses: python2.7
    py2.7: python2.7
    py3.4: python3.4
    py3.5: python3.5
    py3.6: python3.6
    pypy: pypy
    docs: python3.5
    pythonlint: python2.7
    node6.x: python2.7
    npmbuild: python2.7
deps =
    -r{toxinidir}/requirements/test.txt
commands =
    make staticdeps
    # Enable the plugins to ensure the configuration is read without error
    coverage run -p kolibri plugin kolibri.plugins.learn enable
    coverage run -p kolibri plugin kolibri.plugins.management enable
    coverage run -p kolibri start
    coverage run -p kolibri stop
    # Test that there are no migrations needed -- on Django 1.11, we can
    # use --check and remove the '!' which likely doesn't work on Windows
    sh -c '! kolibri manage makemigrations --dry-run --exit --noinput'
    # Run the actual tests
    py.test {posargs:--cov=kolibri --color=no}
    # This is currently disabled because some process seems to be locking
    # the directory:
    # /bin/rm: cannot remove `/home/travis/build/learningequality/kolibri/.tox/py3.5/tmp/.kolibri': Directory not empty
    # rm -rf {env:KOLIBRI_HOME}

[testenv:postgres]
passenv = TOX_ENV
{'fraction_non_alphanumeric': 0.10034711265383402, 'fraction_numerical': 0.04007573366992742, 'mean_word_length': 3.1222366710013003, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6968415', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1177, 'n_words': 302}