Skip to content

Instantly share code, notes, and snippets.

@laiso
Created August 11, 2011 04:35
Show Gist options
  • Save laiso/1138912 to your computer and use it in GitHub Desktop.
Save laiso/1138912 to your computer and use it in GitHub Desktop.
[雑記]Google App Engine + zc.buildout でpytest テストランナーをつくる
# appengine+zc.buildout+pytest.buildout.cfg
#
# cp -r google_appengine/new_project_template ./src
# python2.5 bootstrap.py -d -c appengine+zc.buildout+pytest.buildout.cfg
# ./bin/buildout -v -c appengine+zc.buildout+pytest.buildout.cfg
#
# # add src/tests.py
# # @see http://pytest.org/
#
# ./bin/run_tests src/tests.py
#
[buildout]
parts =
gae_sdk
pytest
testrunner
app-directory = 'src'
[gae_sdk]
recipe = appfy.recipe.gae:sdk
url = http://googleappengine.googlecode.com/files/google_appengine_1.5.2.zip
destination = ${buildout:parts-directory}
[pytest]
recipe = z3c.recipe.scripts
scripts = py.test
script-initialization =
import pytest
if __name__ == '__main__': sys.exit(pytest.main())
eggs =
pytest
pytest_gae
[testrunner]
recipe = collective.recipe.template
input = inline:
${buildout:bin-directory}/${pytest:scripts} --with-gae --gae-project-path=${buildout:app-directory} --gae-path=${gae_sdk:destination}/google_appengine $@
output = ${buildout:bin-directory}/run_tests
mode = 755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment