 5e1aa52373
			
		
	
	5e1aa52373
	
	
	
		
			
			* Minecraft: rewrite to modern AP standards * Fix gitignore to not try to ignore the entire minecraft world * minecraft: clean up MC-specific tests * minecraft: use pkgutil instead of open * minecraft: ship as apworld * mc: update region to new api * Increase upper limit on advancement and egg shard goals * mc: reduce egg shard count by 5 for structure compasses * Minecraft: add more tests Ensures data loading works; tests beatability with various options at their max setting; new tests for 1.19 advancements * test improvements * mc: typing and imports cleanup * parens * mc: condense filler item code and override get_filler_item_name
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| from . import MCTestBase
 | |
| from ..Constants import region_info
 | |
| from ..Options import minecraft_options
 | |
| 
 | |
| from BaseClasses import ItemClassification
 | |
| 
 | |
| class AdvancementTestBase(MCTestBase):
 | |
|     options = {
 | |
|         "advancement_goal": minecraft_options["advancement_goal"].range_end
 | |
|     }
 | |
|     # beatability test implicit
 | |
| 
 | |
| class ShardTestBase(MCTestBase):
 | |
|     options = {
 | |
|         "egg_shards_required": minecraft_options["egg_shards_required"].range_end,
 | |
|         "egg_shards_available": minecraft_options["egg_shards_available"].range_end
 | |
|     }
 | |
| 
 | |
|     # 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 = {
 | |
|         "bee_traps": 0
 | |
|     }
 | |
| 
 | |
|     # 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 = {
 | |
|         "bee_traps": 100
 | |
|     }
 | |
| 
 | |
|     # 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
 |