mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use rev-parse --show-toplevel
This commit is contained in:
parent
72516288df
commit
3f02a66e37
3 changed files with 13 additions and 16 deletions
|
|
@ -15,7 +15,7 @@ from testing.fixtures import git_dir
|
|||
def test_get_root_at_root(tempdir_factory):
|
||||
path = git_dir(tempdir_factory)
|
||||
with cwd(path):
|
||||
assert git.get_root() == path
|
||||
assert os.path.normcase(git.get_root()) == os.path.normcase(path)
|
||||
|
||||
|
||||
def test_get_root_deeper(tempdir_factory):
|
||||
|
|
@ -24,7 +24,7 @@ def test_get_root_deeper(tempdir_factory):
|
|||
foo_path = os.path.join(path, 'foo')
|
||||
os.mkdir(foo_path)
|
||||
with cwd(foo_path):
|
||||
assert git.get_root() == path
|
||||
assert os.path.normcase(git.get_root()) == os.path.normcase(path)
|
||||
|
||||
|
||||
def test_get_root_not_git_dir(tempdir_factory):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue