'Asserts that the list of all Constant values (by
\'preorder\' appearance) in the chunk of code is as
given.'

def assert_all_Constants(self, code, constants):

    if isinstance(code, str):
        parsed = self.parse(code)
    else:
        parsed = code
    cv = self.ConstantVisitor()
    cv.visit(parsed)
    self.assertEqual(cv.values, constants)
