Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8779

Re: Help for Python mock test suite needed

Path csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Barry Warsaw <barry@debian.org>
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 <s794R-1zw-9@gated-at.bofh.it> (permalink)
References <s5AVz-5B0-3@gated-at.bofh.it> <s5AVz-5B0-1@gated-at.bofh.it> <s5Kid-3N8-7@gated-at.bofh.it> <s5PBf-7sM-3@gated-at.bofh.it> <s5RMJ-mo-3@gated-at.bofh.it> <s5WW6-45C-1@gated-at.bofh.it> <s68Xg-3DL-19@gated-at.bofh.it> <s6mQx-3Wz-5@gated-at.bofh.it> <s6wGd-1PM-15@gated-at.bofh.it> <s77FM-wB-7@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Wed Aug 17 13:23:42 2016
Old-Return-Path <barry@debian.org>
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 <debian-python@lists.debian.org> archive/latest/14120
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
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

Show key headers only | View raw


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

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Help for Python mock test suite needed (Was: Any help with problem  of srst2 new versions tests suite failing to call bowtie2) Andreas Tille <andreas@an3as.eu> - 2016-08-13 08:50 +0200
  Re: Help for Python mock test suite needed (Was: Any help with problem of srst2 new versions tests suite failing to call bowtie2) Scott Kitterman <debian@kitterman.com> - 2016-08-13 18:50 +0200
    Re: Help for Python mock test suite needed (Was: Any help with  problem of srst2 new versions tests suite failing to call bowtie2) Andreas Tille <andreas@an3as.eu> - 2016-08-14 00:30 +0200
      Re: Help for Python mock test suite needed Ben Finney <ben+debian@benfinney.id.au> - 2016-08-14 02:50 +0200
        Re: Help for Python mock test suite needed Andreas Tille <andreas@an3as.eu> - 2016-08-14 08:20 +0200
          Re: Help for Python mock test suite needed Ben Finney <ben+debian@benfinney.id.au> - 2016-08-14 21:10 +0200
            Re: Help for Python mock test suite needed Andreas Tille <andreas@an3as.eu> - 2016-08-15 12:00 +0200
              Re: Help for Python mock test suite needed Ben Finney <ben+debian@benfinney.id.au> - 2016-08-15 22:30 +0200
                Re: Help for Python mock test suite needed Andreas Tille <andreas@an3as.eu> - 2016-08-17 14:00 +0200
                Re: Help for Python mock test suite needed Barry Warsaw <barry@debian.org> - 2016-08-17 15:30 +0200

csiph-web