def test_parser(self):
     # Test defaults
     args = lc_func_test_runner.parse_args([])
     self.assertFalse(args.keep_last_model)
     self.assertFalse(args.smoke)
     self.assertFalse(args.dev)
     self.assertFalse(args.force)
     self.assertIsNone(args.bundles)
     # Test flags
     for flag in ['--keep-model', '--keep-last-model']:
         args = lc_func_test_runner.parse_args([flag])
         self.assertTrue(args.keep_last_model)
         args.keep_last_model = False
     args = lc_func_test_runner.parse_args(['--keep-all-models'])
     self.assertTrue(args.keep_all_models)
     args = lc_func_test_runner.parse_args(['--keep-faulty-model'])
     self.assertTrue(args.keep_faulty_model)
     args = lc_func_test_runner.parse_args(['--smoke'])
     self.assertTrue(args.smoke)
     args = lc_func_test_runner.parse_args(['--dev'])
     self.assertTrue(args.dev)
     args = lc_func_test_runner.parse_args(
         ['--bundle', 'mybundle', 'mybundle2'])
     self.assertEqual(args.bundles, ['mybundle', 'mybundle2'])
     args = lc_func_test_runner.parse_args(['--log', 'DEBUG'])
     self.assertEqual(args.loglevel, 'DEBUG')
     args = lc_func_test_runner.parse_args(['-f'])
     self.assertTrue(args.force)
     args = lc_func_test_runner.parse_args(['--force'])
     self.assertTrue(args.force)
 def test_parser(self):
     # Test defaults
     args = lc_func_test_runner.parse_args([])
     self.assertFalse(args.keep_model)
     self.assertFalse(args.smoke)
     self.assertIsNone(args.bundle)
     # Test flags
     args = lc_func_test_runner.parse_args(['--keep-model'])
     self.assertTrue(args.keep_model)
     args = lc_func_test_runner.parse_args(['--smoke'])
     self.assertTrue(args.smoke)
     args = lc_func_test_runner.parse_args(['--bundle', 'mybundle'])
     self.assertEqual(args.bundle, 'mybundle')
Exemple #3
0
 def test_parser(self):
     # Test defaults
     args = lc_func_test_runner.parse_args([])
     self.assertFalse(args.keep_model)
     self.assertFalse(args.smoke)
     self.assertFalse(args.dev)
     self.assertFalse(args.force)
     self.assertIsNone(args.bundle)
     # Test flags
     args = lc_func_test_runner.parse_args(['--keep-model'])
     self.assertTrue(args.keep_model)
     args = lc_func_test_runner.parse_args(['--smoke'])
     self.assertTrue(args.smoke)
     args = lc_func_test_runner.parse_args(['--dev'])
     self.assertTrue(args.dev)
     args = lc_func_test_runner.parse_args(['--bundle', 'mybundle'])
     self.assertEqual(args.bundle, 'mybundle')
     args = lc_func_test_runner.parse_args(['--log', 'DEBUG'])
     self.assertEqual(args.loglevel, 'DEBUG')
     args = lc_func_test_runner.parse_args(['-f'])
     self.assertTrue(args.force)
     args = lc_func_test_runner.parse_args(['--force'])
     self.assertTrue(args.force)