Release v1.0.10: shared media_assets and screencast media_assets_root override
All checks were successful
Publish Python Package to Gitea / publish (push) Successful in 17s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-06 10:32:35 +08:00
parent aab0207aec
commit 434a405e19
14 changed files with 949 additions and 114 deletions

View File

@@ -81,6 +81,27 @@ class TestConfig(unittest.TestCase):
self.assertEqual(config.get_float("BAD", 9.9), 9.9)
self.assertEqual(config.get_int("BAD", 7), 7)
def test_merge_missing_env_keys_appends_only_new(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
example = os.path.join(tmp, ".env.example")
dest = os.path.join(tmp, ".env")
with open(example, "w", encoding="utf-8") as f:
f.write("EXISTING=1\nNEW_KEY=abc\n")
with open(dest, "w", encoding="utf-8") as f:
f.write("EXISTING=keep\n")
added = config.merge_missing_env_keys(
example,
dest,
comment_skill="demo-skill",
)
self.assertEqual(added, ["NEW_KEY"])
with open(dest, encoding="utf-8") as f:
content = f.read()
self.assertIn("EXISTING=keep", content)
self.assertIn("NEW_KEY=abc", content)
self.assertIn("Added by demo-skill", content)
if __name__ == "__main__":
unittest.main()