@@ -971,8 +971,8 @@ def test_only_main_path(self):
971971
972972 self .prog .load_debug_info ([crashme_path ])
973973
974- # Only the main module should be created.
975- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
974+ # The main module should be created.
975+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
976976 # The provided path should be used for the main module.
977977 self .assertEqual (
978978 self .prog .main_module ().loaded_file_path ,
@@ -1027,8 +1027,8 @@ def test_main_by_path(self):
10271027
10281028 self .prog .load_debug_info ([crashme_path ], main = True )
10291029
1030- # Only the main module should be created.
1031- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1030+ # The main module should be created.
1031+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
10321032 # The provided path should be used for the main module.
10331033 self .assertEqual (
10341034 self .prog .main_module ().loaded_file_path ,
@@ -1053,8 +1053,8 @@ def finder(modules):
10531053
10541054 self .prog .load_debug_info (main = True )
10551055
1056- # Only the main module should be created.
1057- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1056+ # The main module should be created.
1057+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
10581058 # The finder should be called and set the file for the main module.
10591059 self .assertEqual (
10601060 self .prog .main_module ().loaded_file_path ,
@@ -1168,8 +1168,8 @@ def test_main_gnu_debugaltlink_by_path(self):
11681168
11691169 self .prog .load_debug_info ([crashme_dwz_path , crashme_alt_path ], main = True )
11701170
1171- # Only the main module should be created.
1172- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1171+ # The main module should be created.
1172+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
11731173 # The provided paths should be used for the main module.
11741174 self .assertEqual (
11751175 self .prog .main_module ().loaded_file_path ,
@@ -1200,8 +1200,8 @@ def finder(modules):
12001200
12011201 self .prog .load_debug_info (main = True )
12021202
1203- # Only the main module should be created.
1204- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1203+ # The main module should be created.
1204+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
12051205 # The finder should be called and set the files for the main module.
12061206 self .assertEqual (
12071207 self .prog .main_module ().loaded_file_path ,
@@ -1236,8 +1236,8 @@ def finder(modules):
12361236 main = True ,
12371237 )
12381238
1239- # Only the main module should be created.
1240- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1239+ # The main module should be created.
1240+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
12411241 # The provided path should be used for the loaded file.
12421242 self .assertEqual (
12431243 self .prog .main_module ().loaded_file_path ,
@@ -1275,8 +1275,8 @@ def finder(modules):
12751275
12761276 self .assertRaises (MissingDebugInfoError , self .prog .load_debug_info , main = True )
12771277
1278- # Only the main module should be created.
1279- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1278+ # The main module should be created.
1279+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
12801280 # The finder should be called and set the loaded file for the main
12811281 # module but fail to find the supplementary file.
12821282 self .assertEqual (
@@ -1313,8 +1313,8 @@ def finder(modules):
13131313
13141314 self .prog .load_debug_info ([crashme_dwz_path ], main = True )
13151315
1316- # Only the main module should be created.
1317- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1316+ # The main module should be created.
1317+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
13181318 # The provided path should be used for the main module.
13191319 self .assertEqual (
13201320 self .prog .main_module ().loaded_file_path ,
@@ -1381,8 +1381,8 @@ def test_main_wants_gnu_debugaltlink_by_path(self):
13811381
13821382 self .prog .load_debug_info ([crashme_alt_path ], main = True )
13831383
1384- # Only the main module should be created.
1385- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1384+ # The main module should be created.
1385+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
13861386 # The provided path should be used for the supplementary file.
13871387 self .assertEqual (
13881388 self .prog .main_module ().supplementary_debug_file_path ,
@@ -1420,8 +1420,8 @@ def finder(modules):
14201420
14211421 self .prog .load_debug_info (main = True )
14221422
1423- # Only the main module should be created.
1424- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1423+ # The main module should be created.
1424+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
14251425 # The finder should be called and set the supplementary file for the
14261426 # main module.
14271427 self .assertEqual (
@@ -1448,8 +1448,8 @@ def test_main_wants_gnu_debugaltlink_not_found(self):
14481448
14491449 self .assertRaises (MissingDebugInfoError , self .prog .load_debug_info , main = True )
14501450
1451- # Only the main module should be created.
1452- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1451+ # The main module should be created.
1452+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
14531453 # The finder should be called and fail to find the supplementary file
14541454 # for the main module, but the supplementary file should still be
14551455 # wanted.
@@ -1570,8 +1570,8 @@ def finder(modules):
15701570
15711571 self .prog .load_debug_info (main = True )
15721572
1573- # Only the main module should be created.
1574- self .assertEqual ( list ( self .prog .modules ()), [ self .prog .main_module ()] )
1573+ # The main module should be created.
1574+ self .assertIn ( self .prog .main_module (), list ( self .prog .modules ()) )
15751575 # The finder should be called and set the files, address range, and
15761576 # build ID for the main module.
15771577 self .assertEqual (
0 commit comments