def test_dynamic(): """Test the state manager's LTL generation.""" global TEST_WORLD_MAP orders = eval("""[('search', {'Theme': 'user_1', 'Location': 'library'}), ('search', {'Theme': 'user_1', 'Location': 'classroom'}), ('retrieve', {'Source': 'user_1', 'Theme': 'defuser'}), ('go', {'Theme': '*', 'Location': 'hall'})]""") smgr = StateManager() smgr.set_basedir(LTLGEN_BASE_DIR) smgr.set_publisher(FakePublisher) smgr.location = INIT_ROOM # Add some rooms and synthesize new_rooms = ["room" + str(num) for num in range(15)] new_world_map = (TEST_WORLD_MAP[0] + new_rooms, TEST_WORLD_MAP[1] + [("hall", room) for room in new_rooms]) # Sneakily replace this under the tester's nose TEST_WORLD_MAP = new_world_map smgr.process_orders(orders, None, True, new_world_map) test_smgr(smgr)
def test_dynamic(): """Test the state manager's LTL generation.""" global TEST_WORLD_MAP orders = eval( """[('search', {'Theme': 'user_1', 'Location': 'library'}), ('search', {'Theme': 'user_1', 'Location': 'classroom'}), ('retrieve', {'Source': 'user_1', 'Theme': 'defuser'}), ('go', {'Theme': '*', 'Location': 'hall'})]""" ) smgr = StateManager() smgr.set_basedir(LTLGEN_BASE_DIR) smgr.set_publisher(FakePublisher) smgr.location = INIT_ROOM # Add some rooms and synthesize new_rooms = ["room" + str(num) for num in range(15)] new_world_map = (TEST_WORLD_MAP[0] + new_rooms, TEST_WORLD_MAP[1] + [("hall", room) for room in new_rooms]) # Sneakily replace this under the tester's nose TEST_WORLD_MAP = new_world_map smgr.process_orders(orders, None, True, new_world_map) test_smgr(smgr)