Files
Grinch-AP/worlds/stardew_valley/test/long/TestPreRolledRandomness.py
Jérémie Bolduc b7b5bf58aa Stardew Valley: Use classvar_matrix to split tests (#4762)
* 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
2025-04-12 02:19:17 +02:00

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)