This commit is contained in:
2025-10-28 09:38:07 +03:00
parent 7b40fff4c5
commit bc6cb583a7
49 changed files with 588 additions and 123 deletions
@@ -1,14 +1,15 @@
import _io
from unittest.mock import patch, MagicMock
from unittest import TestCase
import io
import re
import sys
from unittest import TestCase
from unittest.mock import MagicMock, patch
import _io
from argenta import App, Orchestrator, Router
from argenta.command import Command, PredefinedFlags
from argenta.command.flag.models import ValidationStatus
from argenta.command.flag.flags.models import Flags
from argenta import Orchestrator, App, Router
from argenta.command.flag.models import ValidationStatus
from argenta.response import Response
@@ -1,16 +1,17 @@
import _io
from unittest.mock import patch, MagicMock
from unittest import TestCase
import io
import re
import sys
from unittest import TestCase
from unittest.mock import MagicMock, patch
import _io
from argenta import App, Orchestrator, Router
from argenta.command import Command, PredefinedFlags
from argenta.command.flag.models import PossibleValues, ValidationStatus
from argenta.response import Response
from argenta import Orchestrator, App, Router
from argenta.command.flag import Flag
from argenta.command.flag.flags import Flags
from argenta.command.flag.models import PossibleValues, ValidationStatus
from argenta.response import Response
class PatchedArgvTestCase(TestCase):
+2 -3
View File
@@ -1,8 +1,7 @@
from argenta.command.models import InputCommand, Command
from argenta.app import App
import unittest
from argenta.app import App
from argenta.command.models import Command, InputCommand
from argenta.router import Router
+6 -7
View File
@@ -1,14 +1,13 @@
import pytest
from argparse import Namespace
from unittest.mock import MagicMock, call
import pytest
from argenta.orchestrator.argparser.arguments.models import (BaseArgument,
BooleanArgument,
InputArgument,
ValueArgument)
from argenta.orchestrator.argparser.entity import ArgParser, ArgSpace
from argenta.orchestrator.argparser.arguments.models import (
ValueArgument,
BooleanArgument,
InputArgument,
BaseArgument,
)
class TestArgumentCreation:
+4 -2
View File
@@ -1,5 +1,5 @@
import os
from unittest.mock import MagicMock, patch, call
from unittest.mock import MagicMock, call, patch
import pytest
@@ -46,7 +46,9 @@ def mock_readline():
# We import the class under test after setting up the patch context if needed,
# or ensure patches target the correct import location.
from argenta.app.autocompleter.entity import AutoCompleter, _get_history_items, _is_command_exist
from argenta.app.autocompleter.entity import (AutoCompleter,
_get_history_items,
_is_command_exist)
class TestAutoCompleter:
+7 -7
View File
@@ -1,13 +1,13 @@
import re
import unittest
from argenta.command.exceptions import (EmptyInputCommandException,
RepeatedInputFlagsException,
UnprocessedInputFlagException)
from argenta.command.flag import Flag, InputFlag
from argenta.command.flag.flags import Flags
from argenta.command.flag.models import PossibleValues
from argenta.command.models import InputCommand, Command, ValidationStatus
from argenta.command.exceptions import (UnprocessedInputFlagException,
RepeatedInputFlagsException,
EmptyInputCommandException)
import unittest
import re
from argenta.command.models import Command, InputCommand, ValidationStatus
class TestInputCommand(unittest.TestCase):
+2 -2
View File
@@ -1,7 +1,7 @@
from argenta.app.dividing_line import DynamicDividingLine, StaticDividingLine
import unittest
from argenta.app.dividing_line import DynamicDividingLine, StaticDividingLine
class TestDividingLine(unittest.TestCase):
def test_get_static_dividing_line_full_line(self):
+4 -4
View File
@@ -1,8 +1,8 @@
from argenta.command.flag import Flag, InputFlag, PossibleValues
from argenta.command.flag.flags import InputFlags, Flags
import unittest
import re
import unittest
from argenta.command.flag import Flag, InputFlag, PossibleValues
from argenta.command.flag.flags import Flags, InputFlags
class TestFlag(unittest.TestCase):
+4 -4
View File
@@ -1,10 +1,10 @@
import unittest
from datetime import datetime, date
from datetime import date, datetime
from argenta.response.entity import Response, DataBridge, EMPTY_INPUT_FLAGS
from argenta.response.status import ResponseStatus
from argenta.command.flag.flags.models import InputFlags
from argenta.command.flag import InputFlag
from argenta.command.flag.flags.models import InputFlags
from argenta.response.entity import EMPTY_INPUT_FLAGS, DataBridge, Response
from argenta.response.status import ResponseStatus
class TestDataBridge(unittest.TestCase):
+10 -9
View File
@@ -1,16 +1,17 @@
from argenta.command.flag import InputFlag, Flag
import re
import unittest
from argenta.command import Command
from argenta.command.flag import Flag, InputFlag
from argenta.command.flag.flags import Flags, InputFlags
from argenta.command.flag.models import PossibleValues, ValidationStatus
from argenta.response.entity import Response
from argenta.router import Router
from argenta.command import Command
from argenta.router.entity import _structuring_input_flags, _validate_command, _validate_func_args # pyright: ignore[reportPrivateUsage]
from argenta.router.exceptions import (TriggerContainSpacesException,
RepeatedFlagNameException,
RequiredArgumentNotPassedException)
import unittest
import re
from argenta.router.entity import ( # pyright: ignore[reportPrivateUsage]
_structuring_input_flags, _validate_command, _validate_func_args)
from argenta.router.exceptions import (RepeatedFlagNameException,
RequiredArgumentNotPassedException,
TriggerContainSpacesException)
class TestRouter(unittest.TestCase):