예제 #1
0
import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pygrow'))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'growedit'))

# Hack for cssselect.
if os.environ['SERVER_SOFTWARE'].startswith('Dev'):
    sys.path.insert(0, os.path.join(os.path.dirname(__file__)))

from grow import submodules

submodules.fix_imports()

from growedit.users import boto_auth  # Needed to register AuthHandler.

#def webapp_add_wsgi_middleware(app):
#  from google.appengine.ext.appstats import recording
#  app = recording.appstats_wsgi_middleware(app)
#  return app

appstats_MAX_STACK = 20
예제 #2
0
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pygrow'))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'growedit'))

# Hack for cssselect.
if os.environ['SERVER_SOFTWARE'].startswith('Dev'):
  sys.path.insert(0, os.path.join(os.path.dirname(__file__)))

from grow import submodules
submodules.fix_imports()

from growedit.users import boto_auth  # Needed to register AuthHandler.

#def webapp_add_wsgi_middleware(app):
#  from google.appengine.ext.appstats import recording
#  app = recording.appstats_wsgi_middleware(app)
#  return app

appstats_MAX_STACK = 20
예제 #3
0
파일: run_tests.py 프로젝트: statusz/pygrow
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import subprocess
import sys

COLOR_G = '\033[0;32m'  # Green.
COLOR_R = '\033[0;31m'  # Red.
COLOR_NONE = '\033[0;m'  # Reset to terminal's foreground color.

from grow import submodules
submodule_dirs = submodules.fix_imports()


def main():
  success = True

  # Add needed paths to the python path.
  tests_dir = os.path.normpath(os.path.join(os.path.dirname(__file__)))
  root_dir = tests_dir
  appengine_dir = '/usr/local/google_appengine/'
  sys.path.insert(0, appengine_dir)
  sys.path.insert(0, root_dir)
  print 'Running tests...'

  test_filenames = sys.argv[1:]
  if not test_filenames: