Include required antl3 library and check if datastore is available
authorMatthew Wilkes <matthew@matthewwilkes.co.uk>
Fri, 15 May 2009 15:29:41 +0200
changeset 2314 0a0e603215d7
parent 2312 71a5bc0f0398
child 2317 0d4b4aa5b969
Include required antl3 library and check if datastore is available The datastore is checked for availability before requesting it to be cleared. This is because gaeftest uses its own method for ensuring no leakage of data by providing a temporary file as the backend. Reviewed by: Sverre Rabbelier
tests/run.py
--- a/tests/run.py	Fri May 15 12:37:01 2009 +0200
+++ b/tests/run.py	Fri May 15 15:29:41 2009 +0200
@@ -9,6 +9,7 @@
                os.path.join(appengine_location, 'lib', 'django'),
                os.path.join(appengine_location, 'lib', 'webob'),
                os.path.join(appengine_location, 'lib', 'yaml', 'lib'),
+               os.path.join(appengine_location, 'lib', 'antlr3'),
                appengine_location,
                os.path.join(HERE, 'app'),
                os.path.join(HERE, 'thirdparty', 'coverage'),
@@ -32,7 +33,9 @@
   def afterTest(self, test):
     from google.appengine.api import apiproxy_stub_map
     datastore = apiproxy_stub_map.apiproxy.GetStub('datastore')
-    datastore.Clear()
+    # clear datastore iff one is available
+    if datastore is not None:
+      datastore.Clear()
 
 
 def main():