spark: line counter snippet that counts Python lines in spark profile (9541 lines)
This commit is contained in:
1 parent
b21bb10c46
commit
9d28b36d52
1 file changed
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Verify the line counter snippet produces correct result."""
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
result = subprocess.run(
|
||||
['python3', '/root/.hermes/wizard-outputs/spark/line_counter_snippet.py', '/root/.hermes/profiles/spark/'],
|
||||
capture_output=True, text=True
|
||||
)
|
||||
output = result.stdout.strip()
|
||||
expected = "9541"
|
||||
if output == expected:
|
||||
print(f"VERIFIED: {output} lines counted")
|
||||
sys.exit(0)
|
||||
else:
|
||||
print(f"FAIL: got {output}, expected {expected}")
|
||||
sys.exit(1)
|
||||
Reference in new issue
Block a user