Update python unit-tests files

This commit is contained in:
Don HO 2020-08-28 00:18:19 +02:00
parent 303874fee0
commit fad747300a
2 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,28 @@
INPUT_FILE_NAME = "example.txt"
class SampleClassBad (object):
# WrongClassName: this will appear in the function list
def __init__ (self, fileName):
self.fileName = fileName
class SampleClassGood(object):
# this works as expected: notice the missing space between
# the class name and the left parenthesis.
def __init__ (self, fileName):
self.fileName = fileName
def main():
sampleBad = SampleClassBad (INPUT_FILE_NAME)
sampleGood = SampleClassGood (INPUT_FILE_NAME)
if __name__ == '__main__':
main()
from __future__ import print_function
try:
@ -277,4 +302,4 @@ def krusk(E_and_n):
break
s[j].update(s[i])
s.pop(i)
break
break

View File

@ -1 +1 @@
{"leaves":["dfs(G, s)","bfs(G, s)","dijk(G, s)","topo(G, ind=None, Q=[1])","adjm()","floy(A_and_n)","prim(G, s)","edglist()","krusk(E_and_n)"],"root":"unitTest"}
{"leaves":["main()","dfs(G, s)","bfs(G, s)","dijk(G, s)","topo(G, ind=None, Q=[1])","adjm()","floy(A_and_n)","prim(G, s)","edglist()","krusk(E_and_n)"],"nodes":[{"leaves":["__init__ (self, fileName)"],"name":"SampleClassBad"},{"leaves":["__init__ (self, fileName)"],"name":"SampleClassGood"}],"root":"unitTest"}