beam: guard module-level sys.exit in two test files so pytest collection succeeds
This commit is contained in:
1 parent
37b9729cdb
commit
ed208eb34b
2 files changed
+4
-3
No files matched your search
@@ -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)
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in new issue
Block a user