Using unittest.mock to patch input() in Python 3

后端 未结 4 1272
说谎
说谎 2020-12-06 05:03

How do you use the @patch decorator to patch the built-in input() function?

For example, here\'s a function in question.py that I\'d like to test, which contains a c

4条回答
提交回复
热议问题