def test_file1_method1(capsys): main() out, err = capsys.readouterr() assert out == "hello word!\n" x = 5 y = 6 assert x + 1 == y, " test failed"
def test_answer(): assert app.main() == 'Hello World!'
#!/usr/bin/python # -*- coding: UTF-8 -*- from package.app import main main()
#!/usr/bin/env python # encoding: utf-8 ''' @Author : pentiumCM @Email : [email protected] @Software: PyCharm @File : __main__.py @Time : 2021/1/20 0:59 @desc : 控制项目路径的文件 ''' from package.app import main main()
def execute(): main()