def test_get_line_comment_char_Does_meta_info_GetCorrectArgs(view):
    sublime_modelines.get_line_comment_char(view)

    actual = view.meta_info.call_args
    expected = (("shellVariables", 0), {})

    assert actual == expected
Пример #2
0
def test_get_line_comment_char_Does_meta_info_GetCorrectArgs(view):
    sublime_modelines.get_line_comment_char(view)

    actual = view.meta_info.call_args
    expected = (("shellVariables", 0), {})

    assert actual == expected
def test_get_line_comment_char_DoWeGetLineCommentCharIfExists(view):
    view.meta_info.return_value = [{"name": "TM_COMMENT_START", "value": "#"}]

    expected = "#"
    actual = sublime_modelines.get_line_comment_char(view)

    assert expected == actual
Пример #4
0
def test_get_line_comment_char_ShouldReturnEmptyStringIfNoExtraVariablesExist(view):
    view.meta_info.return_value = None

    expected = ""
    actual = sublime_modelines.get_line_comment_char(view)

    assert expected == actual
Пример #5
0
def test_get_line_comment_char_DoWeGetEmptyLineIfLineCommentCharDoesntExist(view):
    view.meta_info.return_value = [{ "name": "NOT_TM_COMMENT_START", "value": "#"}]

    expected = ""
    actual = sublime_modelines.get_line_comment_char(view)

    assert expected == actual
Пример #6
0
def test_get_line_comment_char_DoWeGetLineCommentCharIfExists(view):
    view.meta_info.return_value = [{ "name": "TM_COMMENT_START", "value": "#"}]

    expected = "#"
    actual = sublime_modelines.get_line_comment_char(view)

    assert expected == actual
def test_get_line_comment_char_ShouldReturnEmptyStringIfNoExtraVariablesExist(
        view):
    view.meta_info.return_value = None

    expected = ""
    actual = sublime_modelines.get_line_comment_char(view)

    assert expected == actual
def test_get_line_comment_char_DoWeGetEmptyLineIfLineCommentCharDoesntExist(
        view):
    view.meta_info.return_value = [{
        "name": "NOT_TM_COMMENT_START",
        "value": "#"
    }]

    expected = ""
    actual = sublime_modelines.get_line_comment_char(view)

    assert expected == actual