Ejemplo n.º 1
0
def test_invalid_constructor_location_should_be_missing():
    with pytest.raises(ValueError) as err:
        StartingLocation(StartingLocationConfiguration.SHIP,
                         AreaLocation(0, 0))

    assert str(err.value) == "custom_location set to world 0/area 0, " \
                             "but configuration is StartingLocationConfiguration.SHIP instead of CUSTOM"
 def _update_starting_location(self):
     if self._has_valid_starting_location():
         with self._options as options:
             options.set_layout_configuration_field(
                 "starting_location",
                 StartingLocation(self.startingarea_combo.currentData(),
                                  self.current_starting_area_location))
Ejemplo n.º 3
0
def test_invalid_constructor_missing_location():
    with pytest.raises(ValueError) as err:
        StartingLocation(StartingLocationConfiguration.CUSTOM, None)

    assert str(
        err.value) == "Configuration is CUSTOM, but not custom_location set"
Ejemplo n.º 4
0
def _custom_starting_location():
    return StartingLocation(StartingLocationConfiguration.CUSTOM,
                            AreaLocation(2252328306, 3417147547))
Ejemplo n.º 5
0
def _simple_starting_location(request):
    yield StartingLocation(request.param, None)