23 lines
585 B
Python
23 lines
585 B
Python
"""项目骨架冒烟测试(T-001)。
|
|||
|
|
|
||
|
|
确保最小入口可导入、可运行,为后续任务提供可运行的测试基线。
|
||
|
|
"""
|
||
|
|
import unittest
|
||
|
|
|
||
|
|
from src.main import APP_NAME, APP_VERSION, main
|
||
|
|
|
||
|
|
|
||
|
|
class SmokeTest(unittest.TestCase):
|
||
|
|
def test_main_returns_zero(self):
|
||
|
|
"""最小入口应正常返回退出码 0。"""
|
||
|
|
self.assertEqual(main(), 0)
|
||
|
|
|
||
|
|
def test_app_metadata_present(self):
|
||
|
|
"""应用名与版本号不应为空。"""
|
||
|
|
self.assertTrue(APP_NAME)
|
||
|
|
self.assertTrue(APP_VERSION)
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
unittest.main()
|