@@ -366,9 +366,6 @@ def bootstrap_name(self):
366
366
@mock .patch ("pythonforandroid.bootstraps.webview.open" , create = True )
367
367
@mock .patch ("pythonforandroid.bootstraps.sdl2.open" , create = True )
368
368
@mock .patch ("pythonforandroid.distribution.open" , create = True )
369
- @mock .patch (
370
- "pythonforandroid.python.GuestPythonRecipe.create_python_bundle"
371
- )
372
369
@mock .patch ("pythonforandroid.bootstrap.Bootstrap.strip_libraries" )
373
370
@mock .patch ("pythonforandroid.util.exists" )
374
371
@mock .patch ("pythonforandroid.util.chdir" )
@@ -383,7 +380,6 @@ def test_run_distribute(
383
380
mock_chdir ,
384
381
mock_ensure_dir ,
385
382
mock_strip_libraries ,
386
- mock_create_python_bundle ,
387
383
mock_open_dist_files ,
388
384
mock_open_sdl2_files ,
389
385
mock_open_webview_files ,
@@ -415,6 +411,7 @@ def test_run_distribute(
415
411
416
412
self .ctx .hostpython = "/some/fake/hostpython3"
417
413
self .ctx .python_recipe = Recipe .get_recipe ("python3" , self .ctx )
414
+ self .ctx .python_recipe .create_python_bundle = mock .MagicMock ()
418
415
self .ctx .python_modules = ["requests" ]
419
416
self .ctx .archs = [ArchARMv7_a (self .ctx )]
420
417
@@ -457,7 +454,16 @@ def test_run_distribute(
457
454
mock_chdir .assert_called ()
458
455
mock_listdir .assert_called ()
459
456
mock_strip_libraries .assert_called ()
460
- mock_create_python_bundle .assert_called ()
457
+ expected__python_bundle = os .path .join (
458
+ self .ctx .dist_dir ,
459
+ f"{ self .ctx .bootstrap .distribution .name } __{ self .TEST_ARCH } " ,
460
+ "_python_bundle" ,
461
+ "_python_bundle" ,
462
+ )
463
+ self .assertIn (
464
+ mock .call (expected__python_bundle , self .ctx .archs [0 ]),
465
+ self .ctx .python_recipe .create_python_bundle .call_args_list ,
466
+ )
461
467
462
468
@mock .patch ("pythonforandroid.bootstrap.shprint" )
463
469
@mock .patch ("pythonforandroid.bootstrap.glob.glob" )
0 commit comments