Last active
December 14, 2015 13:19
-
-
Save jensens/5092543 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
import doctest | |
from pprint import pprint | |
from interlude import interact | |
from google.appengine.ext import testbed | |
optionflags = doctest.NORMALIZE_WHITESPACE | \ | |
doctest.ELLIPSIS | \ | |
doctest.REPORT_ONLY_FIRST_FAILURE | |
TESTFILES = [ | |
'user.rst', | |
'badges.rst', | |
'assets.rst', | |
] | |
def setUp(doctest): | |
doctest.testbed = tb = testbed.Testbed() | |
tb.activate() | |
tb.setup_env(app_id='usertests') | |
tb.init_datastore_v3_stub() | |
tb.init_memcache_stub() | |
def tearDown(doctest): | |
doctest.testbed.deactivate() | |
def test_suite(): | |
return unittest.TestSuite([ | |
doctest.DocFileSuite( | |
filename, | |
optionflags=optionflags, | |
setUp=setUp, | |
tearDown=tearDown, | |
globs={'interact': interact, | |
'pprint': pprint}, | |
) for filename in TESTFILES | |
]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 -S | |
import sys | |
import unittest | |
SDK_PATH = '../parts/google_appengine' | |
def prepare(): | |
sys.path.insert(0, SDK_PATH) | |
import dev_appserver | |
dev_appserver.fix_sys_path() | |
import gaefixes | |
def main(): | |
prepare() | |
import locandy_gae.tests | |
import locandy_srv.tests | |
test_suite = unittest.TestSuite([ | |
locandy_srv.tests.test_suite(), | |
locandy_gae.tests.test_suite(), | |
]) | |
unittest.TextTestRunner(verbosity=2).run(test_suite) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment