work on docs, tests and some fix

This commit is contained in:
2025-03-05 02:20:02 +03:00
parent 971258728c
commit 2bf2144815
25 changed files with 262 additions and 397 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
from argenta.command import Command
from argenta.command.params.flag import Flag, FlagsGroup
from argenta.command.exceptions import (UnprocessedInputFlagException,
RepeatedInputFlagsException,
EmptyInputCommandException)
@@ -9,7 +8,7 @@ import unittest
class TestCommand(unittest.TestCase):
def test_parse_correct_raw_command(self):
self.assertEqual(Command.parse_input_command('ssh --host 192.168.0.3').get_string_entity(), 'ssh')
self.assertEqual(Command.parse_input_command('ssh --host 192.168.0.3').get_trigger(), 'ssh')
def test_parse_raw_command_with_flag_name_without_value(self):
with self.assertRaises(UnprocessedInputFlagException):
@@ -28,5 +27,5 @@ class TestCommand(unittest.TestCase):
Command.parse_input_command('')
def test_get_command_description(self):
self.assertEqual(Command(command='test', description='test description').get_description(), 'test description')
self.assertEqual(Command(trigger='test', description='test description').get_description(), 'test description')