1、import pytest
2、import unittest
参考:
unittest测试
https://www.cnblogs.com/zln1021/p/6964239.html
pytest测试框架
https://www.jianshu.com/p/a754e3d47671
form与import的用法,与es6中的form,imoprt不一样
对于python
以调用自定义的类来说
class Triangle(object):
def __init__(self):
super().__init__()
def triangle(self, a, b, c) :
if ((a + b) > c)