Re: [Modeling-users] install tests on 0.9pre11
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-07-30 17:14:04
|
Hi, Mario Ruggier <ma...@ru...> wrote: > Hi, >=20 > remember the tests/README file? I just followed that sequence, > and, get this for these two steps: >=20 > ... >=20 > % python test_EditingContext_Global.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=3D=3D=3D > FAIL: [EC] Checks that a FK/class prop. gets its value after saving chang= es > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test_EditingContext_Global.py", line 922, in > test_17b_insertedObject_and_FK_as_classProperty [snipped] Okay, this one is expected --and will assert differently in the next release. It was there to remind me to examine bug #775082 https://sf.net/tracker/index.php?func=3Ddetail&aid=3D775082&group_id=3D5893= 5&atid=3D489335 which is now marked as "won't fix". Full details have been added to the documentation and will be released w/ the next version. If you need informations in the mean time, you'll find it there: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/modeling/ProjectModeling/Mod= eling/doc/UserGuide/FAQ.tex?rev=3D1.3&content-type=3Dtext/vnd.viewcvs-markup Faq entry: "What if I want to see the foreign key values in my objects?" > % python test_AdaptorLayer.py > Traceback (most recent call last): > File "test_AdaptorLayer.py", line 36, in ? > from utils import parseConfigFile_and_updateModel > ImportError: cannot import name parseConfigFile_and_updateModel > % I forgot that one, sorry, so it was not updated when this function was transferred to Model.updateModelWithCFG(). You'll find enclosed a patch correcting this, I'll update it on cvs. Thanks for reporting. >=20 > I should worry about this? > Also, there are other test steps to execute now? > (i.e. should this README be update?) I've re-read it and yes, you're right, it should be updated: - test_EditingContext_ParentChild.py is not mentioned (tests for nested ECs) - it should also mention that the three test_EditingContext_*.py testsuites take option '-d' to specify the database: '-d Postgresql' (default), '-d MySQL', '-d SQLite'. Each one corresponds to its dedicated configuration file: Postgresql.cfg, etc. -- S=E9bastien. ------------------------------------------------------------------------ --- test_AdaptorLayer.py 20 Feb 2003 15:12:47 -0000 1.1 +++ test_AdaptorLayer.py 30 Jul 2003 17:01:42 -0000 @@ -33,11 +33,10 @@ =20 import unittest, sys import utils -from utils import parseConfigFile_and_updateModel if __name__ =3D=3D "__main__": utils.fixpath() =20 -from Modeling import ModelSet +from Modeling import ModelSet, Model from Modeling.EditingContext import EditingContext from Modeling.FetchSpecification import FetchSpecification from Modeling.Qualifier import qualifierWithQualifierFormat @@ -134,13 +133,13 @@ =20 =20 verbose=3D0 -databaseAdaptorName=3D'Postgresql' +database_cfg=3D'Postgresql.cfg' =20 def main(args): me=3Dargs[0] import getopt options, args =3D getopt.getopt(sys.argv[1:], 'vVpd:') - global verbose, databaseAdaptorName + global verbose, database_cfg =20 profile=3D0 for k, v in options: @@ -150,16 +149,16 @@ if k=3D=3D'-p': profile=3D1; continue if k=3D=3D'-d': if v not in ('Postgresql', 'MySQL'): usage(me); return 1 - databaseAdaptorName=3Dv + database_cfg=3D'%s.cfg'%v continue =20 if args: usage(me); return 1 =20 author_books_model=3DModelSet.defaultModelSet().modelNamed('AuthorBooks') - parseConfigFile_and_updateModel(author_books_model, databaseAdaptorName) + Model.updateModelWithCFG(author_books_model, database_cfg) =20 # MySQL specifics: change TIMESTAMP to DATETIME - if databaseAdaptorName=3D=3D'MySQL': + if database_cfg=3D=3D'MySQL.cfg': author_books_model.entityNamed('Writer').attributeNamed('birthday').se= tExternalType('DATETIME') =20 if profile: ------------------------------------------------------------------------ |