Tests: add multiworld seed to fill subtest (#2346)
This commit is contained in:
		
							parent
							
								
									9f126ad0d0
								
							
						
					
					
						commit
						6e6fa13e44
					
				| 
						 | 
					@ -172,7 +172,7 @@ class WorldTestBase(unittest.TestCase):
 | 
				
			||||||
            items = (items,)
 | 
					            items = (items,)
 | 
				
			||||||
        for item in items:
 | 
					        for item in items:
 | 
				
			||||||
            self.multiworld.state.collect(item)
 | 
					            self.multiworld.state.collect(item)
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    def remove_by_name(self, item_names: typing.Union[str, typing.Iterable[str]]) -> typing.List[Item]:
 | 
					    def remove_by_name(self, item_names: typing.Union[str, typing.Iterable[str]]) -> typing.List[Item]:
 | 
				
			||||||
        """Remove all of the items in the item pool with the given names from state"""
 | 
					        """Remove all of the items in the item pool with the given names from state"""
 | 
				
			||||||
        items = self.get_items_by_name(item_names)
 | 
					        items = self.get_items_by_name(item_names)
 | 
				
			||||||
| 
						 | 
					@ -278,7 +278,6 @@ class WorldTestBase(unittest.TestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def testFill(self):
 | 
					    def testFill(self):
 | 
				
			||||||
        """Generates a multiworld and validates placements with the defined options"""
 | 
					        """Generates a multiworld and validates placements with the defined options"""
 | 
				
			||||||
        # don't run this test if accessibility is set manually
 | 
					 | 
				
			||||||
        if not (self.run_default_tests and self.constructed):
 | 
					        if not (self.run_default_tests and self.constructed):
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
        from Fill import distribute_items_restrictive
 | 
					        from Fill import distribute_items_restrictive
 | 
				
			||||||
| 
						 | 
					@ -301,8 +300,8 @@ class WorldTestBase(unittest.TestCase):
 | 
				
			||||||
                        state.collect(location.item, True, location)
 | 
					                        state.collect(location.item, True, location)
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
            return self.multiworld.has_beaten_game(state, 1)
 | 
					            return self.multiworld.has_beaten_game(state, 1)
 | 
				
			||||||
        
 | 
					
 | 
				
			||||||
        with self.subTest("Game", game=self.game):
 | 
					        with self.subTest("Game", game=self.game, seed=self.multiworld.seed):
 | 
				
			||||||
            distribute_items_restrictive(self.multiworld)
 | 
					            distribute_items_restrictive(self.multiworld)
 | 
				
			||||||
            call_all(self.multiworld, "post_fill")
 | 
					            call_all(self.multiworld, "post_fill")
 | 
				
			||||||
            self.assertTrue(fulfills_accessibility(), "Collected all locations, but can't beat the game.")
 | 
					            self.assertTrue(fulfills_accessibility(), "Collected all locations, but can't beat the game.")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue