Path: csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Barry Warsaw Newsgroups: linux.debian.maint.python Subject: Re: Help for Python mock test suite needed Date: Wed, 17 Aug 2016 15:30:02 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Aug 17 13:23:42 2016 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5 Organization: The Organization of Unorganized Woozalists X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailing-List: archive/latest/14120 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20160817092324.4c457913@subdivisions.wooz.org Approved: robomod@news.nic.it Lines: 26 Sender: robomod@news.nic.it X-Original-Date: Wed, 17 Aug 2016 09:23:24 -0400 X-Original-Message-ID: <20160817092324.4c457913@subdivisions.wooz.org> X-Original-References: <20160809213240.GA22935@an3as.eu> <20160813064034.GA22254@an3as.eu> <2201782.mV6MicLdnE@kitterma-e6430> <20160813222229.GI22254@an3as.eu> <85oa4wyyie.fsf@benfinney.id.au> <20160814061201.GL22254@an3as.eu> <85bn0vyy3f.fsf@benfinney.id.au> <20160815095545.GS22254@an3as.eu> <8537m5zsq8.fsf@benfinney.id.au> <20160817115804.GR4482@an3as.eu> Xref: csiph.com linux.debian.maint.python:8779 On Aug 17, 2016, at 01:58 PM, Andreas Tille wrote: >This exactly was my question: Is there any advise how to inject >sensible debugging code or any other strategies to find out what might >be the problem. > >> So you can use the full power of your development environment to hunt >> the problem: an interactive debugging session, etc. Use your Python >> skills :-) > >I'm afraid at first I need to enhance my Python skills ... pdb is debugging 101: https://docs.python.org/3/library/pdb.html Specifically, add this line to the code at the point where you want to start inspecting the state of the program: import pdb; pdb.set_trace() Now run the test suite and when you hit the breakpoint, you can print values, inspect object, step through calls, etc. It may or may not help you solve the problem, but you'll get a much better sense of what's actually going on, and it should at least improve the quality of an upstream bug report. Cheers, -Barry