Esempio 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)))
Esempio 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)))
Esempio n. 3
0
 def get_dev_output(self, name, variation):
     content = super(PyvaScript, self).get_dev_output(name, variation)
     return compile(content)
Esempio n. 4
0
 def get_output(self, variation):
     for input in self.get_input(variation):
         yield compile(input)
Esempio 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
Esempio 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
Esempio n. 7
0
 def get_dev_output(self, name, variation):
     content = super(PyvaScript, self).get_dev_output(name, variation)
     return compile(content)
Esempio n. 8
0
 def get_output(self, variation):
     for input in self.get_input(variation):
         yield compile(input)