@@ -211,22 +211,33 @@ def test_get_distributions_error_ndk_api_mismatch(
211
211
distribution with the same `name` but different `ndk_api`.
212
212
"""
213
213
expected_dist = Distribution .get_distribution (
214
- self .ctx , name = "test_prj" , recipes = ["python3" , "kivy" ]
214
+ self .ctx ,
215
+ name = "test_prj" ,
216
+ recipes = ["python3" , "kivy" ],
215
217
)
218
+ expected_dist .ndk_api = 22
219
+ expected_dist .android_api = 27
216
220
mock_get_dists .return_value = [expected_dist ]
217
221
mock_glob .return_value = ["sdl2-python3" ]
218
222
219
223
with self .assertRaises (BuildInterruptingException ) as e :
220
224
self .setUp_distribution_with_bootstrap (
221
225
Bootstrap ().get_bootstrap ("sdl2" , self .ctx ),
222
226
allow_replace_dist = False ,
223
- ndk_api = 22 ,
224
227
)
225
228
self .assertEqual (
226
229
e .exception .args [0 ],
227
- "Asked for dist with name test_prj with recipes (python3, kivy)"
228
- " and NDK API 22, but a dist with this name already exists and has"
229
- " either incompatible recipes (python3, kivy) or NDK API 21" ,
230
+ "\n \t Asked for dist with name test_prj and:"
231
+ "\n \t -> recipes: (python3, kivy)"
232
+ "\n \t -> NDK api: (21)"
233
+ "\n \t -> android api (27)"
234
+ "\n \t -> archs (armeabi, armeabi-v7a, x86, x86_64, arm64-v8a)"
235
+ "\n ...but a dist with this name already exists and has either "
236
+ "incompatible:"
237
+ "\n \t -> recipes: (python3, kivy)"
238
+ "\n \t -> NDK api: (22)"
239
+ "\n \t -> android api (27)"
240
+ "\n \t -> archs (armeabi, armeabi-v7a, x86, x86_64, arm64-v8a)" ,
230
241
)
231
242
232
243
def test_get_distributions_error_extra_dist_dirs (self ):
@@ -261,6 +272,9 @@ def test_get_distributions_possible_dists(self, mock_get_dists):
261
272
expected_dist = Distribution .get_distribution (
262
273
self .ctx , name = "test_prj" , recipes = ["python3" , "kivy" ]
263
274
)
275
+ # since we simulate a dist we need to set the recipes in dict format,
276
+ # not not the case for the `Distribution.get_distribution` call
277
+ expected_dist .recipes = {"python3" : "3.7.1" , "kivy" : "1.10.0" }
264
278
mock_get_dists .return_value = [expected_dist ]
265
279
self .setUp_distribution_with_bootstrap (
266
280
Bootstrap ().get_bootstrap ("sdl2" , self .ctx ), name = "test_prj"
0 commit comments