Skip to content

Commit

Permalink
Add: test_pre_commit_hooks()
Browse files Browse the repository at this point in the history
  • Loading branch information
jedie committed Sep 25, 2024
1 parent f967cb8 commit 8767d6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions manageprojects/tests/test_project_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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)

0 comments on commit 8767d6a

Please sign in to comment.