ratchets

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b37cae076d4f86dc07697b100aabeadd873ab397
parent 1713e3f124ccb3cb5fd8f84810c340d8ed7d3d78
Author: Andrew Laack <andrew@laack.co>
Date:   Wed, 18 Jun 2025 18:19:18 -0500

Removed duplicate ratchet_test file, set pytest as an optional dependency, used compatible release operator for remaining dependencies

Diffstat:
Mpyproject.toml | 6+++++-
Dsrc/ratchets/example_test_ratchet.py | 34----------------------------------
2 files changed, 5 insertions(+), 35 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml @@ -14,10 +14,14 @@ license = { text = "GPL-3.0-only" } requires-python = ">=3.7" dependencies = [ "pathspec==0.12.1", - "pytest==8.4.0", "toml==0.10.2" ] +[project.optional-dependencies] +test = [ + "pytest>=7.0" +] + [project.urls] Homepage = "https://github.com/andrewlaack/ratchets" Repository = "https://github.com/andrewlaack/ratchets" diff --git a/src/ratchets/example_test_ratchet.py b/src/ratchets/example_test_ratchet.py @@ -1,34 +0,0 @@ -import pytest -from ratchets.abstracted_tests import get_python_tests, get_command_tests, check_python_rule, check_command_rule - -@pytest.mark.parametrize("test_name,rule", get_python_tests().items()) -def test_python_regex_rule(test_name: str, rule: dict) -> None: - check_python_rule(test_name, rule) - -@pytest.mark.parametrize("test_name,test_dict", get_command_tests().items()) -def test_custom_command_rule(test_name: str, test_dict: dict) -> None: - check_command_rule(test_name, test_dict) - - # def test_all_python_regex_rules(): - # errors = [] - # for test_name, rule in get_python_tests().items(): - # try: - # check_python_rule(test_name, rule) - # except AssertionError as e: - # errors.append(f"{test_name}: {e}") - # except Exception as e: - # errors.append(f"{test_name}: unexpected error: {e!r}") - # if errors: - # pytest.fail("Some python regex rules failed:\n" + "\n".join(errors)) - # - # def test_all_command_rules(): - # errors = [] - # for test_name, test_dict in get_command_tests().items(): - # try: - # check_command_rule(test_name, test_dict) - # except AssertionError as e: - # errors.append(f"{test_name}: {e}") - # except Exception as e: - # errors.append(f"{test_name}: unexpected error: {e!r}") - # if errors: - # pytest.fail("Some command rules failed:\n" + "\n".join(errors))