def main(): """main function.""" try: convt = convert.Convert() convt.convert_from_argparse(parse_options()) control.generate_atena(convt) except (RuntimeError, UnboundLocalError, InvalidFormat, NotFound) as exc: sys.stderr.write('ERROR: {0}\n'.format(exc))
def main(): """Genenga main function.""" try: convt = convert.Convert() convt.convert_from_argparse(parse_options()) control.generate_atena(convt) except (RuntimeError, UnboundLocalError, InvalidFormat, NotFound) as exc: sys.stderr.write('ERROR: {0}\n'.format(exc))
def test_generate_atena(self): """testing generate_atena().""" command.set_option(self.parser, 'destdir') command.set_option(self.parser, 'template_path') command.set_option(self.parser, 'address_list') args = self.parser.parse_args('-d /tmp/ ' '-t template/address.mustache ' 'example/address.csv'.split()) control.generate_atena(args) self.assertTrue(os.path.exists('/tmp/address.tex'))