|
19 | 19 | [(['python3crystax'], Bootstrap.get_bootstrap('sdl2', ctx)), |
20 | 20 | (['kivy', 'python3crystax'], Bootstrap.get_bootstrap('sdl2', ctx))]) |
21 | 21 |
|
| 22 | + |
22 | 23 | @pytest.mark.parametrize('names,bootstrap', valid_combinations) |
23 | 24 | def test_valid_recipe_order_and_bootstrap(names, bootstrap): |
24 | 25 | get_recipe_order_and_bootstrap(ctx, names, bootstrap) |
25 | 26 |
|
26 | 27 | invalid_combinations = [[['python2', 'python3crystax'], None], |
27 | 28 | [['python3'], Bootstrap.get_bootstrap('pygame', ctx)]] |
28 | 29 |
|
| 30 | + |
29 | 31 | @pytest.mark.parametrize('names,bootstrap', invalid_combinations) |
30 | 32 | def test_invalid_recipe_order_and_bootstrap(names, bootstrap): |
31 | 33 | with pytest.raises(SystemExit): |
32 | 34 | get_recipe_order_and_bootstrap(ctx, names, bootstrap) |
33 | 35 |
|
| 36 | + |
34 | 37 | def test_bootstrap_dependency_addition(): |
35 | 38 | build_order, python_modules, bs = get_recipe_order_and_bootstrap( |
36 | 39 | ctx, ['kivy'], None) |
37 | 40 | assert (('hostpython2' in build_order) or ('hostpython3' in build_order)) |
38 | 41 |
|
| 42 | + |
| 43 | +def test_bootstrap_dependency_addition2(): |
| 44 | + build_order, python_modules, bs = get_recipe_order_and_bootstrap( |
| 45 | + ctx, ['kivy', 'python2'], None) |
| 46 | + assert 'hostpython2' in build_order |
| 47 | + |
| 48 | + |
39 | 49 | if __name__ == "__main__": |
40 | | - get_recipe_order_and_bootstrap(ctx, ['python3'], Bootstrap.get_bootstrap('sdl2', ctx)) |
| 50 | + get_recipe_order_and_bootstrap(ctx, ['python3'], |
| 51 | + Bootstrap.get_bootstrap('sdl2', ctx)) |
0 commit comments