Hi guys,
I used the pyramid_appengine module and buildout to create a Pyramid
app running on App Engine. Now that I have a minimum viable system I'm
trying to add tests to the project using Nose, but it's not quite
working.
I'm using the pbp.recipe.noserunner recipe for Nose, but it doesn't
seem to be pulling in all the dependencies necessary for Pyramid and
my app.
Here's the error I get when running the nosetests generated script
(which may or may not be correct, I've messed with it to get it this
far):
======================================================================
ERROR: Failure: ImportError (cannot import name BaseRequest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/raoul/projects/nsupport/eggs/nose-1.2.1-py2.7.egg/nose/loader.py",
line 390, in loadTestsFromName
addr.filename, addr.module)
File
"/home/raoul/projects/nsupport/eggs/nose-1.2.1-py2.7.egg/nose/importer.py",
line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File
"/home/raoul/projects/nsupport/eggs/nose-1.2.1-py2.7.egg/nose/importer.py",
line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/raoul/projects/nsupport/parts/nsupport/nsupport/__init__.py",
line 3, in <module>
from pyramid.config import Configurator
File
"/home/raoul/projects/nsupport/eggs/pyramid-1.3.3-py2.7.egg/pyramid/__init__.py",
line 1, in <module>
from pyramid.request import Request
File
"/home/raoul/projects/nsupport/eggs/pyramid-1.3.3-py2.7.egg/pyramid/request.py",
line 8, in <module>
from webob import BaseRequest
ImportError: cannot import name BaseRequest
-------------------- >> begin captured logging << --------------------
root: WARNING: The datastore file stub is deprecated, and
will stop being the default in a future release.
Append the --use_sqlite flag to use the new SQLite stub.
You can port your existing data using the --port_sqlite_data flag or
purge your previous test data with --clear_datastore.
root: WARNING: Could not read datastore data from /tmp/nosegae.datastore
root: WARNING: Could not read search indexes from
/tmp/dev_appserver.searchindexes
root: DEBUG: Enabling webob: None
--------------------- >> end captured logging << ---------------------
Here's my buildout.cfg file:
[buildout]
index = http://d.pypi.python.org/simple
include-site-packages = false
find-links=http://dist.plone.org/thirdparty/
develop=src/nsupport
parts=nsupport
nosetests
ae-sdk-version=1.7.4
ae-runtime=2.7
unzip=true
versions=versions
[versions]
pyramid = 1.3.3
[nsupport]
recipe=rod.recipe.appengine
packages=
pyramid
mako
repoze.lru
zope.interface
zope.deprecation
venusian
translationstring
webob
pyramid-handlers
markupsafe
webhelpers
src=src/nsupport
server-script=devappserver
zip-packages=False
use_setuptools_pkg_resources=True
url=http://googleappengine.googlecode.com/files/google_appengine_${buildout:ae-sdk-version}.zip
[bootstrap]
recipe=zc.recipe.egg
eggs=pastescript
[nosetests]
recipe = pbp.recipe.noserunner
eggs =
pbp.recipe.noserunner
${nsupport:packages}
WebOb
WebTest
Nose
NoseGAE
extra-paths =
${buildout:directory}/parts/nsupport
${buildout:directory}/parts/google_appengine
${buildout:directory}/parts/google_appengine/lib/fancy_urllib
${buildout:directory}/parts/google_appengine/lib/yaml/lib
environment = nose-environment
defaults =
--without-sandbox
--gae-application=${buildout:directory}/parts/nsupport
--gae-lib-root=${buildout:directory}/parts/google_appengine
nsupport/tests
[nose-environment]
NOSE_WITH_GAE = true
NOSE_WHERE = ${buildout:directory}/parts/nsupport
--
Raoul Snyman
B.Tech Information Technology (Software Engineering)
E-Mail: [email protected]
Web: http://www.saturnlaboratories.co.za/
Blog: http://blog.saturnlaboratories.co.za/
Mobile: 082 550 3754
Registered Linux User #333298 (http://counter.li.org)
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.