<s> import pytest <EOL> from tests . helpers import ui , test_room <EOL> from modules . locatable import Locatable <EOL> @ pytest . fixture <EOL> def locatable ( ) : <EOL> return Locatable ( ) <EOL> def test_locatable_has_a_location ( locatable ) : <EOL> locatable . place ( ( <NUM_LIT:2> , <NUM_LIT:3> ) ) <EOL> assert locatable . coords [ <NUM_LIT:0> ] == <NUM_LIT:2> <EOL> assert locatable . coords [ <NUM_LIT:1> ] == <NUM_LIT:3> <EOL> def test_locatable_has_unique_id ( locatable ) : <EOL> another = Locatable ( ) <EOL> third = Locatable ( ) <EOL> assert locatable . uid != another . uid <EOL> assert locatable . uid != third . uid <EOL> assert another . uid != third . uid <EOL> def test_locatable_knows_how_to_display_itself ( locatable ) : <EOL> assert locatable . display == "<STR_LIT:!>" <EOL> def test_can_set_display ( locatable ) : <EOL> locatable . set_display ( "<STR_LIT:@>" ) <EOL> assert locatable . display == "<STR_LIT:@>" <EOL> def test_can_test_location ( locatable ) : <EOL> locatable . place ( ( <NUM_LIT:5> , <NUM_LIT:6> ) ) <EOL> assert not locatable . is_at ( ( <NUM_LIT:3> , <NUM_LIT:4> ) ) <EOL> assert locatable . is_at ( ( <NUM_LIT:5> , <NUM_LIT:6> ) ) <EOL> def test_locatable_can_be_located ( locatable ) : <EOL> locatable . place ( ( <NUM_LIT:3> , <NUM_LIT:3> ) ) <EOL> assert locatable . locate ( ) == ( <NUM_LIT:3> , <NUM_LIT:3> ) <EOL> def test_locatable_can_go_north ( locatable ) : <EOL> locatable . place ( ( <NUM_LIT:1> , <NUM_LIT:1> ) ) <EOL> locatable . travel ( "<STR_LIT:n>" ) <EOL> assert locatable . locate ( ) == ( <NUM_LIT:1> , <NUM_LIT:2> ) <EOL> def test_locatable_can_go_south ( locatable ) : <EOL> locatable . place ( ( <NUM_LIT:1> , <NUM_LIT:1> ) ) <EOL> locatable . travel ( "<STR_LIT:s>" ) <EOL> assert locatable . locate ( ) == ( <NUM_LIT:1> , <NUM_LIT:0> ) <EOL> def test_locatable_can_go_east ( locatable ) : <EOL> locatable . place ( ( <NUM_LIT:1> , <NUM_LIT:1> ) ) <EOL> locatable . travel ( "<STR_LIT:e>" ) <EOL> assert locatable . locate ( ) == ( <NUM_LIT:2> , <NUM_LIT:1> ) <EOL> def test_locatable_can_go_west ( locatable ) : <EOL> locatable . place ( ( <NUM_LIT:1> , <NUM_LIT:1> ) ) <EOL> locatable . travel ( "<STR_LIT:w>" ) <EOL> assert locatable . locate ( ) == ( <NUM_LIT:0> , <NUM_LIT:1> ) <EOL> def test_locatable_has_display_priority ( locatable ) : <EOL> assert locatable . display_priority == <NUM_LIT:0> <EOL> def test_has_no_move_ai_by_defailt ( locatable ) : <EOL> assert locatable . has_move_ai ( ) == False </s>
