def test_specials_included_for_initial_completion(initial_text): suggestions = suggest_type(initial_text, initial_text) assert set(suggestions) == \ set([Keyword(), Special()])
def test_statements_with_cursor_before_function_body(text): suggestions = suggest_type(text, '') assert set(suggestions) == set([Keyword(), Special()])
def test_statements_with_cursor_after_function_body(text): suggestions = suggest_type(text, text[:text.find('; ') + 1]) assert set(suggestions) == set([Keyword(), Special()])
def test_slash_d_suggests_special(): suggestions = suggest_type("\\d", "\\d") assert set(suggestions) == set([Special()])
def test_slash_suggests_special(): suggestions = suggest_type('\\', '\\') assert set(suggestions) == set([Special()])
def test_slash_suggests_special(): suggestions = suggest_type("\\", "\\") assert set(suggestions) == {Special()}