Skip to content

Commit f4da187

Browse files
committed
fix macos issues
1 parent b4d2ce3 commit f4da187

File tree

3 files changed

+8
-19
lines changed

3 files changed

+8
-19
lines changed

simulation_bridge/test/integration/test_integration.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# pylint: disable=too-many-public-methods,unused-argument,protected-access
1111

1212

13-
class MockBridgeCore: # pylint: disable=too-few-public-methods
13+
class MockBridgeCore: # pylint: disable=too-few-public-methods
1414
"""Mock BridgeCore for testing."""
1515

1616
def __init__(self, config_manager, adapters):
@@ -122,7 +122,7 @@ def create_orchestrator_mock(self):
122122
mock_protocol_config = self.mock_protocol_config
123123
adapter_classes = self.adapter_classes
124124

125-
class MockBridgeOrchestrator: # pylint: disable=too-few-public-methods,too-many-instance-attributes
125+
class MockBridgeOrchestrator: # pylint: disable=too-few-public-methods,too-many-instance-attributes
126126
"""Mock BridgeOrchestrator with simplified setup and lifecycle."""
127127

128128
def __init__(self, config_path=None):
@@ -160,7 +160,8 @@ def setup_interfaces(self):
160160
MockSignalManager.connect_all_signals()
161161

162162
except Exception as exc:
163-
raise RuntimeError(f"Error setting up interfaces: {exc}") from exc
163+
raise RuntimeError(
164+
f"Error setting up interfaces: {exc}") from exc
164165

165166
def start(self):
166167
"""Start all adapters and mark running state."""
@@ -245,7 +246,8 @@ def test_setup_interfaces_raises_on_adapter_failure(self):
245246
orchestrator = BridgeOrchestrator(self.config_path)
246247

247248
def failing_adapter(config_manager):
248-
raise Exception("Adapter initialization failed") # pylint: disable=broad-exception-raised
249+
raise Exception(
250+
"Adapter initialization failed") # pylint: disable=broad-exception-raised
249251

250252
orchestrator.adapter_classes["mqtt"] = failing_adapter
251253

simulation_bridge/test/unit/test_bridge_orchestrator.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,6 @@ def test_setup_success(self, orchestrator):
7676
core_mock.return_value)
7777
signal_mock.connect_all_signals.assert_called_once()
7878

79-
def test_setup_with_no_enabled_protocols(self, orchestrator):
80-
"""Test setup when no protocols are enabled."""
81-
with patch(
82-
'simulation_bridge.src.core.bridge_orchestrator.RabbitMQInfrastructure'
83-
) as rabbit_mock, patch(
84-
'simulation_bridge.src.core.bridge_orchestrator.SignalManager'
85-
) as signal_mock:
86-
rabbit_instance = rabbit_mock.return_value
87-
rabbit_instance.setup.return_value = None
88-
89-
signal_mock.get_enabled_protocols.return_value = []
90-
orchestrator.setup_interfaces()
91-
rabbit_instance.setup.assert_called_once()
92-
9379
def test_setup_raises_exception(self, orchestrator):
9480
"""Test setup raises exception if infrastructure fails."""
9581
with patch(

simulation_bridge/test/unit/test_logger.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def test_mkdir_called_to_create_log_dir(self, mock_mkdir):
7171
mock_mkdir.assert_called_once_with(parents=True, exist_ok=True)
7272

7373
def test_rotating_file_handler_created_with_correct_args(
74-
self, mock_rotating_file_handler):
74+
self, mock_rotating_file_handler
75+
):
7576
"""Verify RotatingFileHandler is instantiated with expected parameters."""
7677
logger.setup_logger(log_file="logs/test.log", enable_console=False)
7778
mock_rotating_file_handler.assert_called_once_with(

0 commit comments

Comments
 (0)