Skip to content

Commit ba133a2

Browse files
robtaylorclaude
andcommitted
Fix lint issues in test files
- Remove whitespace from blank lines - Fix formatting according to project standards 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f081653 commit ba133a2

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tests/test_pin_lock.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ def test_allocate_pins_port(self):
165165

166166
# Check remaining pins
167167
self.assertEqual(remaining_pins, pins[3:])
168-
168+
169169
def test_allocate_pins_invalid_type(self):
170170
"""Test allocate_pins with an invalid member type"""
171171
# Create member data with an invalid type - not 'interface' or 'port'
172172
member_data = {
173173
"type": "invalid_type"
174174
}
175175
pins = ["pin1", "pin2", "pin3"]
176-
176+
177177
# This should cause the function to raise an AssertionError at the "assert False" line
178178
with self.assertRaises(AssertionError):
179179
allocate_pins("test_invalid", member_data, pins)
@@ -230,7 +230,7 @@ def test_lock_pins_no_pins_allocated(self, mock_lock_file, mock_package_defs,
230230

231231
# Setup mocks
232232
mock_exists.return_value = False # No existing pins.lock
233-
233+
234234
# Mock config
235235
mock_config = {
236236
"chipflow": {
@@ -277,7 +277,7 @@ def test_lock_pins_no_pins_allocated(self, mock_lock_file, mock_package_defs,
277277
lock_pins()
278278

279279
self.assertIn("No pins were allocated", str(cm.exception))
280-
280+
281281
@mock.patch("builtins.open", new_callable=mock.mock_open)
282282
@mock.patch("chipflow_lib.pin_lock._parse_config")
283283
@mock.patch("chipflow_lib.pin_lock.top_interfaces")
@@ -298,7 +298,7 @@ def test_lock_pins_interface_size_change(self, mock_lock_file, mock_package_defs
298298
# Setup mocks
299299
mock_exists.return_value = True # Existing pins.lock
300300
mock_read_text.return_value = '{"mock": "json"}'
301-
301+
302302
# Mock config
303303
mock_config = {
304304
"chipflow": {
@@ -319,12 +319,12 @@ def test_lock_pins_interface_size_change(self, mock_lock_file, mock_package_defs
319319
mock_old_lock = mock.MagicMock()
320320
mock_old_lock.package = mock.MagicMock()
321321
mock_old_lock.package.check_pad.return_value = None # No conflicts
322-
322+
323323
# Create a port map that will have a different size than the new interface
324324
existing_ports = {
325325
"tx": mock.MagicMock(pins=["10"]), # Only 1 pin
326326
}
327-
327+
328328
# Setup the port_map to return these ports
329329
mock_port_map = mock.MagicMock()
330330
mock_port_map.get_ports.return_value = existing_ports
@@ -617,7 +617,7 @@ def __init__(self):
617617
# Setup package
618618
mock_package = mock.MagicMock()
619619
mock_package.check_pad.return_value = MockConflictPort()
620-
620+
621621
# Configure mock for both dict and Pydantic model compatibility
622622
mock_old_lock.configure_mock(package=mock_package)
623623
mock_validate_json.return_value = mock_old_lock
@@ -685,11 +685,11 @@ def test_lock_pins_reuse_existing_ports(self, mock_lock_file, mock_package_defs,
685685

686686
# Mock LockFile instance for existing lock
687687
mock_old_lock = mock.MagicMock()
688-
688+
689689
# Setup package
690690
mock_package = mock.MagicMock()
691691
mock_package.check_pad.return_value = None # No conflicting pads
692-
692+
693693
# Configure mock for both dict and Pydantic model compatibility
694694
mock_old_lock.configure_mock(package=mock_package)
695695

tests/test_steps_silicon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ def test_elaborate(self, mock_top_interfaces):
483483
platform.pinlock.port_map = mock_port_map
484484
else:
485485
platform.pinlock.configure_mock(port_map=mock_port_map)
486-
486+
487487
platform.ports = {
488488
"test_port": mock.MagicMock(),
489489
"heartbeat": mock.MagicMock()

0 commit comments

Comments
 (0)