Files
015-coffee-machine/tests/test_smoke.py
Tirsvad d570489a33 Implement coffee machine core for MIL-002
Add the menu, coin values, starting resources and message texts to
constants.py. Implement report, is_resource_sufficient, process_coins,
is_transaction_successful, make_coffee and the main loop. Money is
counted in whole cents. The smoke test now feeds "off" so the loop
exits.

Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11
Closes #12

Task: MIL-002#1
Task: MIL-002#2
Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
Task: MIL-002#6
Task: MIL-002#7
2026-10-06 19:49:49 +08:00

17 lines
365 B
Python

"""!
@file test_smoke.py
@brief Smoke test that the package imports.
"""
import pytest
from coffee_machine import main as main_module
def test_main_is_callable(monkeypatch: pytest.MonkeyPatch) -> None:
"""!
@brief The entry point starts and stops on "off".
"""
monkeypatch.setattr("builtins.input", lambda _prompt: "off")
main_module.main()