mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
DLC Quest - Skip two long tests in the main pipeline (#4862)
* - Set up the two long tests to only run when the specific config is active * Apply Black Sliver's suggestion
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import unittest
|
||||
from typing import Dict
|
||||
|
||||
from BaseClasses import MultiWorld
|
||||
from Options import NamedRange
|
||||
from .option_names import options_to_include
|
||||
from .checks.world_checks import assert_can_win, assert_same_number_items_locations
|
||||
from . import DLCQuestTestBase, setup_dlc_quest_solo_multiworld
|
||||
from .checks.world_checks import assert_can_win, assert_same_number_items_locations
|
||||
from .option_names import options_to_include
|
||||
|
||||
|
||||
def basic_checks(tester: DLCQuestTestBase, multiworld: MultiWorld):
|
||||
@@ -38,6 +39,8 @@ class TestGenerateDynamicOptions(DLCQuestTestBase):
|
||||
basic_checks(self, multiworld)
|
||||
|
||||
def test_given_option_truple_when_generate_then_basic_checks(self):
|
||||
if self.skip_long_tests:
|
||||
raise unittest.SkipTest("Long tests disabled")
|
||||
num_options = len(options_to_include)
|
||||
for option1_index in range(0, num_options):
|
||||
for option2_index in range(option1_index + 1, num_options):
|
||||
@@ -59,6 +62,8 @@ class TestGenerateDynamicOptions(DLCQuestTestBase):
|
||||
basic_checks(self, multiworld)
|
||||
|
||||
def test_given_option_quartet_when_generate_then_basic_checks(self):
|
||||
if self.skip_long_tests:
|
||||
raise unittest.SkipTest("Long tests disabled")
|
||||
num_options = len(options_to_include)
|
||||
for option1_index in range(0, num_options):
|
||||
for option2_index in range(option1_index + 1, num_options):
|
||||
|
@@ -1,19 +1,26 @@
|
||||
from typing import ClassVar
|
||||
|
||||
from typing import Dict, FrozenSet, Tuple, Any
|
||||
import os
|
||||
from argparse import Namespace
|
||||
from typing import ClassVar
|
||||
from typing import Dict, FrozenSet, Tuple, Any
|
||||
|
||||
from BaseClasses import MultiWorld
|
||||
from test.bases import WorldTestBase
|
||||
from .. import DLCqworld
|
||||
from test.general import gen_steps, setup_solo_multiworld as setup_base_solo_multiworld
|
||||
from worlds.AutoWorld import call_all
|
||||
from .. import DLCqworld
|
||||
|
||||
|
||||
class DLCQuestTestBase(WorldTestBase):
|
||||
game = "DLCQuest"
|
||||
world: DLCqworld
|
||||
player: ClassVar[int] = 1
|
||||
# Set False to run tests that take long
|
||||
skip_long_tests: bool = True
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None:
|
||||
super().setUpClass()
|
||||
cls.skip_long_tests = not bool(os.environ.get("long"))
|
||||
|
||||
def world_setup(self, *args, **kwargs):
|
||||
super().world_setup(*args, **kwargs)
|
||||
|
Reference in New Issue
Block a user