@@ -371,9 +371,6 @@ def bootstrap_name(self):
371
371
@mock .patch ("pythonforandroid.bootstraps.webview.open" , create = True )
372
372
@mock .patch ("pythonforandroid.bootstraps.sdl2.open" , create = True )
373
373
@mock .patch ("pythonforandroid.distribution.open" , create = True )
374
- @mock .patch (
375
- "pythonforandroid.python.GuestPythonRecipe.create_python_bundle"
376
- )
377
374
@mock .patch ("pythonforandroid.bootstrap.Bootstrap.strip_libraries" )
378
375
@mock .patch ("pythonforandroid.util.exists" )
379
376
@mock .patch ("pythonforandroid.util.chdir" )
@@ -388,7 +385,6 @@ def test_run_distribute(
388
385
mock_chdir ,
389
386
mock_ensure_dir ,
390
387
mock_strip_libraries ,
391
- mock_create_python_bundle ,
392
388
mock_open_dist_files ,
393
389
mock_open_sdl2_files ,
394
390
mock_open_webview_files ,
@@ -420,6 +416,7 @@ def test_run_distribute(
420
416
421
417
self .ctx .hostpython = "/some/fake/hostpython3"
422
418
self .ctx .python_recipe = Recipe .get_recipe ("python3" , self .ctx )
419
+ self .ctx .python_recipe .create_python_bundle = mock .MagicMock ()
423
420
self .ctx .python_modules = ["requests" ]
424
421
self .ctx .archs = [ArchARMv7_a (self .ctx )]
425
422
@@ -462,7 +459,16 @@ def test_run_distribute(
462
459
mock_chdir .assert_called ()
463
460
mock_listdir .assert_called ()
464
461
mock_strip_libraries .assert_called ()
465
- mock_create_python_bundle .assert_called ()
462
+ expected__python_bundle = os .path .join (
463
+ self .ctx .dist_dir ,
464
+ f"{ self .ctx .bootstrap .distribution .name } __{ self .TEST_ARCH } " ,
465
+ "_python_bundle" ,
466
+ "_python_bundle" ,
467
+ )
468
+ self .assertIn (
469
+ mock .call (expected__python_bundle , self .ctx .archs [0 ]),
470
+ self .ctx .python_recipe .create_python_bundle .call_args_list ,
471
+ )
466
472
467
473
@mock .patch ("pythonforandroid.bootstrap.shprint" )
468
474
@mock .patch ("pythonforandroid.bootstrap.glob.glob" )
0 commit comments