Joops
unread,Jul 10, 2011, 4:14:24 PM7/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Hi all,
Sorry for what I consider a very simple question.
I want to check something I have done.
I wanted to do some test driven development for a specific part of my
project.
In order to run the tests I need to import the google libs (I am
running on MacOS)
I have put this at the top of my test script (Which I snaffled from
dev_appserver.py)
----
import os
import sys
DIR_PATH='/usr/local/google_appengine'
#SORT OUT THE IMPORTS FOR THE LIBS
EXTRA_PATHS = [
DIR_PATH,
os.path.join(DIR_PATH, 'lib', 'antlr3'),
os.path.join(DIR_PATH, 'lib', 'django_0_96'),
os.path.join(DIR_PATH, 'lib', 'fancy_urllib'),
os.path.join(DIR_PATH, 'lib', 'ipaddr'),
os.path.join(DIR_PATH, 'lib', 'webob'),
os.path.join(DIR_PATH, 'lib', 'yaml', 'lib'),
os.path.join(DIR_PATH, 'lib', 'simplejson'),
os.path.join(DIR_PATH, 'lib', 'graphy'),
]
sys.path = EXTRA_PATHS + sys.path
----
Now my test can use the google libs, and all is well.
Just wondered if there was a better way to achieve this?
Thanks ever so much
J