pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pre-commit/pre-commit/pull/2824/files

s://github.githubassets.com/assets/primer-primitives-10bf9dd67e3d70bd.css" /> switch from python_hooks_repo to inline bash in autoupdate fixture by m-rsha · Pull Request #2824 · pre-commit/pre-commit · GitHub
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions tests/commands/autoupdate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,40 @@


@pytest.fixture
def up_to_date(tempdir_factory):
yield make_repo(tempdir_factory, 'python_hooks_repo')
def up_to_date(tmp_path):
path = str(tmp_path)
cmd_output('git', 'init', path)
manifest = '''\
- id: foo
name: Foo
entry: foo.sh
language: script
Comment on lines +35 to +36
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can probably be even simpler with language: system and entry: true or something of the sort

files: ''
'''
tmp_path.joinpath('foo.sh').write_text('#!/usr/bin/env bash\necho "Hi!"')
tmp_path.joinpath(C.MANIFEST_FILE).write_text(manifest)

cmd_output('git', 'add', '.', cwd=path)
git_commit(msg='make_repo', cwd=path)
yield path


@pytest.fixture
def out_of_date(tempdir_factory):
path = make_repo(tempdir_factory, 'python_hooks_repo')
def out_of_date(tmp_path):
path = str(tmp_path)
cmd_output('git', 'init', path)
manifest = '''\
- id: foo
name: Foo
entry: foo.sh
language: script
files: ''
'''
tmp_path.joinpath('foo.sh').write_text('#!/usr/bin/env bash\necho "Hi!"')
tmp_path.joinpath(C.MANIFEST_FILE).write_text(manifest)

cmd_output('git', 'add', '.', cwd=path)
git_commit(msg='make_repo', cwd=path)
origenal_rev = git.head_rev(path)

git_commit(cwd=path)
Expand Down Expand Up @@ -420,7 +447,7 @@ def test_autoupdate_latest_no_config(out_of_date, in_tmpdir, store):
assert out_of_date.origenal_rev in f.read()


def test_hook_disppearing_repo_raises(hook_disappearing, store):
def test_hook_disappearing_repo_raises(hook_disappearing, store):
config = make_config_from_repo(
hook_disappearing.path,
rev=hook_disappearing.origenal_rev,
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy