Skip to content

Commit b7b01d7

Browse files
committed
Added test for graph resolution
1 parent 50f258c commit b7b01d7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/test_graph.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
from pythonforandroid.build import Context
3+
from pythonforandroid.graph import get_recipe_order_and_bootstrap
4+
from pythonforandroid.bootstrap import Bootstrap
5+
from itertools import product
6+
7+
import pytest
8+
9+
10+
ctx = Context()
11+
12+
name_sets = [['python2'],
13+
['kivy']]
14+
bootstraps = [None,
15+
Bootstrap.get_bootstrap('pygame', ctx),
16+
Bootstrap.get_bootstrap('sdl2', ctx)]
17+
combinations = list(product(name_sets, bootstraps))
18+
combinations.extend(
19+
[(['python3'], Bootstrap.get_bootstrap('sdl2', ctx))])
20+
21+
@pytest.mark.parametrize('names,bootstrap', combinations)
22+
def test_get_recipe_order_and_bootstrap(names, bootstrap):
23+
get_recipe_order_and_bootstrap(ctx, names, bootstrap)
24+
25+
26+
if __name__ == "__main__":
27+
get_recipe_order_and_bootstrap(ctx, ['python2'], None)

0 commit comments

Comments
 (0)