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