Add the framework submodule and the accepted planning documents: Business Case, Stakeholder Analysis, Project Plan, three milestones, review records RC-001 to RC-006 and the traceability matrix. Set up the project skeleton for MIL-001: pyproject.toml (Python >=3.13, no runtime dependencies, pytest/ruff/mypy as dev extra), src/coffee_machine/constants.py, a constants consistency test, Doxyfile and a CI workflow that runs ruff, mypy and pytest. Task: MIL-001#1 Task: MIL-001#2 Task: MIL-001#3 Task: MIL-001#4 Task: MIL-001#5 Closes #1 Closes #2 Closes #3 Closes #4 Closes #5
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""! @file
|
||||
@brief Checks that the constants are consistent with each other.
|
||||
"""
|
||||
|
||||
from coffee_machine import constants
|
||||
|
||||
|
||||
def test_every_drink_uses_known_ingredients() -> None:
|
||||
known = set(constants.INITIAL_RESOURCES)
|
||||
for drink in constants.MENU.values():
|
||||
assert set(drink["ingredients"]) <= known # type: ignore[call-overload]
|
||||
|
||||
|
||||
def test_every_resource_has_a_unit() -> None:
|
||||
assert set(constants.INITIAL_RESOURCES) == set(constants.RESOURCE_UNITS)
|
||||
|
||||
|
||||
def test_commands_are_not_drink_names() -> None:
|
||||
assert constants.COMMAND_OFF not in constants.MENU
|
||||
assert constants.COMMAND_REPORT not in constants.MENU
|
||||
Reference in New Issue
Block a user