Add more unit tests for Function List of Python

This commit is contained in:
Don Ho 2024-02-07 22:30:55 +01:00
parent e600c35ad2
commit 0d05dae4ba
2 changed files with 11 additions and 2 deletions

View File

@ -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

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)"],"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"}