mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
Skip case insensitivity tests on darwin.
MacOS usually uses a case-insensitive filesystem, and that causes these tests to fail with `FileExistsError`.
This commit is contained in:
parent
083b0d8174
commit
a603c6073e
1 changed files with 8 additions and 0 deletions
|
|
@ -13,6 +13,10 @@ skip_win32 = pytest.mark.skipif(
|
|||
reason='case conflicts between directories and files',
|
||||
)
|
||||
|
||||
skip_darwin = pytest.mark.skipif(
|
||||
sys.platform == 'darwin',
|
||||
reason='case conflicts between directories and files',
|
||||
)
|
||||
|
||||
def test_parents():
|
||||
assert set(parents('a')) == set()
|
||||
|
|
@ -44,6 +48,7 @@ def test_adding_something_with_conflict(temp_git_dir):
|
|||
assert find_conflicting_filenames(['f.py', 'F.py']) == 1
|
||||
|
||||
|
||||
@skip_darwin # pragma: darwin no cover
|
||||
@skip_win32 # pragma: win32 no cover
|
||||
def test_adding_files_with_conflicting_directories(temp_git_dir):
|
||||
with temp_git_dir.as_cwd():
|
||||
|
|
@ -54,6 +59,7 @@ def test_adding_files_with_conflicting_directories(temp_git_dir):
|
|||
assert find_conflicting_filenames([]) == 1
|
||||
|
||||
|
||||
@skip_darwin # pragma: darwin no cover
|
||||
@skip_win32 # pragma: win32 no cover
|
||||
def test_adding_files_with_conflicting_deep_directories(temp_git_dir):
|
||||
with temp_git_dir.as_cwd():
|
||||
|
|
@ -64,6 +70,7 @@ def test_adding_files_with_conflicting_deep_directories(temp_git_dir):
|
|||
assert find_conflicting_filenames([]) == 1
|
||||
|
||||
|
||||
@skip_darwin # pragma: darwin no cover
|
||||
@skip_win32 # pragma: win32 no cover
|
||||
def test_adding_file_with_conflicting_directory(temp_git_dir):
|
||||
with temp_git_dir.as_cwd():
|
||||
|
|
@ -94,6 +101,7 @@ def test_file_conflicts_with_committed_file(temp_git_dir):
|
|||
assert find_conflicting_filenames(['F.py']) == 1
|
||||
|
||||
|
||||
@skip_darwin # pragma: darwin no cover
|
||||
@skip_win32 # pragma: win32 no cover
|
||||
def test_file_conflicts_with_committed_dir(temp_git_dir):
|
||||
with temp_git_dir.as_cwd():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue