Exemplo n.º 1
0
 def check(self, source, result):
     source = "\n".join(line for line in dedent(compile(dedent(source))).strip().splitlines() if line)
     result = "\n".join(line for line in dedent(result).strip().splitlines() if line)
     try:
         self.assertEqual(source, result)
     except:
         raise AssertionError("\n%s\n!=\n%s" % (repr(source), repr(result)))
Exemplo n.º 2
0
 def check(self, source, result):
     source = '\n'.join(
         line
         for line in dedent(compile(dedent(source))).strip().splitlines()
         if line)
     result = '\n'.join(line
                        for line in dedent(result).strip().splitlines()
                        if line)
     try:
         self.assertEqual(source, result)
     except:
         raise AssertionError('\n%s\n!=\n%s' % (repr(source), repr(result)))
Exemplo n.º 3
0
 def get_dev_output(self, name, variation):
     content = super(PyvaScript, self).get_dev_output(name, variation)
     return compile(content)
Exemplo n.º 4
0
 def get_output(self, variation):
     for input in self.get_input(variation):
         yield compile(input)
Exemplo n.º 5
0
 def PYVA(content, unescape, is_statement, **kwargs):
     result = compile(dedent(unescape(content)))
     if not is_statement:
         return result.strip().rstrip('\r\n\t ;')
     return result
Exemplo n.º 6
0
 def PYVA(content, unescape, is_statement, **kwargs):
     result = compile(dedent(unescape(content)))
     if not is_statement:
         return result.strip().rstrip('\r\n\t ;')
     return result
Exemplo n.º 7
0
 def get_dev_output(self, name, variation):
     content = super(PyvaScript, self).get_dev_output(name, variation)
     return compile(content)
Exemplo n.º 8
0
 def get_output(self, variation):
     for input in self.get_input(variation):
         yield compile(input)