| 67 | |
| 68 | |
| 69 | def test_store_init(store): |
| 70 | # Should create the store directory |
| 71 | assert os.path.exists(store.directory) |
| 72 | # Should create a README file indicating what the directory is about |
| 73 | with open(os.path.join(store.directory, 'README')) as readme_file: |
| 74 | readme_contents = readme_file.read() |
| 75 | for text_line in ( |
| 76 | 'This directory is maintained by the pre-commit project.', |
| 77 | 'Learn more: https://github.com/pre-commit/pre-commit', |
| 78 | ): |
| 79 | assert text_line in readme_contents |
| 80 | |
| 81 | |
| 82 | def test_clone(store, tempdir_factory, caplog): |