small cleanups in tests · precommit/pre-commit@bea33af · GitHub
Skip to content

Commit bea33af

Browse files
committed
small cleanups in tests
1 parent 782244a commit bea33af

6 files changed

Lines changed: 30 additions & 78 deletions

File tree

testing/resources/manifest_without_foo.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

testing/resources/valid_yaml_but_invalid_config.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

testing/resources/valid_yaml_but_invalid_manifest.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/clientlib_test.py

Lines changed: 27 additions & 56 deletions

tests/commands/autoupdate_test.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from __future__ import unicode_literals
22

3-
import os.path
43
import pipes
5-
import shutil
64

75
import pytest
86

@@ -16,10 +14,10 @@
1614
from testing.fixtures import add_config_to_repo
1715
from testing.fixtures import make_config_from_repo
1816
from testing.fixtures import make_repo
17+
from testing.fixtures import modify_manifest
1918
from testing.fixtures import read_config
2019
from testing.fixtures import sample_local_config
2120
from testing.fixtures import write_config
22-
from testing.util import get_resource_path
2321
from testing.util import git_commit
2422

2523

@@ -275,12 +273,8 @@ def hook_disappearing_repo(tempdir_factory):
275273
path = make_repo(tempdir_factory, 'python_hooks_repo')
276274
original_rev = git.head_rev(path)
277275

278-
shutil.copy(
279-
get_resource_path('manifest_without_foo.yaml'),
280-
os.path.join(path, C.MANIFEST_FILE),
281-
)
282-
cmd_output('git', 'add', '.', cwd=path)
283-
git_commit(cwd=path)
276+
with modify_manifest(path) as manifest:
277+
manifest[0]['id'] = 'bar'
284278

285279
yield auto_namedtuple(path=path, original_rev=original_rev)
286280

tests/commands/migrate_config_test.py

Lines changed: 0 additions & 2 deletions

0 commit comments

Comments
 (0)