On Thu, Aug 25, 2005 at 04:50:19PM -0300, Evandro Vale Miquelito wrote:
> The error occurs in line 109.
For me the error is much earlier:
> def test_foreign_keys(obj):
Functions named "test_*" are tests, byt py.test requires them to not to
have parameters. I renamed it to _test_foreign_keys(obj) to continue...
> def test_complex_inheritance():
> # ... but the same doesn't happen when trying do change a parent
> # class attribute.
> assert obj.dirty
Ah, I see. And I wonder why you need such a big and complex test suite.
The test case can be much simpler:
from sqlobject import StringCol
from sqlobject.inheritance import InheritableSQLObject
__connection__ = "sqlite:/:memory:?debug=1"
lazyUpdate = True
name = StringCol()
_inheritable = 0
p = Person(name="Person")
p.name = "P2"
e = Employee(name="Employee")
e.name = "E2"
The output is (truncated)
It seems lazyUpdate is incompatible with inheritance. And to make it
compatible one must do a big work - override all those _SO_setValue(),
Oleg Broytmann http://phd.pp.ru/ phd@...
Programmers don't die, they just GOSUB without RETURN.