MCPcopy Create free account
hub / github.com/cocoindex-io/cocoindex-code / test_remove_from_gitignore

Function test_remove_from_gitignore

tests/test_cli_helpers.py:126–134  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

124
125
126def test_remove_from_gitignore(tmp_path: Path) -> None:
127 gitignore = tmp_path / ".gitignore"
128 gitignore.write_text("*.pyc\n# CocoIndex Code (ccc)\n/.cocoindex_code/\n__pycache__/\n")
129 remove_from_gitignore(tmp_path)
130 content = gitignore.read_text()
131 assert "/.cocoindex_code/" not in content
132 assert "# CocoIndex Code (ccc)" not in content
133 assert "*.pyc" in content
134 assert "__pycache__/" in content
135
136
137def test_remove_from_gitignore_no_entry(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 1

remove_from_gitignoreFunction · 0.90

Tested by

no test coverage detected