mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
* Unroll tests for better parallelization * fix ut test * self review * bro it's the second time today I have to commit some garbage to have a github action rerun because messenger fails what is this * my god can the tests plz pass * code reviews * code reviews * move TestRandomWorlds out of long module
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
import unittest
|
|
from typing import ClassVar
|
|
|
|
from BaseClasses import get_seed
|
|
from test.param import classvar_matrix
|
|
from .. import SVTestCase, solo_multiworld, skip_long_tests
|
|
from ..assertion import WorldAssertMixin
|
|
from ... import options
|
|
|
|
if skip_long_tests():
|
|
raise unittest.SkipTest("Long tests disabled")
|
|
|
|
player_options = {
|
|
options.EntranceRandomization.internal_name: options.EntranceRandomization.option_buildings,
|
|
options.BundleRandomization.internal_name: options.BundleRandomization.option_remixed,
|
|
options.BundlePrice.internal_name: options.BundlePrice.option_maximum
|
|
}
|
|
|
|
|
|
@classvar_matrix(n=range(1000))
|
|
class TestGeneratePreRolledRandomness(WorldAssertMixin, SVTestCase):
|
|
n: ClassVar[int]
|
|
|
|
def test_given_pre_rolled_difficult_randomness_when_generate_then_basic_checks(self):
|
|
seed = get_seed()
|
|
|
|
print(f"Generating solo multiworld with seed {seed} for Stardew Valley...")
|
|
with solo_multiworld(player_options, seed=seed, world_caching=False) as (multiworld, _):
|
|
self.assert_basic_checks(multiworld)
|