Closed Alcolo47 closed 5 years ago
Is this trying to solve the same problem as the ASTPattern class in mutmut? https://github.com/boxed/mutmut/blob/master/tests/test_mutation.py#L29 i.e. matching complex patterns on the AST.
It would be interesting to write the patterns we want to match using both systems and comparing how they read if so.
This looks mostly fine to me. The only change I'd like is to put the code into its own module. ObjTest
is closely associated with the AST, so I propose this:
ast.py
into a package. ast/__init__.py
can expose all of the same stuff it does today.ObjTest
implementation into ast/obj_test.py
.With that, I think everything would be good.
OK, I will move this class. But about its name, I was not inspired, maybe AstTester ?
maybe AstTester?
How about ASTQuery? It seems like it's primarily for querying for subsets of an AST.
If you can fix the breaking tests, then I can merge this in.
ObjTest alone