import pathlib import sys import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) from git_repo import git from repo_checks.test_python_floor import ROOT from settings_filter import cleaned class Settings(unittest.TestCase): def test_the_stored_settings_hold_no_model_and_sorted_keys(self): # The index, not the working file: the working file holds this machine's model in Claude Code's key order. stored = git("show", ":settings.json", cwd=str(ROOT)) self.assertIsInstance(stored, str, stored) self.assertEqual(stored, cleaned(stored)) def test_the_readme_installs_the_filter_git_attributes_name(self): self.assertIn("settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8")) self.assertIn("git config filter.settings.clean bin/settings_filter.py\n", (ROOT / "README.md").read_text(encoding="utf-8"))