diff --git a/README.md b/README.md index f22d40f..5c30e70 100644 --- a/README.md +++ b/README.md @@ -348,6 +348,7 @@ See also git tags: https://github.com/jedie/manageprojects/tags [comment]: <> (✂✂✂ auto generated history start ✂✂✂) * [**dev**](https://github.com/jedie/manageprojects/compare/v0.19.2...main) + * 2024-09-25 - Add: test_pre_commit_hooks() * 2024-09-25 - Move git pre-commit hook from dev-cli.py to update command * [v0.19.2](https://github.com/jedie/manageprojects/compare/v0.19.1...v0.19.2) * 2024-09-24 - Add piwheels hashes, too. diff --git a/manageprojects/tests/test_project_setup.py b/manageprojects/tests/test_project_setup.py index d5abf4c..492d303 100644 --- a/manageprojects/tests/test_project_setup.py +++ b/manageprojects/tests/test_project_setup.py @@ -3,6 +3,7 @@ from bx_py_utils.path import assert_is_file from cli_base.cli_tools.code_style import assert_code_style +from cli_base.cli_tools.subprocess_utils import ToolsExecutor from packaging.version import Version from manageprojects import __version__ @@ -38,3 +39,8 @@ def test_check_editor_config(self): max_line_length = get_py_max_line_length(package_root=PACKAGE_ROOT) self.assertEqual(max_line_length, 119) + + def test_pre_commit_hooks(self): + executor = ToolsExecutor(cwd=PACKAGE_ROOT) + for command in ('migrate-config', 'validate-config', 'validate-manifest'): + executor.verbose_check_call('pre-commit', command, exit_on_error=True)