Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个Django单元测试,我想将打印语句放入其中以进行调试,但显然 django 正在抑制它们。我还能如何打印变量的值?我也许可以用断言等来破解,但想知道人们是如何做到这一点的。
你可以增加详细程度-v 3
-v 3
只需使用 assert* 方法:
self.assertEqual("the valule you want to know", 0)