17 lines
737 B
Python
17 lines
737 B
Python
import json
|
|
import unittest
|
|
|
|
from test_python_floor import ROOT
|
|
|
|
|
|
class Install(unittest.TestCase):
|
|
def test_the_readme_adds_each_settings_marketplace_and_installs_every_enabled_plugin(self):
|
|
settings = json.loads((ROOT / "settings.json").read_text(encoding="utf-8"))
|
|
readme = (ROOT / "README.md").read_text(encoding="utf-8")
|
|
for plugin, enabled in settings["enabledPlugins"].items():
|
|
if enabled:
|
|
self.assertIn(f"claude plugin install {plugin}\n", readme)
|
|
# settings.json declares the marketplace, or `claude plugin marketplace add` writes it there.
|
|
marketplace = settings["extraKnownMarketplaces"][plugin.split("@")[1]]["source"]["repo"]
|
|
self.assertIn(f"claude plugin marketplace add {marketplace}\n", readme)
|