MCPcopy Index your code
hub / github.com/kivy/python-for-android / test_blacklist

Function test_blacklist

tests/test_graph.py:86–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85
86def test_blacklist():
87 # First, get order without blacklist:
88 build_order, python_modules, bs = get_recipe_order_and_bootstrap(
89 ctx, ["python3", "kivy"], None
90 )
91 # Now, obtain again with blacklist:
92 build_order_2, python_modules_2, bs_2 = get_recipe_order_and_bootstrap(
93 ctx, ["python3", "kivy"], None, blacklist=["libffi"]
94 )
95 assert "libffi" not in build_order_2
96 assert set(build_order_2).union({"libffi"}) == set(build_order)
97
98 # Check that we get a conflict when using webview and kivy combined:
99 wbootstrap = Bootstrap.get_bootstrap('webview', ctx)
100 with pytest.raises(BuildInterruptingException) as e_info:
101 get_recipe_order_and_bootstrap(ctx, ["flask", "kivy"], wbootstrap)
102 assert "conflict" in e_info.value.message.lower()
103
104 # We should no longer get a conflict blacklisting sdl2 and sdl3
105 get_recipe_order_and_bootstrap(
106 ctx, ["flask", "kivy"], wbootstrap, blacklist=["sdl2", "sdl3"]
107 )
108
109
110def test_get_dependency_tuple_list_for_recipe(monkeypatch):

Callers

nothing calls this directly

Calls 2

get_bootstrapMethod · 0.80

Tested by

no test coverage detected