Example #1
0
def test_get_lang():
    from lawyerup.core import get_lang

    path = "/path/to/test.py"
    expected = "unix"
    assert get_lang(path) == expected
Example #2
0
def test_get_lang_dotfile():
    from lawyerup.core import get_lang

    path = "/path/to/.dotfile"
    with pytest.raises(IndexError):
        get_lang(path)
Example #3
0
def test_get_lang_no_ext():
    from lawyerup.core import get_lang

    path = "/path/to/no-extension"
    with pytest.raises(IndexError):
        get_lang(path)
Example #4
0
def test_get_lang():
    from lawyerup.core import get_lang

    path = '/path/to/test.py'
    expected = 'unix'
    assert get_lang(path) == expected
Example #5
0
def test_get_lang_dotfile():
    from lawyerup.core import get_lang

    path = '/path/to/.dotfile'
    with pytest.raises(IndexError):
        get_lang(path)
Example #6
0
def test_get_lang_no_ext():
    from lawyerup.core import get_lang

    path = '/path/to/no-extension'
    with pytest.raises(IndexError):
        get_lang(path)