tests.engine package

Submodules

tests.engine.test_component module

class TestPosition[source]

Bases: object

test_position_centers()[source]

Test the Position centers correctly

test_position_coordinates()[source]

Test the Position coordinates

test_position_detect_top_left()[source]

Test the Position component

test_position_outmost(coordinates: List[Tuple[int, int]], direction: Tuple[int, int], expected: Tuple[int, int])[source]

Test the Position outmost function

test_position_outmost_parameters = [[[(0, 0), (1, 0), (0, 1), (1, 1), (-1, 0), (-1, -1), (-1, 1), (1, -1), (0, -1)], (1, 0), (1, 0)], [[(0, 0), (1, 0), (0, 1), (1, 1), (-1, 0), (-1, -1), (-1, 1), (1, -1), (0, -1)], (-1, 0), (-1, 0)], [[(0, 0), (1, 0), (0, 1), (1, 1), (-1, 0), (-1, -1), (-1, 1), (1, -1), (0, -1)], (0, -1), (0, -1)], [[(0, 0), (1, 0), (0, 1), (1, 1), (-1, 0), (-1, -1), (-1, 1), (1, -1), (0, -1)], (0, 1), (0, 1)]]

tests.engine.test_effect module

affect_cooldown_amount(request)[source]
affect_terrain_amount(request)[source]
affect_terrain_negative_amount(request)[source]
affliction_name(request)[source]
skill_name(request)[source]
terrain_name(request)[source]
test_affect_cooldown_effect(skill_name, affect_cooldown_amount)[source]
test_affect_stat_effect(cause_name, stat_to_target, affect_amount)[source]
test_alter_terrain_effect_create(terrain_name, affect_terrain_amount)[source]
test_alter_terrain_effect_reduce_duration(terrain_name, affect_terrain_negative_amount)[source]
test_apply_affliction_effect(affliction_name)[source]
test_damage_effect(stat_to_target, accuracy, damage, damage_type, mod_stat, mod_amount, potency)[source]
test_move_other_effect(direction, self_or_other)[source]
test_move_self_effect(direction, self_or_other)[source]

tests.engine.test_state module

test_dump_save_game(benchmark)[source]
test_load_game(benchmark)[source]
test_save_game(benchmark)[source]
test_set_state(game_state: scripts.engine.internal.constant.GameState, _)[source]

Test changing the state

tests.engine.test_utility module

test_build_sprites_from_paths(benchmark)[source]
test_clamp(value: Union[int, float], min_value: Union[int, float], max_value: Union[int, float])[source]
test_flatten_images(benchmark)[source]
test_get_coordinates_from_shape(benchmark, shape: ShapeType, size: int, direction: Tuple[int, int], expected: List[Tuple[int, int]])[source]
test_get_image_returns_copy()[source]
test_get_image_returns_image(benchmark, desired_dimensions: Tuple[int, int])[source]
test_get_images_returns_images()[source]
test_is_close(current_pos: Tuple[float, float], target_pos: Tuple[float, float], delta: float)[source]
test_is_not_close(current_pos: Tuple[float, float], target_pos: Tuple[float, float], delta: float)[source]

Module contents