Skip to content

Commit c57758b

Browse files
committed
Enables unit tests in tox
Unit tests should be also ran in Continous Integration for both Python2 and Python3. Also fixes `invalid_combinations` list as `python3` recipe was removed in a19e884.
1 parent b1f7033 commit c57758b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77

88
before_install:
99
- sudo apt-get update -qq
10-
- sudo apt-get install -qq python-tox
10+
- sudo apt-get install -qq python-tox python2.7 python3
1111

1212
env:
1313
- COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python2.py apk --sdk-dir /opt/android/android-sdk --ndk-dir /opt/android/android-ndk'

tests/test_graph.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
def test_valid_recipe_order_and_bootstrap(names, bootstrap):
2525
get_recipe_order_and_bootstrap(ctx, names, bootstrap)
2626

27-
invalid_combinations = [[['python2', 'python3crystax'], None],
28-
[['python3'], Bootstrap.get_bootstrap('pygame', ctx)]]
27+
invalid_combinations = [[['python2', 'python3crystax'], None],]
2928

3029

3130
@pytest.mark.parametrize('names,bootstrap', invalid_combinations)

tox.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[tox]
2-
envlist = pep8
3-
# no setup.py to be ran
4-
skipsdist = True
2+
envlist = pep8,py27,py3
3+
4+
[testenv]
5+
deps = pytest
6+
commands = pytest tests/
57

68
[testenv:pep8]
79
deps = flake8

0 commit comments

Comments
 (0)