diff --git a/.travis.yml b/.travis.yml index 26893daa3a..f24ac149c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,8 @@ services: before_install: - sudo apt-get update -qq - - sudo apt-get install -qq python-tox + - sudo apt-get install -qq python2.7 python3 + - sudo pip install tox>=2.0 env: - COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python2.py apk --sdk-dir /opt/android/android-sdk --ndk-dir /opt/android/android-ndk' diff --git a/tests/test_graph.py b/tests/test_graph.py index fbec5c1cbf..9d1e6147e0 100644 --- a/tests/test_graph.py +++ b/tests/test_graph.py @@ -1,4 +1,3 @@ - from pythonforandroid.build import Context from pythonforandroid.graph import get_recipe_order_and_bootstrap from pythonforandroid.bootstrap import Bootstrap @@ -18,15 +17,13 @@ valid_combinations.extend( [(['python3crystax'], Bootstrap.get_bootstrap('sdl2', ctx)), (['kivy', 'python3crystax'], Bootstrap.get_bootstrap('sdl2', ctx))]) +invalid_combinations = [[['python2', 'python3crystax'], None]] @pytest.mark.parametrize('names,bootstrap', valid_combinations) def test_valid_recipe_order_and_bootstrap(names, bootstrap): get_recipe_order_and_bootstrap(ctx, names, bootstrap) -invalid_combinations = [[['python2', 'python3crystax'], None], - [['python3'], Bootstrap.get_bootstrap('pygame', ctx)]] - @pytest.mark.parametrize('names,bootstrap', invalid_combinations) def test_invalid_recipe_order_and_bootstrap(names, bootstrap): diff --git a/tox.ini b/tox.ini index fa0b1da4a2..c80bf06a4e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,13 @@ [tox] -envlist = pep8 -# no setup.py to be ran -skipsdist = True +envlist = pep8,py27,py3 + +[testenv] +deps = pytest +commands = pytest tests/ [testenv:pep8] deps = flake8 -commands = flake8 pythonforandroid/ +commands = flake8 pythonforandroid/ tests/ [flake8] ignore =