mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-20 01:24:42 +04:00
Small cleanups
This commit is contained in:
parent
e717df0ba8
commit
18c9e061d8
17 changed files with 40 additions and 58 deletions
|
|
@ -4,7 +4,6 @@ from __future__ import unicode_literals
|
|||
import os.path
|
||||
import tarfile
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from pre_commit import make_archives
|
||||
|
|
@ -53,12 +52,8 @@ def test_make_archive(tempdir_factory):
|
|||
|
||||
@skipif_slowtests_false
|
||||
@pytest.mark.integration
|
||||
def test_main(tempdir_factory):
|
||||
path = tempdir_factory.get()
|
||||
|
||||
# Don't actually want to make these in the current repo
|
||||
with mock.patch.object(make_archives, 'RESOURCES_DIR', path):
|
||||
make_archives.main()
|
||||
def test_main(tmpdir):
|
||||
make_archives.main(('--dest', tmpdir.strpath))
|
||||
|
||||
for archive, _, _ in make_archives.REPOS:
|
||||
assert os.path.exists(os.path.join(path, archive + '.tar.gz'))
|
||||
assert tmpdir.join('{}.tar.gz'.format(archive)).exists()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue