Will Taylor
Will Taylor

Reputation: 2304

How does one get pdb.trace() working in unittest?

I am running commands such as:

python3 -m unittest -v -b core.tests.tests.TestApplication.test_name

This freezes whenever it gets to import pdb(), pdb.set_trace().

Is there a way I can modify the code so that we can use debugger?

Upvotes: 1

Views: 695

Answers (1)

Will Taylor
Will Taylor

Reputation: 2304

The solution is to remove -b, which buffers the string output.

Upvotes: 1

Related Questions