예제 #1
0
 def process(self):
     '''Main processing loop'''
     self.log = configure_logging()
     self.parser = self.argparser or configure_parser()
     self._specific_args()
     self._interpret_cmdline()
     self.log.info("data_migrator pipeline starting")
     self.log.debug("version: %s", __version__)
     self._open_input()
     self._read_input()
     self._write_output()
     self.log.info("data_migrator pipeline done")
예제 #2
0
 def test_argparse(self):
     in_args = ['-i', 'hello', '--outdir', 'world']
     parser = utils.configure_parser()
     args = parser.parse_args(in_args)
     self.assertEqual(args.input, 'hello')
     self.assertEqual(args.outdir, 'world')