예제 #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())
예제 #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())
예제 #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())
예제 #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())
예제 #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())
예제 #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())
예제 #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())
예제 #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())
예제 #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())
예제 #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())
예제 #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)
예제 #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)
예제 #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())
예제 #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())
예제 #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())