Exemple #1
0
    def configure(self, options, config):
        super(NoseKay, self).configure(options, config)
        if not self.enabled:
            return
        self.config = config
        if options.kay_app is not None:
            self._path = options.kay_app
        else:
            self._path = config.workingDir

        sys.path.append(self._path)

        try:
            import kay
        except ImportError:
            self.enabled = False
            raise ImportError("Kay application not found. You can use "
                              "--kay-app-dir option to specify your "
                              "application directory.")

        kay.setup_env()

        import kay.management

        kay.management.test.setup_env()
        kay.management.test.setup_stub()

        if sys.version_info[0:2] < (2,5):
            raise EnvironmentError(
                "Python version must be 2.5 or greater, like the Google App "
                "Engine environment. Tests are running with: %s" % sys.version)

        # remove StreamHandler
        rootLogger = logging.getLogger()
        for handler in rootLogger.handlers:
            if isinstance(handler, logging.StreamHandler):
                rootLogger.removeHandler(handler)
Exemple #2
0
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os

# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('../../'))
import kay
kay.setup_env()

# General configuration
# ---------------------

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'rst2pdf.pdfbuilder']
# extensions = ['sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']

# The suffix of source filenames.
source_suffix = '.rst'
Exemple #3
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Kay management script.

:Copyright: (c) 2009 Accense Technology, Inc. All rights reserved.
:license: BSD, see LICENSE for more details.
"""

import sys
import os
import logging

sys.path = [os.path.abspath(os.path.dirname(__file__))] + sys.path
import kay

kay.setup_env(manage_py_env=True)
from werkzeug import script
from kay.management import *
import appengine_config

if __name__ == '__main__':
    if len(sys.argv) == 1:
        sys.argv.append("--help")
    script.run()
Exemple #4
0
# -*- coding: utf-8 -*-

"""
Kay management script.

:Copyright: (c) 2009 Accense Technology, Inc. All rights reserved.
:license: BSD, see LICENSE for more details.
"""

import sys
import os
import logging

sys.path = [os.path.abspath(os.path.dirname(__file__))] + sys.path
import kay
kay.setup_env(manage_py_env=True)
from werkzeug import script
from kay.management import *

action_dump_all = dump_all
action_restore_all = restore_all
action_shell = shell
action_rshell = rshell
action_startapp = startapp
action_startproject = startproject
action_test = do_runtest
action_preparse_bundle = do_preparse_bundle
action_preparse_apps = do_preparse_apps
action_extract_messages = do_extract_messages
action_add_translations = do_add_translations
action_update_translations = do_update_translations
Exemple #5
0
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os

# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('../../../'))
import kay
kay.setup_env()

# General configuration
# ---------------------

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'rst2pdf.pdfbuilder']
# extensions = ['sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']

# The suffix of source filenames.
source_suffix = '.rst'