mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
remove tests for .gitignore
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from rich.console import Console
|
||||
from argenta.router import Router
|
||||
|
||||
|
||||
work_router: Router = Router(name='Work points:',
|
||||
ignore_command_register=False)
|
||||
settings_router: Router = Router(name='Settings points:',
|
||||
ignore_command_register=True)
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
@work_router.command(command='0', description='Get Help')
|
||||
def command_help():
|
||||
print('help command')
|
||||
|
||||
|
||||
@work_router.command(command='1', description='Start Solving')
|
||||
def command_start_solving():
|
||||
print('start solving')
|
||||
|
||||
|
||||
@settings_router.command(command='U', description='Update WordMath')
|
||||
def command_update():
|
||||
print('update wordmath')
|
||||
|
||||
|
||||
@work_router.unknown_command
|
||||
def command_unknown_command(command):
|
||||
console.print(f'[bold red]Unknown command: [/bold red]{command}')
|
||||
@@ -0,0 +1,16 @@
|
||||
from tests.mock_default_app.handlers.routers import work_router, settings_router
|
||||
from argenta.app.entity import App
|
||||
from art import text2art
|
||||
|
||||
|
||||
app: App = App()
|
||||
|
||||
|
||||
def main():
|
||||
app.include_router(work_router, is_main=True)
|
||||
app.include_router(settings_router)
|
||||
|
||||
app.start_polling()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user