Update python unit-tests files
This commit is contained in:
parent
303874fee0
commit
fad747300a
|
@ -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
|
from __future__ import print_function
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -277,4 +302,4 @@ def krusk(E_and_n):
|
||||||
break
|
break
|
||||||
s[j].update(s[i])
|
s[j].update(s[i])
|
||||||
s.pop(i)
|
s.pop(i)
|
||||||
break
|
break
|
||||||
|
|
|
@ -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"}
|
Loading…
Reference in New Issue