Example #1
0
 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())
Example #2
0
 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())
Example #3
0
 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_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())
Example #5
0
 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())
Example #6
0
 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())
Example #8
0
 def test_precompiler_dict_options(self):
     command = "%s %s {option}" % (sys.executable, self.test_precompiler)
     option = ("option", "option",)
     CompilerFilter.options = dict([option])
     compiler = CompilerFilter(
         content=self.content, filename=self.filename,
         charset=self.CHARSET, command=command)
     self.assertIn(option, compiler.options)
 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())
Example #10
0
 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)
Example #11
0
 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())
 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())
Example #14
0
 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_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)
Example #16
0
 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())
Example #17
0
 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; }\n", compiler.output())