On Thursday 20 October 2005 11:19, Bernd Dorn wrote:
> in my testcase http://svn.zope.org/cxoracleda/trunk/tests/
> test_adapter.py?rev=39515&view=auto

You need to bug Jim, so that this directory is part of the Zope3-Checkins 
mailing list. ;-)

> i  need to somehow get the connection information from a property  
> file, is this the right way to do this
> i do this like this::
> import os
> propFile = os.path.join(os.environ.get('HOME'),"etc/zope/cxoracleda/
> testproperties.py")
> try:
>      execfile(propFile)
> except:
>      raise "Local property file not found",propFile
> this is a problem i think for automated tests etc.
> any sugestions ?

This is a problem. It would be easier if you add a sample configuration file 
in your test directory, e.g. cxoracle/tests/configfile.py and then reference 
it as follows in your test:

  import os
  dir = os.path.dirname(__file__)
  config = os.path.join(dir, 'configfile.py')

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to