TypeError: run() missing 1 required positional argument: ‘test’
import unittest
from app import BASE_DIR
suite = unittest.TestLoader().discover(BASE_DIR+'/case/','test_*.py')
unittest.TextTestRunner.run(suite)
TypeError: run() missing 1 required positional argument: 'test'
意思大概是run() 的时候缺少参数text。仔细检查和上网百度了之后发现runner = unittest.TextTestRunner初始化的时候没有加(),后修改为runner =unittest.TextTestRunner() ,运行正常。