mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 08:34:41 +04:00
Remove plumbum
This commit is contained in:
parent
5d9ba14841
commit
bbd2572b11
24 changed files with 236 additions and 203 deletions
|
|
@ -3,10 +3,10 @@ from __future__ import unicode_literals
|
|||
|
||||
import os
|
||||
import os.path
|
||||
from plumbum import local
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.runner import Runner
|
||||
from pre_commit.util import cwd
|
||||
from testing.fixtures import git_dir
|
||||
from testing.fixtures import make_consuming_repo
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ def test_init_has_no_side_effects(tmpdir):
|
|||
|
||||
def test_create_sets_correct_directory(tmpdir_factory):
|
||||
path = git_dir(tmpdir_factory)
|
||||
with local.cwd(path):
|
||||
with cwd(path):
|
||||
runner = Runner.create()
|
||||
assert runner.git_root == path
|
||||
assert os.getcwd() == path
|
||||
|
|
@ -28,7 +28,7 @@ def test_create_sets_correct_directory(tmpdir_factory):
|
|||
|
||||
def test_create_changes_to_git_root(tmpdir_factory):
|
||||
path = git_dir(tmpdir_factory)
|
||||
with local.cwd(path):
|
||||
with cwd(path):
|
||||
# Change into some directory, create should set to root
|
||||
foo_path = os.path.join(path, 'foo')
|
||||
os.mkdir(foo_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue