def test_is_previous_pre_commit(in_tmpdir):
    with io.open('foo', 'w') as foo_file:
        foo_file.write(PREVIOUS_IDENTIFYING_HASHES[0])

    assert is_previous_pre_commit('foo')
def test_is_not_previous_pre_commit():
    assert is_previous_pre_commit('setup.py') is False
def test_is_also_not_previous_pre_commit():
    assert not is_previous_pre_commit(resource_filename('hook-tmpl'))
Exemple #4
0
def test_is_previous_pre_commit(in_tmpdir):
    with io.open('foo', 'w') as foo_file:
        foo_file.write(PREVIOUS_IDENTIFYING_HASHES[0])

    assert is_previous_pre_commit('foo')
Exemple #5
0
def test_is_also_not_previous_pre_commit():
    assert not is_previous_pre_commit(resource_filename('hook-tmpl'))
Exemple #6
0
def test_is_not_previous_pre_commit():
    assert is_previous_pre_commit('setup.py') is False
def test_is_also_not_previous_pre_commit():
    assert not is_previous_pre_commit(resource_filename('pre-commit-hook'))
def test_is_also_not_previous_pre_commit():
    assert not is_previous_pre_commit(resource_filename('pre-commit-hook'))