def test_parser_logging(self): args = lc_deploy.parse_args(['-m', 'mymodel', '-b', 'bun.yaml']) # Using defaults self.assertEqual(args.loglevel, 'INFO') # Specify the parameter args = lc_deploy.parse_args( ['-m', 'mymodel', '-b', 'bun.yaml', '--log', 'DEBUG']) self.assertEqual(args.loglevel, 'DEBUG')
def test_parser_force(self): args = lc_deploy.parse_args(['-m', 'model', '-b', 'bundle.yaml']) self.assertFalse(args.force) # Now test we can override args = lc_deploy.parse_args( ['-m', 'model', '-b', 'bundle.yaml', '--force']) self.assertTrue(args.force) args = lc_deploy.parse_args(['-m', 'model', '-b', 'bundle.yaml', '-f']) self.assertTrue(args.force)
def test_parser(self): args = lc_deploy.parse_args([ '-m', 'mymodel', '-b', 'bun.yaml']) self.assertEqual(args.model, 'mymodel') self.assertEqual(args.bundle, 'bun.yaml') self.assertTrue(args.wait)
def test_parser_nowait(self): args = lc_deploy.parse_args( ['-m', 'mymodel', '-b', 'bun.yaml', '--no-wait']) self.assertFalse(args.wait)