[py-dev] newbie crash, no attribute 'getimportname', rev 29094

holger krekel hpk at trillke.net
Thu Jun 22 09:35:22 CEST 2006


Hi George, 

On Wed, Jun 21, 2006 at 14:02 -0400, George Young wrote:
> [python 2.4.1, py "Checked out revision 29094"]
> {first time user of py.test}
> 
> I just fetched revision 29094.  I did [as root] 
>   python  ./setup.py build
>   python  ./setup.py install
> All seemed well.
> 
> Then cat >foo.py
> def test_h():
>      h = 0
>      assert h == 1
> 
> and 
>   py.test foo.py
> 
> I get:
> Traceback (most recent call last):

I did a bit of investigation - is it so that your test_foo.py 
resides in a directory with many more files/directories in it? 
Does the problem persist if you put test_foo.py in a clean 
new directory?  

I think there is a somewhat intricate problem with the 
"auto detection" of test modules and directories which 
can result to your prescribed problem (i could reproduce
it and putting test_foo.py in a separate directory resolved
it - no real solution but hopefully it helps already enough
for your case). 

best, 

    holger


More information about the py-dev mailing list