@@ -356,13 +356,13 @@ def bootstrap_name(self):
356
356
@mock .patch ("pythonforandroid.bootstraps.qt.open" , create = True )
357
357
@mock .patch ("pythonforandroid.bootstraps.service_only.open" , create = True )
358
358
@mock .patch ("pythonforandroid.bootstraps.webview.open" , create = True )
359
- @mock .patch ("pythonforandroid.bootstraps.sdl2 .open" , create = True )
359
+ @mock .patch ("pythonforandroid.bootstraps._sdl_common .open" , create = True )
360
360
@mock .patch ("pythonforandroid.distribution.open" , create = True )
361
361
@mock .patch ("pythonforandroid.bootstrap.Bootstrap.strip_libraries" )
362
362
@mock .patch ("pythonforandroid.util.exists" )
363
363
@mock .patch ("pythonforandroid.util.chdir" )
364
364
@mock .patch ("pythonforandroid.bootstrap.listdir" )
365
- @mock .patch ("pythonforandroid.bootstraps.sdl2 .rmdir" )
365
+ @mock .patch ("pythonforandroid.bootstraps._sdl_common .rmdir" )
366
366
@mock .patch ("pythonforandroid.bootstraps.service_only.rmdir" )
367
367
@mock .patch ("pythonforandroid.bootstraps.webview.rmdir" )
368
368
@mock .patch ("pythonforandroid.bootstrap.sh.cp" )
@@ -377,7 +377,7 @@ def test_assemble_distribution(
377
377
mock_ensure_dir ,
378
378
mock_strip_libraries ,
379
379
mock_open_dist_files ,
380
- mock_open_sdl2_files ,
380
+ mock_open_sdl_files ,
381
381
mock_open_webview_files ,
382
382
mock_open_service_only_files ,
383
383
mock_open_qt_files
@@ -418,7 +418,8 @@ def test_assemble_distribution(
418
418
419
419
mock_open_dist_files .assert_called_once_with ("dist_info.json" , "w" )
420
420
mock_open_bootstraps = {
421
- "sdl2" : mock_open_sdl2_files ,
421
+ "sdl2" : mock_open_sdl_files ,
422
+ "sdl3" : mock_open_sdl_files ,
422
423
"webview" : mock_open_webview_files ,
423
424
"service_only" : mock_open_service_only_files ,
424
425
"qt" : mock_open_qt_files
@@ -428,6 +429,10 @@ def test_assemble_distribution(
428
429
mock .call ("local.properties" , "w" ),
429
430
mock .call ("blacklist.txt" , "a" ),
430
431
],
432
+ "sdl3" : [
433
+ mock .call ("local.properties" , "w" ),
434
+ mock .call ("blacklist.txt" , "a" ),
435
+ ],
431
436
"webview" : [mock .call ("local.properties" , "w" )],
432
437
"service_only" : [mock .call ("local.properties" , "w" )],
433
438
"qt" : [mock .call ("local.properties" , "w" )]
@@ -441,7 +446,7 @@ def test_assemble_distribution(
441
446
mock .call ().__enter__ ().write ("sdk.dir=/opt/android/android-sdk" ),
442
447
mock_open_bs .mock_calls ,
443
448
)
444
- if self .bootstrap_name == "sdl2" :
449
+ if self .bootstrap_name in [ "sdl2" , "sdl3" ] :
445
450
self .assertIn (
446
451
mock .call ()
447
452
.__enter__ ()
@@ -624,6 +629,18 @@ def bootstrap_name(self):
624
629
return "sdl2"
625
630
626
631
632
+ class TestBootstrapSdl3 (GenericBootstrapTest , unittest .TestCase ):
633
+ """
634
+ An inherited class of `GenericBootstrapTest` and `unittest.TestCase` which
635
+ will be used to perform tests for
636
+ :class:`~pythonforandroid.bootstraps.sdl3.BootstrapSdl3`.
637
+ """
638
+
639
+ @property
640
+ def bootstrap_name (self ):
641
+ return "sdl3"
642
+
643
+
627
644
class TestBootstrapServiceOnly (GenericBootstrapTest , unittest .TestCase ):
628
645
"""
629
646
An inherited class of `GenericBootstrapTest` and `unittest.TestCase` which
0 commit comments