 23ea3c0efc
			
		
	
	23ea3c0efc
	
	
	
		
			
			* Core: some low-hanging fruit on the strict type check * bump pyright version * bump pyright version * bump pyright and remove file that's no longer easy
		
			
				
	
	
		
			17 lines
		
	
	
		
			626 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			626 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import unittest
 | |
| 
 | |
| from worlds.AutoWorld import AutoWorldRegister
 | |
| from . import setup_solo_multiworld
 | |
| 
 | |
| 
 | |
| class TestWorldMemory(unittest.TestCase):
 | |
|     def test_leak(self) -> None:
 | |
|         """Tests that worlds don't leak references to MultiWorld or themselves with default options."""
 | |
|         import gc
 | |
|         import weakref
 | |
|         for game_name, world_type in AutoWorldRegister.world_types.items():
 | |
|             with self.subTest("Game", game_name=game_name):
 | |
|                 weak = weakref.ref(setup_solo_multiworld(world_type))
 | |
|                 gc.collect()
 | |
|                 self.assertFalse(weak(), "World leaked a reference")
 |