当前位置: 首页>>代码示例>>Python>>正文


Python test_env.setup_test_env函数代码示例

本文整理汇总了Python中test_support.test_env.setup_test_env函数的典型用法代码示例。如果您正苦于以下问题:Python setup_test_env函数的具体用法?Python setup_test_env怎么用?Python setup_test_env使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setup_test_env函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_test_env

def setup_test_env():
  """Sets up App Engine test environment."""
  # For application modules.
  sys.path.insert(0, APP_DIR)

  from test_support import test_env
  test_env.setup_test_env()
开发者ID:misscache,项目名称:luci-py,代码行数:7,代码来源:test_env.py

示例2: setup_test_env

def setup_test_env():
  """Sets up App Engine test environment."""
  sys.path.insert(0, os.path.join(COMPONENTS_DIR, 'third_party'))
  if COMPONENTS_DIR not in sys.path:
    sys.path.insert(0, COMPONENTS_DIR)

  from test_support import test_env
  test_env.setup_test_env()
开发者ID:rmistry,项目名称:luci-py,代码行数:8,代码来源:test_env.py

示例3: setup_test_env

def setup_test_env():
  """Sets up App Engine test environment."""
  # For application modules.
  sys.path.insert(0, APP_DIR)
  # TODO(maruel): Remove.
  sys.path.insert(0, os.path.join(APP_DIR, 'components', 'third_party'))

  from test_support import test_env
  test_env.setup_test_env()
开发者ID:misscache,项目名称:luci-py,代码行数:9,代码来源:test_env.py

示例4: setup_test_env

def setup_test_env():
  """Sets up App Engine test environment."""
  sys.path.insert(0, APP_DIR)

  from test_support import test_env
  test_env.setup_test_env()

  sys.path.insert(0, THIRD_PARTY)

  from components import utils
  utils.fix_protobuf_package()
开发者ID:mellowdistrict,项目名称:luci-py,代码行数:11,代码来源:test_env.py

示例5: IdentityTest

#!/usr/bin/env python
# Copyright 2014 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.

import datetime
import sys
import unittest

from test_support import test_env
test_env.setup_test_env()

from google.appengine.ext import ndb

from components import utils
from components.auth import ipaddr
from components.auth import model
from test_support import test_case


class IdentityTest(test_case.TestCase):
  """Tests for Identity class."""

  def test_immutable(self):
    # Note that it's still possible to add new attributes to |ident|. To fix
    # this we'd have to add __slots__ = () to Identity and to BytesSerializable
    # (it inherits from). Since adding extra attributes to an instance doesn't
    # harm any expected behavior of Identity (like equality operator or
    # serialization) we ignore this hole in immutability.
    ident = model.Identity(model.IDENTITY_USER, '[email protected]')
    self.assertTrue(isinstance(ident, tuple))
开发者ID:mellowdistrict,项目名称:luci-py,代码行数:31,代码来源:model_test.py


注:本文中的test_support.test_env.setup_test_env函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。