Thread: [Modeling-users] Run some test
Status: Abandoned
Brought to you by:
sbigaret
From: Ernesto R. <er...@si...> - 2004-03-17 01:47:49
|
Hi, when I run: python test_EditingContext_optimistic_locking.py -d SQLite with Python 2.2 and ZODB installed, I get: Traceback (most recent call last): File "test_EditingContext_optimistic_locking.py", line 410, in ? errs =3D main(sys.argv) File "test_EditingContext_optimistic_locking.py", line 392, in main utils.enable_model_cache_and_compute() File "utils.py", line 139, in enable_model_cache_and_compute m.cacheSimpleMethods() File "C:\DOCUME~1\Erny\ESCRIT~1\Modeling\PROJEC~1\Modeling\Model.py", = line 283 , in cacheSimpleMethods cache_simple_methods(a) File "C:\DOCUME~1\Erny\ESCRIT~1\Modeling\PROJEC~1\Modeling\utils.py", = line 235 , in cache_simple_methods cached_m=3Dinstancemethod(l, anInstance, anInstance.__class__) TypeError: instancemethod() argument 3 must be class, not ExtensionClass Trying to display a message whenever a method cannot be cached, it seems = that ever attribute of a class is an extension class. No idea how I can = turn off ExtensionClasses. On the other hand, may be some test assertios should be updated: with 'python run.py' I get (see ???): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR: [Relationship] __eq__ and __ne__ ---------------------------------------------------------------------- Traceback (most recent call last): File "test_Relationship.py", line 64, in test_00_equality_n_inequality rel_abb=3Dcopy.copy(rel_ab) # same, different id() File "C:\prg\PYTHON22\lib\copy.py", line 84, in copy y =3D _reconstruct(x, reductor(), 0) File "C:\prg\PYTHON22\lib\copy.py", line 295, in _reconstruct y =3D callable(*args) TypeError: ExtensionClass object argument after * must be a sequence # ??? Again extension classes??? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAIL: [SQLExpression] = prepareSelectExpressionWithAttributes/KeyValueQualifier ---------------------------------------------------------------------- Traceback (most recent call last): File "test_SQLExpression.py", line 170, in = test_06_prepareSelectExpressionWith Attributes_01 "SELECT DISTINCT t0.id, t0.title, t0.PRICE, t0.FK_WRITER_ID FROM = BOOK t0 INN ER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=3Dt2.ID ) = ON t0.FK_W RITER_ID=3Dt1.ID WHERE t2.LAST_NAME =3D 'Rabelais'") File "C:\prg\PYTHON22\lib\unittest.py", line 286, in failUnlessEqual raise self.failureException, \ AssertionError: "SELECT DISTINCT t0.id, t0.title, t0.FK_WRITER_ID, = t0.PRICE FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON = t1.FK_WRITER_ID=3Dt2.ID ) ON t0.FK_WRITER_ID=3Dt1.ID WHERE t2.LAST_NAME =3D 'Rabelais'" !=3D = "SELECT DISTINCT t0.id, t0.title, t0.PRICE, t0.FK_WRITER_ID FROM BOOK t0 INNER JOIN ( = WRITER t1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=3Dt2.ID ) ON = t0.FK_WRITER_ID=3Dt1.ID WHERE t2.LAST_NAME =3D 'Rabelais'" # ???: t0.PRICE and to.FK_WRITER_ID may be switched. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAIL: [SQLExpression] = prepareSelectExpressionWithAttributes/KeyComparisonQualifi er ---------------------------------------------------------------------- Traceback (most recent call last): File "test_SQLExpression.py", line 193, in = test_07_prepareSelectExpressionWith Attributes_02 "SELECT DISTINCT t0.id, t0.title, t0.PRICE, t0.FK_WRITER_ID FROM = BOOK t0 INN ER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=3Dt2.ID ) = ON t0.FK_W RITER_ID=3Dt1.ID WHERE t2.LAST_NAME =3D t1.LAST_NAME") File "C:\prg\PYTHON22\lib\unittest.py", line 286, in failUnlessEqual raise self.failureException, \ AssertionError: 'SELECT DISTINCT t0.id, t0.title, t0.FK_WRITER_ID, = t0.PRICE FROM BOOK t0 INNER JOIN ( WRITER t1 INNER JOIN WRITER t2 ON = t1.FK_WRITER_ID=3Dt2.ID ) ON t0.FK_WRITER_ID=3Dt1.ID WHERE t2.LAST_NAME =3D t1.LAST_NAME' !=3D = 'SELECT DISTINC T t0.id, t0.title, t0.PRICE, t0.FK_WRITER_ID FROM BOOK t0 INNER JOIN ( = WRITER t 1 INNER JOIN WRITER t2 ON t1.FK_WRITER_ID=3Dt2.ID ) ON = t0.FK_WRITER_ID=3Dt1.ID WHER E t2.LAST_NAME =3D t1.LAST_NAME' # ???: t0.PRICE and to.FK_WRITER_ID may be switched. ---------------------------------------------------------------------- Ran 113 tests in 8.953s FAILED (failures=3D2, errors=3D1) 'Errors' indicate exceptions other than AssertionError. 'Failures' indicate AssertionError 1 errors, 2 failures Thanx, Erny |
From: Sebastien B. <sbi...@us...> - 2004-03-17 07:20:58
|
"Ernesto Revilla" <er...@si...> wrote: > Hi, >=20 > when I run: > python test_EditingContext_optimistic_locking.py -d SQLite > with Python 2.2 and ZODB installed, >=20 > I get: > Traceback (most recent call last): > File "test_EditingContext_optimistic_locking.py", line 410, in ? > errs =3D main(sys.argv) > File "test_EditingContext_optimistic_locking.py", line 392, in main > utils.enable_model_cache_and_compute() [...] > TypeError: instancemethod() argument 3 must be class, not ExtensionClass >=20 > Trying to display a message whenever a method cannot be cached, it seems > that ever attribute of a class is an extension class. No idea how I can t= urn > off ExtensionClasses. Entity, Attribute, etc. inherit from ZODB.Persistent, when available, for models to be persistent in the ZModeler --this is the source of the pb. Until a better solution is found, I've attached a patch for disabling this (see below short patch for MDL/utils.py). > On the other hand, may be some test assertios should be updated: > with 'python run.py' I get (see ???): [...] Got them on my side too, I do not know why I didn't get them at release time. i'll look closer at that probably tonight (same for the loop happening when spark is not there which you reported in your next post). Thanks for reporting! -- S=E9bastien. Index: utils.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/modeling/ProjectModeling/Modeling/utils.py,v retrieving revision 1.20 diff -u -r1.20 utils.py --- utils.py 22 Feb 2004 17:31:38 -0000 1.20 +++ utils.py 17 Mar 2004 07:06:38 -0000 @@ -57,12 +57,7 @@ class base_object : pass newclass =3D 0 =20 -try: - import ZODB - from Persistence import Persistent - base_persistent_object=3DPersistent -except: - base_persistent_object=3Dbase_object +base_persistent_object=3Dbase_object =20 _validFirstLetter =3D "_"+string.letters =20 |
From: Ernesto R. <er...@si...> - 2004-03-17 20:34:57
|
Hi, today I ran the oprimistic locking test suite, but I ran in trouble with = the sqlite adaptor, so I filled out some bug reports. Thanx for the = patches. I'll see if I can add more test cases soon. Best regards, Erny ----- Original Message -----=20 From: "Sebastien Bigaret" <sbi...@us...> To: "modeling-users" <mod...@li...> Sent: Wednesday, March 17, 2004 8:20 AM Subject: Re: [Modeling-users] Run some test "Ernesto Revilla" <er...@si...> wrote: > Hi, >=20 > when I run: > python test_EditingContext_optimistic_locking.py -d SQLite > with Python 2.2 and ZODB installed, >=20 > I get: > Traceback (most recent call last): > File "test_EditingContext_optimistic_locking.py", line 410, in ? > errs =3D main(sys.argv) > File "test_EditingContext_optimistic_locking.py", line 392, in main > utils.enable_model_cache_and_compute() [...] > TypeError: instancemethod() argument 3 must be class, not = ExtensionClass >=20 > Trying to display a message whenever a method cannot be cached, it = seems > that ever attribute of a class is an extension class. No idea how I = can turn > off ExtensionClasses. Entity, Attribute, etc. inherit from ZODB.Persistent, when available, for models to be persistent in the ZModeler --this is the source of the pb. Until a better solution is found, I've attached a patch for disabling this (see below short patch for MDL/utils.py). > On the other hand, may be some test assertios should be updated: > with 'python run.py' I get (see ???): [...] Got them on my side too, I do not know why I didn't get them at release time. i'll look closer at that probably tonight (same for the loop happening when spark is not there which you reported in your next post). Thanks for reporting! -- S=E9bastien. Index: utils.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/modeling/ProjectModeling/Modeling/utils.py,v retrieving revision 1.20 diff -u -r1.20 utils.py --- utils.py 22 Feb 2004 17:31:38 -0000 1.20 +++ utils.py 17 Mar 2004 07:06:38 -0000 @@ -57,12 +57,7 @@ class base_object : pass newclass =3D 0 =20 -try: - import ZODB - from Persistence import Persistent - base_persistent_object=3DPersistent -except: - base_persistent_object=3Dbase_object +base_persistent_object=3Dbase_object =20 _validFirstLetter =3D "_"+string.letters =20 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick _______________________________________________ Modeling-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/modeling-users |