Skip to content

Commit aa80a1f

Browse files
committed
Fix tests that were still importing chipflow_lib
1 parent 6ce21cb commit aa80a1f

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from io import StringIO
88
from unittest import mock
99

10-
from chipflow_lib import ChipFlowError
10+
from chipflow import ChipFlowError
1111
from chipflow.cli import run
1212
from chipflow.config_models import Config, ChipFlowConfig
1313

tests/test_init.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
from pathlib import Path
88
from unittest import mock
99

10-
from chipflow_lib import (
11-
ChipFlowError,
10+
from chipflow import ChipFlowError, ensure_chipflow_root
11+
from chipflow.cli import (
1212
_get_cls_by_reference,
13-
_ensure_chipflow_root,
14-
_parse_config
15-
)
13+
_parse_config)
14+
1615
from chipflow.config.parser import _parse_config_file
1716
from chipflow.config_models import Config, ChipFlowConfig
1817
# Process is not part of the public API, so we won't test it here
@@ -75,8 +74,8 @@ def test_ensure_chipflow_root_already_set(self):
7574
os.environ["CHIPFLOW_ROOT"] = "/test/path"
7675
sys.path = ["/some/other/path"]
7776

78-
_ensure_chipflow_root.root = None #type: ignore
79-
result = _ensure_chipflow_root()
77+
ensure_chipflow_root.root = None #type: ignore
78+
result = ensure_chipflow_root()
8079

8180
self.assertEqual(result, Path("/test/path"))
8281
self.assertIn("/test/path", sys.path)
@@ -85,10 +84,10 @@ def test_ensure_chipflow_root_not_set(self):
8584
"""Test _ensure_chipflow_root when CHIPFLOW_ROOT is not set"""
8685
if "CHIPFLOW_ROOT" in os.environ:
8786
del os.environ["CHIPFLOW_ROOT"]
88-
_ensure_chipflow_root.root = None #type: ignore
87+
ensure_chipflow_root.root = None #type: ignore
8988

9089
with mock.patch("os.getcwd", return_value="/mock/cwd"):
91-
result = _ensure_chipflow_root()
90+
result = ensure_chipflow_root()
9291

9392
self.assertEqual(result, Path("/mock/cwd"))
9493
self.assertEqual(os.environ["CHIPFLOW_ROOT"], "/mock/cwd")

0 commit comments

Comments
 (0)