diff --git a/PowerEditor/Test/FunctionList/python/unitTest b/PowerEditor/Test/FunctionList/python/unitTest index 1fd6e5ce..bd36ab50 100644 --- a/PowerEditor/Test/FunctionList/python/unitTest +++ b/PowerEditor/Test/FunctionList/python/unitTest @@ -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 \ No newline at end of file + break diff --git a/PowerEditor/Test/FunctionList/python/unitTest.expected.result b/PowerEditor/Test/FunctionList/python/unitTest.expected.result index 6e1c5822..b26b7f38 100644 --- a/PowerEditor/Test/FunctionList/python/unitTest.expected.result +++ b/PowerEditor/Test/FunctionList/python/unitTest.expected.result @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file