Skip to content
Snippets Groups Projects
Commit e6eaa610 authored by tuhe's avatar tuhe
Browse files

Fixed test suite

parent 3c9b11c8
No related branches found
No related tags found
No related merge requests found
Pipeline #18445 passed
...@@ -5,7 +5,6 @@ class TreeNode(object): ...@@ -5,7 +5,6 @@ class TreeNode(object):
# TODO: 3 lines missing. # TODO: 3 lines missing.
raise NotImplementedError("Insert your solution and remove this error.") raise NotImplementedError("Insert your solution and remove this error.")
#!s=a
def sorted_array_to_bst(nums): def sorted_array_to_bst(nums):
# TODO: 4 lines missing. # TODO: 4 lines missing.
raise NotImplementedError("Your stuff here") raise NotImplementedError("Your stuff here")
...@@ -15,7 +14,6 @@ def sorted_array_to_bst(nums): ...@@ -15,7 +14,6 @@ def sorted_array_to_bst(nums):
raise NotImplementedError("Here") raise NotImplementedError("Here")
print("hello world asdfasd") print("hello world asdfasd")
#!o=a
def preOrder(node): def preOrder(node):
if not node: if not node:
# TODO: 1 lines missing. # TODO: 1 lines missing.
...@@ -25,21 +23,16 @@ def preOrder(node): ...@@ -25,21 +23,16 @@ def preOrder(node):
preOrder(node.right) preOrder(node.right)
for _ in range(10): for _ in range(10):
print("Hello world") print("Hello world")
#!o=a
a = 234 a = 234
result = sorted_array_to_bst([1, 2, 3, 4, 5, 6, 7]) result = sorted_array_to_bst([1, 2, 3, 4, 5, 6, 7])
preOrder(result) preOrder(result)
#!i=a
for _ in range(10): for _ in range(10):
print("hi") print("hi")
#!i=a
#!i=b
print("hello") print("hello")
def myfun(a): def myfun(a):
return a*2 return a*2
print(myfun(4)) print(myfun(4))
#!i=b
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
return node return node
print("hello world asdfasd") print("hello world asdfasd")
#!o=a
def preOrder(node): def preOrder(node):
if not node: if not node:
return return
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
return node return node
print("hello world asdfasd") print("hello world asdfasd")
#!o=a
def preOrder(node): def preOrder(node):
if not node: if not node:
return return
......
import os.path import os.path
import shutil import shutil
dir = os.path.dirname(__file__)
def setup(source, dest): def setup(source, dest):
...@@ -33,8 +34,8 @@ if __name__ == "__main__": ...@@ -33,8 +34,8 @@ if __name__ == "__main__":
# if not os.path.isdir("student_correct_output"): # if not os.path.isdir("student_correct_output"):
# os.mkdir("student_correct_output") # os.mkdir("student_correct_output")
for file in ['demo1']: for file in ['demo1']:
setup(file, file+"_correct") setup(dir+"/" + file, dir+"/" + file+"_correct")
setup_keep("demo2/framework.py", "demo2/framework_correct.txt") setup_keep(dir+"/demo2/framework.py", dir+"/demo2/framework_correct.txt")
a= 234 a= 234
# assert False # assert False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment