google-code-export / appengine-devappserver2-experiment

Automatically exported from code.google.com/p/appengine-devappserver2-experiment
0 stars 0 forks source link

Unit testing 'deferred' fails because webob is not found #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run unit tests with TestBed in an app with deferred turned on

What is the expected output? What do you see instead?

One would expect the tests to run. Instead the following is printed:

    from google.appengine.ext import deferred, ndb
  File "/Users/bmh/GitRepos/appengine-devappserver2-experiment/google/appengine/ext/deferred/__init__.py", line 29, in <module>
    from deferred import *
  File "/Users/bmh/GitRepos/appengine-devappserver2-experiment/google/appengine/ext/deferred/deferred.py", line 101, in <module>
    from google.appengine.ext import webapp
  File "/Users/bmh/GitRepos/appengine-devappserver2-experiment/google/appengine/ext/webapp/__init__.py", line 202, in <module>
    from google.appengine.ext.webapp._webapp25 import *
  File "/Users/bmh/GitRepos/appengine-devappserver2-experiment/google/appengine/ext/webapp/_webapp25.py", line 75, in <module>
    import webob
ImportError: No module named webob

The PYTHONPATH environment variable includes 
`/Users/bmh/GitRepos/appengine-devappserver2-experiment`

What version of the product are you using? On what operating system?

devappserver2 0.7.5 on Mac OS X 10.8.3

Please provide any additional information below.

It would seem this is a path issue, and should be fixed by adding 
`appengine-devappserver2-experiment/lib/webob-1.2.3`, but it would obviously be 
preferable to not need monkeypatching of this sort.

Original issue reported on code.google.com by brianmh...@gmail.com on 22 Feb 2013 at 7:33

GoogleCodeExporter commented 9 years ago
The problem is that fix_sys_path() in dev_appserver v1 sets-up these paths:

  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', 'jinja2-2.6'),
  os.path.join(DIR_PATH, 'lib', 'protorpc'),
  os.path.join(DIR_PATH, 'lib', 'PyAMF'),
  os.path.join(DIR_PATH, 'lib', 'markupsafe'),
  os.path.join(DIR_PATH, 'lib', 'webob_0_9'),
  os.path.join(DIR_PATH, 'lib', 'webapp2-2.5.2'),
  os.path.join(DIR_PATH, 'lib', 'yaml', 'lib'),
  os.path.join(DIR_PATH, 'lib', 'simplejson'),
  os.path.join(DIR_PATH, 'lib', 'google.appengine._internal.graphy'),

When dev_appserver v2 sets up these paths:

    os.path.join(DIR_PATH, 'lib', 'concurrent'),
    os.path.join(DIR_PATH, 'lib', 'cherrypy'),
    os.path.join(DIR_PATH, 'lib', 'fancy_urllib'),
    os.path.join(DIR_PATH, 'lib', 'yaml-3.10'),

Original comment by bquin...@google.com on 24 Feb 2013 at 1:44

GoogleCodeExporter commented 9 years ago

Original comment by bquin...@google.com on 25 Feb 2013 at 5:19