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


Groups > comp.lang.python > #78422

Re: Python unittesting method call issue

References <eaf17169-25d1-4022-a8de-3b0d6fd9afb8@googlegroups.com>
Date 2014-09-28 09:42 +1000
Subject Re: Python unittesting method call issue
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14434.1411861358.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, Sep 28, 2014 at 9:25 AM, Milson Munakami <milsonmun@gmail.com> wrote:
> I am trying to set the precondition for the test first prior to test other test cases. But as you can see in my code the precondition print command is not fired! Can you explain the cause and solution how to fire the code with in that method i.e. SetPreConditionFirewall() with setup variable self.<variablename> in this fucntion. Here is my code:
>

The first thing to do is to cut down your code - for instance, what
happens if you remove the urlopen call and just have the print in
there? (And while you're at it, I think suite() is completely
superfluous.) You should be able to get your code down to being
identical to a working example, except for one difference, and then
you'll be able to either spot the issue yourself, or ask for very
specific help.

ChrisA

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Python unittesting method call issue Milson Munakami <milsonmun@gmail.com> - 2014-09-27 16:25 -0700
  Re: Python unittesting method call issue Chris Angelico <rosuav@gmail.com> - 2014-09-28 09:42 +1000
  Re: Python unittesting method call issue Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-27 18:27 -0600
  Re: Python unittesting method call issue Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-28 12:19 +1000
  Re: Python unittesting method call issue Milson Munakami <milsonmun@gmail.com> - 2014-10-02 08:30 -0700

csiph-web