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


Python helpers.TempEnvironmentHelper类代码示例

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


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

示例1: setup

    def setup(self):
        try:
            import closure
        except ImportError:
            raise SkipTest()

        TempEnvironmentHelper.setup(self)
开发者ID:cnu,项目名称:webassets,代码行数:7,代码来源:test_filters.py

示例2: setup

    def setup(self):
        TempEnvironmentHelper.setup(self)

        # Test the timestamp updater with cache disabled, so that the
        # BundleDefUpdater() base class won't interfere.
        self.env.cache = False
        self.env.updater = self.updater = TimestampUpdater()
开发者ID:50onRed,项目名称:webassets,代码行数:7,代码来源:test_updaters.py

示例3: setup

    def setup(self):
        TempEnvironmentHelper.setup(self)

        class MyCache(BaseCache):
            def __init__(self):
                self.enabled = False
                self.reset()
            def get(self, key):
                self.getops += 1
                if self.enabled:
                    return 'foo'
                return False
            def set(self, key, data):
                self.setops += 1
            def reset(self):
                self.getops = 0
                self.setops = 0

        class CompleteFilter(Filter):
            # Support all possible filter operations
            def input(self, *a, **kw):
                pass
            output = open = concat = input
        self.filter = CompleteFilter

        self.env.cache = self.cache = MyCache()
        self.env.manifest = None
        # Note that updater will use the cache also
        self.env.updater = TimestampUpdater()
开发者ID:abourget,项目名称:webassets,代码行数:29,代码来源:test_cache.py

示例4: setup

    def setup(self):
        TempEnvironmentHelper.setup(self)

        class CustomUpdater(BaseUpdater):
            allow = True
            def needs_rebuild(self, *a, **kw):
                return self.allow
        self.m.updater = CustomUpdater()
开发者ID:maximbo,项目名称:webassets,代码行数:8,代码来源:test_bundle.py

示例5: setup

    def setup(self):
        TempEnvironmentHelper.setup(self)

        self.app = Flask(__name__, static_path='/app_static')
        import test_module
        if not Blueprint:
            self.module = Module(test_module.__name__, name='module',
                                 static_path='/mod_static')
            self.app.register_module(self.module)
        else:
            self.blueprint = Blueprint('module', test_module.__name__,
                                       static_url_path='/mod_static',
                                       static_folder='static')
            self.app.register_blueprint(self.blueprint)
        self.env = Environment(self.app)
开发者ID:Nanodesu,项目名称:flask-assets,代码行数:15,代码来源:test_integration.py

示例6: setup

    def setup(self):
        TempEnvironmentHelper.setup(self)

        class MyCache(BaseCache):
            def __init__(self):
                self.enabled = False
                self.reset()
            def get(self, key):
                self.getops += 1
                if self.enabled:
                    return 'foo'
                return False
            def set(self, key, data):
                self.setops += 1
            def reset(self):
                self.getops = 0
                self.setops = 0

        self.m.cache = self.cache = MyCache()
        # Note that updater will use the cache also
        self.m.updater = 'timestamp'
开发者ID:arturosevilla,项目名称:webassets,代码行数:21,代码来源:test_cache.py

示例7: setup

 def setup(self):
     if not find_executable("coffee"):
         raise SkipTest()
     TempEnvironmentHelper.setup(self)
开发者ID:ghk,项目名称:webassets,代码行数:4,代码来源:test_filters.py

示例8: setup

 def setup(self):
     if not find_executable('r.js'):
         raise SkipTest('"r.js" executable not found')
     TempEnvironmentHelper.setup(self)
     self.env.config['requirejs_config'] = self.path('requirejs.json')
     self.env.config['requirejs_baseUrl'] = self.path('')
开发者ID:50onRed,项目名称:webassets,代码行数:6,代码来源:test_filters.py

示例9: setup

 def setup(self):
     try:
         import closure_soy
     except:
         raise SkipTest()
     TempEnvironmentHelper.setup(self)
开发者ID:Emsu,项目名称:webassets,代码行数:6,代码来源:test_filters.py

示例10: setup

 def setup(self):
     TempEnvironmentHelper.setup(self)
     self.env.updater = False
     self.env.directory = self.path('dir')
     self.env.debug = True
开发者ID:50onRed,项目名称:webassets,代码行数:5,代码来源:test_bundle_various.py


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