예제 #1
0
def test_is_previous_pre_commit(tmpdir):
    f = tmpdir.join('foo')
    f.write(PRIOR_HASHES[0] + '\n')
    assert is_our_script(f.strpath)
예제 #2
0
def test_is_not_script():
    assert is_our_script('setup.py') is False
예제 #3
0
def test_is_script():
    assert is_our_script(resource_filename('hook-tmpl'))
예제 #4
0
def test_is_script():
    assert is_our_script('pre_commit/resources/hook-tmpl')
예제 #5
0
def test_is_previous_pre_commit(tmpdir):
    f = tmpdir.join('foo')
    f.write(PRIOR_HASHES[0] + '\n')
    assert is_our_script(f.strpath)
예제 #6
0
def test_is_script():
    assert is_our_script(resource_filename('hook-tmpl'))
예제 #7
0
def test_is_not_script():
    assert is_our_script('setup.py') is False
def test_is_script():
    assert is_our_script('pre_commit/resources/hook-tmpl')