Tests: Handle optional args for get_all_state patch (#5297)
				
					
				
			* Make `use_cache` optional * Pass all kwargs
This commit is contained in:
		| @@ -48,13 +48,14 @@ class TestBase(unittest.TestCase): | ||||
|  | ||||
|                 original_get_all_state = multiworld.get_all_state | ||||
|  | ||||
|                 def patched_get_all_state(use_cache: bool, allow_partial_entrances: bool = False): | ||||
|                 def patched_get_all_state(use_cache: bool | None = None, allow_partial_entrances: bool = False, | ||||
|                                           **kwargs): | ||||
|                     self.assertTrue(allow_partial_entrances, ( | ||||
|                         "Before the connect_entrances step finishes, other worlds might still have partial entrances. " | ||||
|                         "As such, any call to get_all_state must use allow_partial_entrances = True." | ||||
|                     )) | ||||
|  | ||||
|                     return original_get_all_state(use_cache, allow_partial_entrances) | ||||
|                     return original_get_all_state(use_cache, allow_partial_entrances, **kwargs) | ||||
|  | ||||
|                 multiworld.get_all_state = patched_get_all_state | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Duck
					Duck