Skip to content

Commit d8a869e

Browse files
committed
Fix test configs with required fields and valid process values
1 parent b18533f commit d8a869e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

tests/test_init.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest
55
import tempfile
66
from unittest import mock
7+
from pathlib import Path
78

89
import jsonschema
910
import pytest
@@ -135,5 +136,5 @@ def test_parse_config(self, mock_parse_config_file, mock_ensure_chipflow_root):
135136
config = _parse_config()
136137

137138
mock_ensure_chipflow_root.assert_called_once()
138-
mock_parse_config_file.assert_called_once_with("/mock/chipflow/root/chipflow.toml")
139+
mock_parse_config_file.assert_called_once_with(Path("/mock/chipflow/root/chipflow.toml"))
139140
self.assertEqual(config, {"chipflow": {"test": "value"}})

tests/test_pin_lock.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,11 @@ def test_lock_pins_new_lockfile(self, mock_lock_file, mock_package_defs,
223223
# Mock config
224224
mock_config = {
225225
"chipflow": {
226+
"steps": {
227+
"silicon": "chipflow_lib.steps.silicon:SiliconStep"
228+
},
226229
"silicon": {
230+
"process": "ihp_sg13g2",
227231
"package": "cf20",
228232
"pads": {
229233
"clk": {"type": "clock", "loc": "1"},
@@ -339,7 +343,11 @@ def test_lock_pins_with_existing_lockfile(self, mock_lock_file, mock_package_def
339343
# Mock config
340344
mock_config = {
341345
"chipflow": {
346+
"steps": {
347+
"silicon": "chipflow_lib.steps.silicon:SiliconStep"
348+
},
342349
"silicon": {
350+
"process": "ihp_sg13g2",
343351
"package": "cf20",
344352
"pads": {
345353
"clk": {"type": "clock", "loc": "1"},
@@ -452,7 +460,11 @@ def __init__(self):
452460
# Mock config
453461
mock_config = {
454462
"chipflow": {
463+
"steps": {
464+
"silicon": "chipflow_lib.steps.silicon:SiliconStep"
465+
},
455466
"silicon": {
467+
"process": "ihp_sg13g2",
456468
"package": "cf20",
457469
"pads": {
458470
"clk": {"type": "clock", "loc": "1"}, # This will be checked by check_pad
@@ -523,7 +535,11 @@ def test_lock_pins_reuse_existing_ports(self, mock_lock_file, mock_package_defs,
523535
# Mock config
524536
mock_config = {
525537
"chipflow": {
538+
"steps": {
539+
"silicon": "chipflow_lib.steps.silicon:SiliconStep"
540+
},
526541
"silicon": {
542+
"process": "ihp_sg13g2",
527543
"package": "cf20",
528544
"pads": {},
529545
"power": {}

0 commit comments

Comments
 (0)