From 63d1bd588f954a28a6c12ca3a8fada5a4f91c888 Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Wed, 13 Nov 2024 14:43:25 +0100 Subject: [PATCH] Rename sugar to method_mock --- test/cache/test_icache.py | 2 +- test/frontend/test_fetch.py | 2 +- test/func_blocks/lsu/test_dummylsu.py | 2 +- test/func_blocks/lsu/test_pma.py | 2 +- test/scheduler/test_rs_selection.py | 2 +- test/scheduler/test_scheduler.py | 2 +- test/transactron/lib/test_transaction_lib.py | 2 +- test/transactron/test_simultaneous.py | 2 +- test/transactron/testing/test_validate_arguments.py | 2 +- transactron/testing/__init__.py | 2 +- transactron/testing/infrastructure.py | 2 +- transactron/testing/{sugar.py => method_mock.py} | 0 12 files changed, 11 insertions(+), 11 deletions(-) rename transactron/testing/{sugar.py => method_mock.py} (100%) diff --git a/test/cache/test_icache.py b/test/cache/test_icache.py index 787ed803a..fd5ac04c1 100644 --- a/test/cache/test_icache.py +++ b/test/cache/test_icache.py @@ -18,7 +18,7 @@ from transactron.testing import TestCaseWithSimulator, TestbenchIO, async_def_method_mock from transactron.testing.functions import MethodData -from transactron.testing.sugar import MethodMock +from transactron.testing.method_mock import MethodMock from transactron.testing.testbenchio import CallTrigger from ..peripherals.test_wishbone import WishboneInterfaceWrapper diff --git a/test/frontend/test_fetch.py b/test/frontend/test_fetch.py index 61fd6b137..b1e84ee25 100644 --- a/test/frontend/test_fetch.py +++ b/test/frontend/test_fetch.py @@ -11,7 +11,7 @@ from transactron.core import Method from transactron.lib import AdapterTrans, Adapter, BasicFifo -from transactron.testing.sugar import MethodMock +from transactron.testing.method_mock import MethodMock from transactron.utils import ModuleConnector from transactron.testing import ( TestCaseWithSimulator, diff --git a/test/func_blocks/lsu/test_dummylsu.py b/test/func_blocks/lsu/test_dummylsu.py index 3facbaceb..678739967 100644 --- a/test/func_blocks/lsu/test_dummylsu.py +++ b/test/func_blocks/lsu/test_dummylsu.py @@ -4,7 +4,7 @@ from amaranth_types.types import TestbenchContext from transactron.lib import Adapter -from transactron.testing.sugar import MethodMock +from transactron.testing.method_mock import MethodMock from transactron.utils import int_to_signed, signed_to_int from coreblocks.params import GenParams from coreblocks.func_blocks.fu.lsu.dummyLsu import LSUDummy diff --git a/test/func_blocks/lsu/test_pma.py b/test/func_blocks/lsu/test_pma.py index dee6d477c..aaa8b2df2 100644 --- a/test/func_blocks/lsu/test_pma.py +++ b/test/func_blocks/lsu/test_pma.py @@ -8,7 +8,7 @@ from coreblocks.params.configurations import test_core_config from coreblocks.arch import * from coreblocks.interface.keys import CoreStateKey, ExceptionReportKey, InstructionPrecommitKey -from transactron.testing.sugar import MethodMock +from transactron.testing.method_mock import MethodMock from transactron.utils.dependencies import DependencyContext from coreblocks.interface.layouts import ExceptionRegisterLayouts, RetirementLayouts from coreblocks.peripherals.wishbone import * diff --git a/test/scheduler/test_rs_selection.py b/test/scheduler/test_rs_selection.py index b92564fc0..7c3541d32 100644 --- a/test/scheduler/test_rs_selection.py +++ b/test/scheduler/test_rs_selection.py @@ -13,7 +13,7 @@ from transactron.lib import FIFO, Adapter, AdapterTrans from transactron.testing import TestCaseWithSimulator, TestbenchIO from transactron.testing.functions import data_const_to_dict -from transactron.testing.sugar import MethodMock, async_def_method_mock +from transactron.testing.method_mock import MethodMock, async_def_method_mock _rs1_optypes = {OpType.ARITHMETIC, OpType.COMPARE} _rs2_optypes = {OpType.LOGIC, OpType.COMPARE} diff --git a/test/scheduler/test_scheduler.py b/test/scheduler/test_scheduler.py index 36b309315..942448258 100644 --- a/test/scheduler/test_scheduler.py +++ b/test/scheduler/test_scheduler.py @@ -12,7 +12,7 @@ from transactron.core import Method from transactron.lib import FIFO, AdapterTrans, Adapter from transactron.testing.functions import MethodData, data_const_to_dict -from transactron.testing.sugar import MethodMock +from transactron.testing.method_mock import MethodMock from transactron.utils.dependencies import DependencyContext from coreblocks.scheduler.scheduler import Scheduler from coreblocks.core_structs.rf import RegisterFile diff --git a/test/transactron/lib/test_transaction_lib.py b/test/transactron/lib/test_transaction_lib.py index 0ef47fc6e..61b2ac619 100644 --- a/test/transactron/lib/test_transaction_lib.py +++ b/test/transactron/lib/test_transaction_lib.py @@ -11,7 +11,7 @@ from amaranth import * from transactron import * from transactron.lib import * -from transactron.testing.sugar import MethodMock +from transactron.testing.method_mock import MethodMock from transactron.testing.testbenchio import CallTrigger from transactron.utils._typing import ModuleLike, MethodStruct, RecordDict from transactron.utils import ModuleConnector diff --git a/test/transactron/test_simultaneous.py b/test/transactron/test_simultaneous.py index 066e7f591..62b633af7 100644 --- a/test/transactron/test_simultaneous.py +++ b/test/transactron/test_simultaneous.py @@ -4,7 +4,7 @@ from typing import Optional from amaranth import * from amaranth.sim import * -from transactron.testing.sugar import MethodMock, async_def_method_mock +from transactron.testing.method_mock import MethodMock, async_def_method_mock from transactron.testing.testbenchio import TestbenchIO from transactron.utils import ModuleConnector diff --git a/test/transactron/testing/test_validate_arguments.py b/test/transactron/testing/test_validate_arguments.py index 0f89286c5..a5acc47f7 100644 --- a/test/transactron/testing/test_validate_arguments.py +++ b/test/transactron/testing/test_validate_arguments.py @@ -6,7 +6,7 @@ from transactron.testing import TestCaseWithSimulator, TestbenchIO, data_layout from transactron import * -from transactron.testing.sugar import async_def_method_mock +from transactron.testing.method_mock import async_def_method_mock from transactron.lib import * from transactron.testing.testbenchio import CallTrigger diff --git a/transactron/testing/__init__.py b/transactron/testing/__init__.py index 9ed7265b1..57adb39b5 100644 --- a/transactron/testing/__init__.py +++ b/transactron/testing/__init__.py @@ -3,7 +3,7 @@ from .input_generation import * # noqa: F401 from .functions import * # noqa: F401 from .infrastructure import * # noqa: F401 -from .sugar import * # noqa: F401 +from .method_mock import * # noqa: F401 from .testbenchio import * # noqa: F401 from .profiler import * # noqa: F401 from .logging import * # noqa: F401 diff --git a/transactron/testing/infrastructure.py b/transactron/testing/infrastructure.py index 28fd9adcd..83530033d 100644 --- a/transactron/testing/infrastructure.py +++ b/transactron/testing/infrastructure.py @@ -17,12 +17,12 @@ from .logging import make_logging_process, parse_logging_level, _LogFormatter from .tick_count import make_tick_count_process from .gtkw_extension import write_vcd_ext +from .method_mock import MethodMock from transactron import Method from transactron.lib import AdapterTrans from transactron.core.keys import TransactionManagerKey from transactron.core import TransactionModule from transactron.utils import ModuleConnector, HasElaborate, auto_debug_signals, HasDebugSignals -from transactron.testing.sugar import MethodMock __all__ = ["SimpleTestCircuit", "PysimSimulator", "TestCaseWithSimulator"] diff --git a/transactron/testing/sugar.py b/transactron/testing/method_mock.py similarity index 100% rename from transactron/testing/sugar.py rename to transactron/testing/method_mock.py