MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / main

Function main

tools/spec-loop/tests/test_solo_spec_gate.py:208–228  ·  view source on GitHub ↗

Run all tests as a script (no pytest dependency).

()

Source from the content-addressed store, hash-verified

206
207
208def main() -> int:
209 """Run all tests as a script (no pytest dependency)."""
210 import tempfile
211 import traceback
212
213 tests = [v for k, v in globals().items() if k.startswith("test_") and callable(v)]
214 failures = 0
215 for fn in tests:
216 with tempfile.TemporaryDirectory() as tmp:
217 try:
218 fn(Path(tmp))
219 print(f" ok {fn.__name__}")
220 except Exception:
221 failures += 1
222 print(f"FAIL {fn.__name__}")
223 traceback.print_exc()
224 if failures:
225 print(f"\n{failures} failure(s)")
226 return 1
227 print(f"\n{len(tests)} passed")
228 return 0
229
230
231if __name__ == "__main__":

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected