Skip to content

Hints and tips for testing and debugging

Nigel Megitt edited this page Jun 26, 2017 · 1 revision

Hints and tips for testing and debugging

Just running that one test you're interested in

You can run just the tests you want by telling py.test where to start, for example:

py.test ebu_tt_live/twisted/test/test_twisted_websocket.py 

Debugging failed tests

You can make py.test drop into the debugger at the point when an assertion is thrown, so you can inspect the state manually at that point, by including --pdb, for example:

py.test --pdb ebu_tt_live/twisted/test/test_twisted_websocket.py