def test_empty_search_paths(): set_ament_prefix_path([]) try: get_search_paths() assert False, 'get_search_paths() failed to raise exception' except EnvironmentError: pass except Exception as e: assert False, 'get_search_paths() raised wrong exception: ' + type(e)
def test_not_existing_search_paths(): set_ament_prefix_path(['prefix1', 'not_existing_prefix']) search_paths = get_search_paths() assert len(search_paths) == 1, 'Expected one search paths'
def test_search_paths(): set_ament_prefix_path(['prefix1', 'prefix2']) search_paths = get_search_paths() assert len(search_paths) == 2, 'Expected two search paths'
def test_empty_search_paths(): set_ament_prefix_path([]) with pytest.raises(EnvironmentError): get_search_paths()