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


Python CompilerFilter.input方法代码示例

本文整理汇总了Python中compressor.filters.base.CompilerFilter.input方法的典型用法代码示例。如果您正苦于以下问题:Python CompilerFilter.input方法的具体用法?Python CompilerFilter.input怎么用?Python CompilerFilter.input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在compressor.filters.base.CompilerFilter的用法示例。


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

示例1: test_precompiler_infile_with_spaces

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_infile_with_spaces(self):
     self.setup_infile('static/css/filename with spaces.css')
     command = '%s %s -f {infile} -o {outfile}' % (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(
         content=self.content, filename=self.filename,
         charset=settings.FILE_CHARSET, command=command)
     self.assertEqual("body { color:#424242; }", compiler.input())
开发者ID:AaronGhent,项目名称:django-compressor,代码行数:9,代码来源:test_filters.py

示例2: test_precompiler_stdin_stdout_filename

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_stdin_stdout_filename(self):
     command = '%s %s' %  (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(content=self.content, filename=self.filename, command=command)
     self.assertEqual(u"body { color:#990; }\n", compiler.input())
开发者ID:simplegeo,项目名称:django_compressor,代码行数:6,代码来源:tests.py

示例3: test_precompiler_stdin_outfile

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_stdin_outfile(self):
     command = '%s %s -o {outfile}' %  (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(content=self.content, filename=None, command=command)
     self.assertEqual(u"body { color:#990; }", compiler.input())
开发者ID:simplegeo,项目名称:django_compressor,代码行数:6,代码来源:tests.py

示例4: test_precompiler_infile_stdout

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_infile_stdout(self):
     command = '%s %s -f {infile}' % (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(content=self.content, filename=None, command=command)
     self.assertEqual(u"body { color:#990; }%s" % os.linesep, compiler.input())
开发者ID:gregplaysguitar,项目名称:django_compressor,代码行数:6,代码来源:filters.py

示例5: test_precompiler_output_unicode

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_output_unicode(self):
     command = '%s %s' % (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(content=self.content, filename=self.filename, command=command)
     self.assertEqual(type(compiler.input()), six.text_type)
开发者ID:AaronGhent,项目名称:django-compressor,代码行数:6,代码来源:test_filters.py

示例6: test_precompiler_stdin_stdout_filename

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_stdin_stdout_filename(self):
     command = '%s %s' % (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(
         content=self.content, filename=self.filename,
         charset=settings.FILE_CHARSET, command=command)
     self.assertEqual("body { color:#990; }%s" % os.linesep, compiler.input())
开发者ID:AaronGhent,项目名称:django-compressor,代码行数:8,代码来源:test_filters.py

示例7: test_precompiler_infile_outfile

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_infile_outfile(self):
     command = '%s %s -f {infile} -o {outfile}' % (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(
         content=self.content, filename=self.filename,
         charset=settings.FILE_CHARSET, command=command)
     self.assertEqual("body { color:#990; }", compiler.input())
开发者ID:AaronGhent,项目名称:django-compressor,代码行数:8,代码来源:test_filters.py

示例8: test_precompiler_infile_outfile

# 需要导入模块: from compressor.filters.base import CompilerFilter [as 别名]
# 或者: from compressor.filters.base.CompilerFilter import input [as 别名]
 def test_precompiler_infile_outfile(self):
     command = "%s %s -f {infile} -o {outfile}" % (sys.executable, self.test_precompiler)
     compiler = CompilerFilter(content=self.content, filename=self.filename, command=command)
     self.assertEqual(u"body { color:#990; }", compiler.input())
开发者ID:peterdocter,项目名称:django_compressor,代码行数:6,代码来源:filters.py


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