beam: guard module-level sys.exit in two test files so pytest collection succeeds

This commit is contained in:
beam authored and ledger committed 2026-10-29 08:33:58 +00:00
1 parent 37b9729cdb
commit ed208eb34b
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -50,4 +50,5 @@ for _ in range(2000):
check("randomized", ok)
print("ALL" if ok else "SOME FAILED")
sys.exit(0 if ok else 1)
if __name__ == "__main__":
sys.exit(0 if ok else 1)
+2 -2
View File
@@ -31,7 +31,7 @@ for e in errs:
try:
evaluate(e)
print("FAIL no error:", repr(e))
sys.exit(1)
raise AssertionError("test failed")
except ValueError:
print("ERR-OK", repr(e))
@@ -39,7 +39,7 @@ for e in errs:
for bad in ["__builtins__", "eval('1')", "().__class__"]:
try:
evaluate(bad)
print("FAIL no error:", repr(bad)); sys.exit(1)
print("FAIL no error:", repr(bad)); raise AssertionError("test failed")
except ValueError:
print("INJ-OK", repr(bad))