fix another goof
@@ -23,6 +23,8 @@ print(
' '.join(str(i) for i in l2),
)
+
+def test():
try:
prog = subprocess.Popen(
['./submission/linkedList'] + [str(i) for i in l1] + [','] + [str(i) for i in l2],
@@ -32,18 +34,15 @@ try:
prog.wait()
stdout, err = prog.communicate()
stdout = stdout.decode().split('\n')
-
print('output lines parsed:', stdout)
-
ans = [line.startswith(expected) for line in stdout]
if any(ans):
print('expected result was found')
- save_results(
+ return save_results(
'test-1',
['expected result was found'],
True
)
- exit(0)
except:
pass
@@ -52,3 +51,5 @@ save_results(
['expected result was not found'],
False
)
+
+test()
