Ejemplo n.º 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())
Ejemplo n.º 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())
Ejemplo n.º 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=settings.FILE_CHARSET, command=command)
     self.assertEqual("body { color:#424242; }", compiler.input())
Ejemplo n.º 4
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())
Ejemplo n.º 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())
Ejemplo n.º 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())
Ejemplo n.º 7
0
 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())
Ejemplo n.º 8
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())
Ejemplo n.º 9
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())
Ejemplo n.º 10
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; }%s" % os.linesep, compiler.input())
Ejemplo n.º 11
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)
Ejemplo n.º 12
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)
Ejemplo n.º 13
0
 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())
Ejemplo n.º 14
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=settings.FILE_CHARSET, command=command)
     self.assertEqual("body { color:#990; }", compiler.input())
Ejemplo n.º 15
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())