From 21b75f83aa4ea0f570e48f6676746722801320cd Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Thu, 11 Feb 2016 13:08:00 -0500 Subject: [PATCH] Copy this doc up from the bok_choy tests. It's just as relevant to unit tests and I wish I had seen it earlier. Stress the transient nature of this debugging step. --- docs/en_us/internal/testing.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/en_us/internal/testing.rst b/docs/en_us/internal/testing.rst index eb44b63912..250ad4292b 100644 --- a/docs/en_us/internal/testing.rst +++ b/docs/en_us/internal/testing.rst @@ -270,6 +270,14 @@ will drop you into pdb on error. This lets you go up and down the stack and see what the values of the variables are. Check out `the pdb documentation `__ +Use this command to put a temporary debugging breakpoint in a test. +If you check this in, your tests will hang on jenkins. + +:: + + from nose.tools import set_trace; set_trace() + + Note: More on the ``--failed`` functionality * In order to use this, you must run the tests first. If you haven't already @@ -407,7 +415,8 @@ test case method. During acceptance test execution, log files and also screenshots of failed tests are captured in test\_root/log. -Use this command to put a debugging breakpoint in a test. +Use this command to put a temporary debugging breakpoint in a test. +If you check this in, your tests will hang on jenkins. ::