MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / test_lots_of_files

Function test_lots_of_files

tests/commands/run_test.py:757–776  ·  view source on GitHub ↗
(store, tempdir_factory)

Source from the content-addressed store, hash-verified

755
756
757def test_lots_of_files(store, tempdir_factory):
758 # windows xargs seems to have a bug, here's a regression test for
759 # our workaround
760 git_path = make_consuming_repo(tempdir_factory, 'script_hooks_repo')
761 with cwd(git_path):
762 # Override files so we run against them
763 with modify_config() as config:
764 config['repos'][0]['hooks'][0]['files'] = ''
765
766 # Write a crap ton of files
767 for i in range(400):
768 open(f'{"a" * 100}{i}', 'w').close()
769
770 cmd_output('git', 'add', '.')
771 install(C.CONFIG_FILE, store, hook_types=['pre-commit'])
772
773 git_commit(
774 fn=cmd_output_mocked_pre_commit_home,
775 tempdir_factory=tempdir_factory,
776 )
777
778
779def test_no_textconv(cap_out, store, repo_with_passing_hook):

Callers

nothing calls this directly

Calls 6

make_consuming_repoFunction · 0.90
cwdFunction · 0.90
modify_configFunction · 0.90
cmd_outputFunction · 0.90
installFunction · 0.90
git_commitFunction · 0.90

Tested by

no test coverage detected