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

@@ -1,13 +1,14 @@
import unittest
from typing import Dict
from BaseClasses import MultiWorld
from Options import SpecialRange
from .option_names import options_to_include
from worlds.stardew_valley.test.checks.world_checks import assert_can_win, assert_same_number_items_locations
from .. import setup_solo_multiworld, SVTestBase
from .. import setup_solo_multiworld, SVTestCase
def basic_checks(tester: SVTestBase, multiworld: MultiWorld):
def basic_checks(tester: unittest.TestCase, multiworld: MultiWorld):
assert_can_win(tester, multiworld)
assert_same_number_items_locations(tester, multiworld)
@@ -20,7 +21,7 @@ def get_option_choices(option) -> Dict[str, int]:
return {}
class TestGenerateDynamicOptions(SVTestBase):
class TestGenerateDynamicOptions(SVTestCase):
def test_given_option_pair_when_generate_then_basic_checks(self):
if self.skip_long_tests:
return