mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
remove extraneous modules
This commit is contained in:
parent
c78ebd0d85
commit
5abcaee46d
2 changed files with 2 additions and 7 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
|
||||||
|
|
||||||
import util
|
import util
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from pre_commit_hooks.no_commit_to_branch import is_on_branch
|
from pre_commit_hooks.no_commit_to_branch import is_on_branch
|
||||||
from pre_commit_hooks.no_commit_to_branch import main
|
from pre_commit_hooks.no_commit_to_branch import main
|
||||||
from pre_commit_hooks.util import cmd_output
|
from pre_commit_hooks.util import cmd_output
|
||||||
|
|
@ -13,11 +9,11 @@ from pre_commit_hooks.util import cmd_output
|
||||||
def test_other_branch(temp_git_dir):
|
def test_other_branch(temp_git_dir):
|
||||||
with temp_git_dir.as_cwd():
|
with temp_git_dir.as_cwd():
|
||||||
cmd_output('git', 'checkout', '-b', 'anotherbranch')
|
cmd_output('git', 'checkout', '-b', 'anotherbranch')
|
||||||
assert is_on_branch('master') == False
|
assert is_on_branch('master') is False
|
||||||
|
|
||||||
def test_master_branch(temp_git_dir):
|
def test_master_branch(temp_git_dir):
|
||||||
with temp_git_dir.as_cwd():
|
with temp_git_dir.as_cwd():
|
||||||
assert is_on_branch('master') == True
|
assert is_on_branch('master') is True
|
||||||
|
|
||||||
def test_main_other_call(temp_git_dir):
|
def test_main_other_call(temp_git_dir):
|
||||||
with temp_git_dir.as_cwd():
|
with temp_git_dir.as_cwd():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue