MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_graphifyignore_excludes_file

Function test_graphifyignore_excludes_file

tests/test_detect.py:99–113  ·  view source on GitHub ↗

Files matching .graphifyignore patterns are excluded from detect().

(tmp_path)

Source from the content-addressed store, hash-verified

97
98
99def test_graphifyignore_excludes_file(tmp_path):
100 """Files matching .graphifyignore patterns are excluded from detect()."""
101 (tmp_path / ".graphifyignore").write_text("vendor/\n*.generated.py\n")
102 vendor = tmp_path / "vendor"
103 vendor.mkdir()
104 (vendor / "lib.py").write_text("x = 1")
105 (tmp_path / "main.py").write_text("print('hi')")
106 (tmp_path / "schema.generated.py").write_text("x = 1")
107
108 result = detect(tmp_path)
109 file_list = result["files"]["code"]
110 assert any("main.py" in f for f in file_list)
111 assert not any("vendor" in f for f in file_list)
112 assert not any("generated" in f for f in file_list)
113 assert result["graphifyignore_patterns"] == 2
114
115
116def test_graphifyignore_missing_is_fine(tmp_path):

Callers

nothing calls this directly

Calls 1

detectFunction · 0.90

Tested by

no test coverage detected