mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Replace resources with importlib_resources
This commit is contained in:
parent
ebe5132576
commit
9f60561d6f
17 changed files with 72 additions and 49 deletions
|
|
@ -153,3 +153,12 @@ def test_require_created_when_directory_exists_but_not_db(store):
|
|||
os.makedirs(store.directory)
|
||||
store.require_created()
|
||||
assert os.path.exists(store.db_path)
|
||||
|
||||
|
||||
def test_local_resources_reflects_reality():
|
||||
on_disk = {
|
||||
res[len('empty_template_'):]
|
||||
for res in os.listdir('pre_commit/resources')
|
||||
if res.startswith('empty_template_')
|
||||
}
|
||||
assert on_disk == set(Store.LOCAL_RESOURCES)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue