8-python基础-软件调试技巧
调试技术
- 调试流程:单元测试->集成测试->交测试部
- 分类:
- 静态调试:
- 动态调试:
pdb调试
pycharm调试
-
run/debug模式
-
案例01.py
-
断点:程序的某一行,程序在debug模式下,遇到断点就会暂停
单元测试
01.py
def SayHello(name):
print("I want to say hello with your, {0}".format(name))
print("Hello, {0}".format(name))
print("Done...............")
if __name__ == "__main__":
print('***' * 10)
name = input("Please input your name: ")
print(SayHello(name=name) )
print('@@@' * 10)
# 测试案例