Python unittesting method call issue

Chris Angelico rosuav at gmail.com
Sun Sep 28 01:42:35 CEST 2014


On Sun, Sep 28, 2014 at 9:25 AM, Milson Munakami <milsonmun at 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



More information about the Python-list mailing list