def test_has_assignment_returns_false_if_object_not_found(self): source = ''' parser = ArgumentParser(description='Example Argparse Program', formatter_class=RawDescriptionHelpFormatter) parser.add_argument("filename", help="filename") ''' nodes = ast.parse(source) self.assertFalse(source_parser.has_instantiator(nodes.body[1], 'add_argument'))
def test_has_assignment_returns_false_if_object_not_found(self): source = ''' parser = ArgumentParser(description='Example Argparse Program', formatter_class=RawDescriptionHelpFormatter) parser.add_argument("filename", help="filename") ''' nodes = ast.parse(source) self.assertFalse( source_parser.has_instantiator(nodes.body[1], 'add_argument'))