MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / idx773_write_py_repo

Function idx773_write_py_repo

tests/test_mcp.c:22187–22209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22185
22186#ifndef _WIN32
22187static void idx773_write_py_repo(const char *dir, int files, int variant) {
22188 for (int i = 0; i < files; i++) {
22189 char path[CBM_SZ_512];
22190 snprintf(path, sizeof(path), "%s/mod_%d_%03d.py", dir, variant, i);
22191 FILE *f = fopen(path, "w");
22192 if (!f) {
22193 continue;
22194 }
22195 fprintf(f,
22196 "class Handler%d:\n"
22197 " def run(self, x):\n"
22198 " return self.helper(x) + %d\n"
22199 " def helper(self, x):\n"
22200 " for i in range(10):\n"
22201 " x += i\n"
22202 " return x\n"
22203 "\n"
22204 "def main_%d(x):\n"
22205 " return Handler%d().run(x)\n",
22206 i, i, i, i);
22207 fclose(f);
22208 }
22209}
22210
22211static int idx773_double_index_check(const char *dir_a, const char *dir_b) {
22212 cbm_setenv("CBM_INDEX_SUPERVISOR", "0", 1);

Callers 1

test_mcp.cFile · 0.85

Calls 1

fopenFunction · 0.85

Tested by

no test coverage detected