def test_mutate_strange_cases(self): import parser ast = parser.source2ast('if a: b') ast.mutate(self.BaseVisitor()) src = ''' try: b except Exception: pass ''' ast = parser.source2ast(src) ast.mutate(self.BaseVisitor()) src = '{1:2}' ast = parser.source2ast(src) ast.mutate(self.BaseVisitor()) src = '1 > 3' ast = parser.source2ast(src) ast.mutate(self.BaseVisitor())
def test_mutate_strange_cases(self): src = ''' if a: b ''' ast = source2ast(src, 'exec') ast.mutate(BaseVisitor()) src = ''' try: b except Exception: pass ''' ast = source2ast(src, 'exec') ast.mutate(BaseVisitor()) src = '{1:2}' ast = source2ast(src, 'exec') ast.mutate(BaseVisitor()) src = '1 > 3' ast = source2ast(src, 'exec') ast.mutate(BaseVisitor())
def test_mutate_strange_cases(self): src = ''' if a: b ''' ast = source2ast(FakeSpace(), src) ast.mutate(BaseVisitor()) src = ''' try: b except Exception: pass ''' ast = source2ast(FakeSpace(), src) ast.mutate(BaseVisitor()) src = '{1:2}' ast = source2ast(FakeSpace(), src) ast.mutate(BaseVisitor()) src = '1 > 3' ast = source2ast(FakeSpace(), src) ast.mutate(BaseVisitor())