Exemplo n.º 1
0
 def test_target(self):
     """
     The specified target gets parsed
     """
     config.sys.argv = ['', 'target1', 'target2']
     args = config.parseArguments()
     self.assertEqual(args.targets, ['target1', 'target2'])
Exemplo n.º 2
0
 def test_targets(self):
     """
     The targets passed in make it through mergeConfig, and the specified
     target gets parsed
     """
     config.sys.argv = ['', 'target1', 'target2']
     args = config.parseArguments()
     args = config.mergeConfig(args)
     self.assertEqual(args.targets, ['target1', 'target2'])
Exemplo n.º 3
0
 def test_absent(self):
     """
     Arguments not specified on the command-line are not present in the args
     object.
     """
     config.sys.argv = ['', '--debug']
     args = config.parseArguments()
     self.assertEqual(getattr(args, 'debug', 'not there'), True)
     self.assertEqual(getattr(args, 'verbose', 'not there'), 'not there')
     self.assertEqual(getattr(args, 'targets', 'not there'), 'not there')
     self.assertEqual(getattr(args, 'file_pattern', 'not there'), 'not there')