本人較懶,不喜歡廢話,直接上代碼,大家自己意會。
# author:閆振興
# contact: [email protected]
# datetime:2020/4/19 18:56
# software: PyCharm
"""
文件說明:
"""
#encoding:utf-8
class father():
def __init__(self):
print("我是爸爸A呀")
def father_way(self):
print("我是爸爸的方法:father_way")
# author:閆振興
# contact: [email protected]
# datetime:2020/4/19 18:56
# software: PyCharm
"""
文件說明:
"""
#encoding:utf-8
from 繼承.AA import father
class son(father):
def way(self):
print("我是兒子方法A")
# author:閆振興
# contact: [email protected]
# datetime:2020/4/19 18:56
# software: PyCharm
"""
文件說明:
"""
#encoding:utf-8
import unittest
import 繼承.BB as Son
class MyTestCase(unittest.TestCase):
def test_something(self):
son=Son.son()
son.way()
son.way()
son.way()
son.father_way()
self.assertEqual(True, True)
if __name__ == '__main__':
unittest.main()