Skip to content

Commit

Permalink
add the test world to the datapackage instead of special casing aroun…
Browse files Browse the repository at this point in the history
…d it
  • Loading branch information
alwaysintreble committed Jun 6, 2024
1 parent ee5d2c4 commit e4adf16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions test/general/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List, Optional, Tuple, Type, Union

from BaseClasses import CollectionState, Item, ItemClassification, Location, MultiWorld, Region
from worlds import network_data_package
from worlds.AutoWorld import World, call_all

gen_steps = ("generate_early", "create_regions", "create_items", "set_rules", "generate_basic", "pre_fill")
Expand Down Expand Up @@ -60,6 +61,10 @@ class TestWorld(World):
hidden = True


# add our test world to the data package, so we can test it later
network_data_package["games"][TestWorld.game] = TestWorld.get_data_package_data()


def generate_test_multiworld(players: int = 1) -> MultiWorld:
"""
Generates a multiworld using a special Test Case World class, and seed of 0.
Expand Down
3 changes: 0 additions & 3 deletions test/general/test_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,4 @@ def test_postgen_datapackage(self):
f"{loc_name} is not a valid item name for location_name_to_id")
self.assertIsInstance(loc_id, int,
f"{loc_id} for {loc_name} should be an int")
# because of test/general/__init__.py:56
if gamename in {"Test Game"}:
continue
self.assertEqual(datapackage["checksum"], network_data_package["games"][gamename]["checksum"])

0 comments on commit e4adf16

Please sign in to comment.