Added icons

Updated README.md
Started test framework utils
This commit is contained in:
2025-10-24 12:24:10 +02:00
parent a4e122f4ea
commit 0f5fc696f0
25 changed files with 88199 additions and 2 deletions

25
tests/test_commands.py Normal file
View File

@@ -0,0 +1,25 @@
import pytest
from myfasthtml.core.commands import Command, CommandsManager
def callback():
return "Hello World"
@pytest.fixture(autouse=True)
def test_reset_command_manager():
CommandsManager.reset()
def test_i_can_create_a_command_with_no_params():
command = Command('test', 'Command description', callback)
assert command.id is not None
assert command.name == 'test'
assert command.description == 'Command description'
assert command.execute() == "Hello World"
def test_command_are_registered():
command = Command('test', 'Command description', callback)
assert CommandsManager.commands.get(str(command.id)) is command