我试图在PyCharm中运行我的单元测试,其中我的工作区是一个符号链接(通过ln -s)。我一直得到以下输出:
Testing started at 17:50 ...<HOME>/.virtualenvs/venv/bin/python <PYCHARM>/helpers/pycharm/_jb_unittest_runner.py --path <PROJECT_ACTUAL_DIR>/module
我们捕获了几个不同的异常,并根据捕获的异常来表现不同。但是当我运行我的单元测试时------------------------------TypeError: catching classes that do not inherit from BaseException is not allowed
我试图更改我修补到BaseException的异常我对unittest.mock.patc