mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove plumbum
This commit is contained in:
parent
5d9ba14841
commit
bbd2572b11
24 changed files with 236 additions and 203 deletions
|
|
@ -4,9 +4,10 @@ from __future__ import unicode_literals
|
|||
import mock
|
||||
import os.path
|
||||
import pytest
|
||||
from plumbum import local
|
||||
|
||||
from pre_commit import make_archives
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import cwd
|
||||
from pre_commit.util import tarfile_open
|
||||
from testing.fixtures import git_dir
|
||||
from testing.util import get_head_sha
|
||||
|
|
@ -17,16 +18,16 @@ def test_make_archive(tmpdir_factory):
|
|||
output_dir = tmpdir_factory.get()
|
||||
git_path = git_dir(tmpdir_factory)
|
||||
# Add a files to the git directory
|
||||
with local.cwd(git_path):
|
||||
local['touch']('foo')
|
||||
local['git']('add', '.')
|
||||
local['git']('commit', '-m', 'foo')
|
||||
with cwd(git_path):
|
||||
cmd_output('touch', 'foo')
|
||||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '-m', 'foo')
|
||||
# We'll use this sha
|
||||
head_sha = get_head_sha('.')
|
||||
# And check that this file doesn't exist
|
||||
local['touch']('bar')
|
||||
local['git']('add', '.')
|
||||
local['git']('commit', '-m', 'bar')
|
||||
cmd_output('touch', 'bar')
|
||||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '-m', 'bar')
|
||||
|
||||
# Do the thing
|
||||
archive_path = make_archives.make_archive(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue