本文整理汇总了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())
示例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())
示例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())
示例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())
示例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)
示例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())
示例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())
示例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())