On Sep 16, 2008, at 7:25 PM, Doug Latornell wrote:

>
> Over on the TurboGears list a TG2 user pointed out a problem that
> arises when nosetests --with-coverage is run on a project with a
> sqlalchemy identity model: 
> http://groups.google.com/group/turbogears/t/7fd3639a5a4d4b8c
>
> I dug into it and have reproduced the problem outside of TurboGears 2
> and without nose: http://paste.turbogears.org/paste/7051
>
> I've also shown that the problem isn't there for a plain Python
> property (in contrast to a sqlalchemy
> synonym): http://paste.turbogears.org/paste/7052
>
> So, it looks like a problem maybe with the metaclass that sqlalchemy
> uses to build properties, or with coverage not understanding what that
> metaclass produces, or something.  Or is there something else I'm
> missing?
>

I've seen this identical issue with Bitten, and its not a SQLAlchemy  
one.

Here's the ticket:  http://www.sqlalchemy.org/trac/ticket/1138

Replace your test case with this script:

def foo(somearg):
     class Bar(object):
         def __getattr__(self, attribute):
             return getattr(somearg, attribute)

     assert 'somearg' not in Bar.__dict__

foo('hi')

I just ran it with the "coverage.py" that we have in SQLAlchemy and  
the bug reproduces.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to