mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
22 lines
629 B
Python
22 lines
629 B
Python
from __future__ import unicode_literals
|
|
|
|
import os.path
|
|
|
|
from pre_commit.runner import Runner
|
|
from pre_commit.commands.install import install
|
|
from pre_commit.commands.uninstall import uninstall
|
|
|
|
|
|
def test_uninstall_pre_commit_does_not_blow_up_when_not_there(empty_git_dir):
|
|
runner = Runner(empty_git_dir)
|
|
ret = uninstall(runner)
|
|
assert ret == 0
|
|
|
|
|
|
def test_uninstall(empty_git_dir):
|
|
runner = Runner(empty_git_dir)
|
|
assert not os.path.exists(runner.pre_commit_path)
|
|
install(runner)
|
|
assert os.path.exists(runner.pre_commit_path)
|
|
uninstall(runner)
|
|
assert not os.path.exists(runner.pre_commit_path)
|