unittest inconsistent

André andre.roberge at gmail.com
Wed Jan 6 02:57:53 CET 2010

On Jan 5, 8:14 pm, Matt Haggard <haggar... at gmail.com> wrote:
> Can anyone tell me why this test fails?
> http://pastebin.com/f20039b17
> This is a minimal example of a much more complex thing I'm trying to
> do.  I'm trying to hijack a function and inspect the args passed to it
> by another function.
> The reason the 'Tester' object has no attribute 'arg1' is because
> "self" still refers to the object made for testA.

Quick answer: change faketest.py as follows:

# faketest.py

#from importme import render
import importme

def run(somearg):
    return importme.render(somearg)

A long answer, with explanation, will cost you twice as much ;-)
(but will have to wait)


More information about the Python-list mailing list