Browse Source

Add more unit tests for Function List of Python

pull/14701/head
Don Ho 10 months ago
parent
commit
0d05dae4ba
  1. 9
      PowerEditor/Test/FunctionList/python/unitTest
  2. 2
      PowerEditor/Test/FunctionList/python/unitTest.expected.result

9
PowerEditor/Test/FunctionList/python/unitTest

@ -299,7 +299,16 @@ class SampleClassGood(object):
def __init__ (self, fileName):
self.fileName = fileName
def calculate_area(radius: float, pi: float = 3.14) -> float:
return pi * radius ** 2
async def greet(name: str) -> str:
return f"Hello, {name}!"
def add_numbers(a: int, b: int, c: int) -> int:
return a + b + c

2
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)"],"nodes":[{"leaves":["__init__ (self, fileName)"],"name":"SampleClassBad"},{"leaves":["__init__ (self, fileName)"],"name":"SampleClassGood"}],"root":"unitTest"}
{"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)","greet(name: str) -> str","add_numbers(a: int, b: int, c: int) -> int"],"nodes":[{"leaves":["__init__ (self, fileName)"],"name":"SampleClassBad"},{"leaves":["__init__ (self, fileName)","calculate_area(radius: float, pi: float = 3.14) -> float"],"name":"SampleClassGood"}],"root":"unitTest"}
Loading…
Cancel
Save