Stardew Valley: Cut tests by 3 minutes (#2375)

* Stardew Valley: Test: unify mods

* Stardew Valley: Test: don't use SVTestBase where setUp is unused

* Stardew Valley: Test: remove duplicate backpack test

* Stardew Valley: Test: remove 2,3,4 heart tests

assume the math is correct with just 2 points on the curve

* Stardew Valley: Test: reduce duplicate test/gen runs

* Stardew Valley: Test: Change 'long' tests to not use TestBase

TestBase' setUp is not being used in the changed TestCases

* Stardew Valley: Test: Use subtests and inheritance for backpacks

* Stardew Valley: Test: add flag to skip some of the extensive tests by default
This commit is contained in:
black-sliver
2023-10-28 00:18:33 +02:00
committed by GitHub
parent c470849cee
commit e3112e5d51
13 changed files with 200 additions and 195 deletions

View File

@@ -6,12 +6,12 @@ import random
from typing import Set
from BaseClasses import ItemClassification, MultiWorld
from . import setup_solo_multiworld, SVTestBase
from . import setup_solo_multiworld, SVTestCase, allsanity_options_without_mods
from .. import ItemData, StardewValleyWorld
from ..items import Group, item_table
class TestItems(SVTestBase):
class TestItems(SVTestCase):
def test_can_create_item_of_resource_pack(self):
item_name = "Resource Pack: 500 Money"
@@ -46,7 +46,7 @@ class TestItems(SVTestBase):
def test_correct_number_of_stardrops(self):
seed = random.randrange(sys.maxsize)
allsanity_options = self.allsanity_options_without_mods()
allsanity_options = allsanity_options_without_mods()
multiworld = setup_solo_multiworld(allsanity_options, seed=seed)
stardrop_items = [item for item in multiworld.get_items() if "Stardrop" in item.name]
self.assertEqual(len(stardrop_items), 5)