去掉依赖
This commit is contained in:
@@ -24,6 +24,14 @@ def _parse_platform_kit_min_version(skill_md_text: str) -> str:
|
||||
return m.group(1).strip()
|
||||
|
||||
|
||||
def _requirement_dependency_lines(req_text: str) -> list[str]:
|
||||
return [
|
||||
line.strip()
|
||||
for line in req_text.splitlines()
|
||||
if line.strip() and not line.strip().startswith("#")
|
||||
]
|
||||
|
||||
|
||||
class TestPlatformImportSource(unittest.TestCase):
|
||||
def test_jiangchang_skill_core_not_from_skill_scripts(self) -> None:
|
||||
scripts_dir = os.path.abspath(get_scripts_dir())
|
||||
@@ -89,7 +97,10 @@ class TestPlatformImportSource(unittest.TestCase):
|
||||
req_path = os.path.join(get_skill_root(), "requirements.txt")
|
||||
with open(req_path, encoding="utf-8") as f:
|
||||
req = f.read()
|
||||
self.assertIn("jiangchang-platform-kit>=1.0.11", req)
|
||||
dep_lines = _requirement_dependency_lines(req)
|
||||
dep_body = "\n".join(dep_lines).lower()
|
||||
self.assertNotIn("jiangchang-platform-kit", dep_body)
|
||||
self.assertNotIn("playwright", dep_body)
|
||||
|
||||
installed = metadata.version("jiangchang-platform-kit")
|
||||
self.assertTrue(
|
||||
|
||||
Reference in New Issue
Block a user