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())
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; }%s" % os.linesep, compiler.input())
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())
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=self.CHARSET, command=command) self.assertEqual("body { color:#424242; }", compiler.input())
def test_precompiler_infile_stdout(self): command = '%s %s -f {infile}' % (sys.executable, self.test_precompiler) compiler = CompilerFilter(content=self.content, filename=None, charset=None, command=command) self.assertEqual("body { color:#990; }%s" % os.linesep, compiler.input())
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=self.CHARSET, command=command) self.assertEqual("body { color:#990; }", compiler.input())
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())
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())
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())
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)
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())
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())
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())