| 
									
										
										
										
											2023-03-08 21:13:52 -07:00
										 |  |  | from . import MCTestBase | 
					
						
							|  |  |  | from ..Constants import region_info | 
					
						
							| 
									
										
										
										
											2024-08-19 15:58:30 -07:00
										 |  |  | from .. import Options | 
					
						
							| 
									
										
										
										
											2023-03-08 21:13:52 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | from BaseClasses import ItemClassification | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class AdvancementTestBase(MCTestBase): | 
					
						
							|  |  |  |     options = { | 
					
						
							| 
									
										
										
										
											2024-08-19 15:58:30 -07:00
										 |  |  |         "advancement_goal": Options.AdvancementGoal.range_end | 
					
						
							| 
									
										
										
										
											2023-03-08 21:13:52 -07:00
										 |  |  |     } | 
					
						
							|  |  |  |     # beatability test implicit | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ShardTestBase(MCTestBase): | 
					
						
							|  |  |  |     options = { | 
					
						
							| 
									
										
										
										
											2024-08-19 15:58:30 -07:00
										 |  |  |         "egg_shards_required": Options.EggShardsRequired.range_end, | 
					
						
							|  |  |  |         "egg_shards_available": Options.EggShardsAvailable.range_end | 
					
						
							| 
									
										
										
										
											2023-03-08 21:13:52 -07:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # check that itempool is not overfilled with shards | 
					
						
							|  |  |  |     def test_itempool(self): | 
					
						
							|  |  |  |         assert len(self.multiworld.get_unfilled_locations()) == len(self.multiworld.itempool) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CompassTestBase(MCTestBase): | 
					
						
							|  |  |  |     def test_compasses_in_pool(self): | 
					
						
							|  |  |  |         structures = [x[1] for x in region_info["default_connections"]] | 
					
						
							|  |  |  |         itempool_str = {item.name for item in self.multiworld.itempool} | 
					
						
							|  |  |  |         for struct in structures: | 
					
						
							|  |  |  |             assert f"Structure Compass ({struct})" in itempool_str | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class NoBeeTestBase(MCTestBase): | 
					
						
							|  |  |  |     options = { | 
					
						
							| 
									
										
										
										
											2024-08-19 15:58:30 -07:00
										 |  |  |         "bee_traps": Options.BeeTraps.range_start | 
					
						
							| 
									
										
										
										
											2023-03-08 21:13:52 -07:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # With no bees, there are no traps in the pool | 
					
						
							|  |  |  |     def test_bees(self): | 
					
						
							|  |  |  |         for item in self.multiworld.itempool: | 
					
						
							|  |  |  |             assert item.classification != ItemClassification.trap | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class AllBeeTestBase(MCTestBase): | 
					
						
							|  |  |  |     options = { | 
					
						
							| 
									
										
										
										
											2024-08-19 15:58:30 -07:00
										 |  |  |         "bee_traps": Options.BeeTraps.range_end | 
					
						
							| 
									
										
										
										
											2023-03-08 21:13:52 -07:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # With max bees, there are no filler items, only bee traps | 
					
						
							|  |  |  |     def test_bees(self): | 
					
						
							|  |  |  |         for item in self.multiworld.itempool: | 
					
						
							|  |  |  |             assert item.classification != ItemClassification.filler |