mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-12 14:04:17 +00:00
Add check_case_conflict hook #21
This commit is contained in:
parent
b08f834d65
commit
c682b50749
11 changed files with 173 additions and 20 deletions
|
|
@ -1,26 +1,11 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import io
|
||||
|
||||
import pytest
|
||||
from plumbum import local
|
||||
|
||||
from pre_commit_hooks.check_added_large_files import find_large_added_files
|
||||
from pre_commit_hooks.check_added_large_files import main
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def temp_git_dir(tmpdir):
|
||||
git_dir = tmpdir.join('gits').strpath
|
||||
local['git']('init', git_dir)
|
||||
yield git_dir
|
||||
|
||||
|
||||
def write_file(filename, contents):
|
||||
"""Hax because coveragepy chokes on nested context managers."""
|
||||
with io.open(filename, 'w') as file_obj:
|
||||
file_obj.write(contents)
|
||||
from testing.util import write_file
|
||||
|
||||
|
||||
def test_nothing_added(temp_git_dir):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue