mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 00:54:42 +04:00
Move commands into their own files.
This commit is contained in:
parent
111ed02938
commit
cdfd3f7670
16 changed files with 736 additions and 673 deletions
22
tests/commands/uninstall_test.py
Normal file
22
tests/commands/uninstall_test.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue