def test_invalid_param(self): with TempFile() as f: args = ['--in-format', 'none', f.name] self.assertNotEqual(_JubaModelCommand.start(args), 0) args = ['--out-format', 'none', f.name] self.assertNotEqual(_JubaModelCommand.start(args), 0) args = ['--no-such-option'] self.assertNotEqual(_JubaModelCommand.start(args), 0)
def test_valid_param(self): with TempFile() as f: f.write(_get_binary_file().read()) f.flush() args = ['--in-format', 'binary', '--out-format', 'json', f.name] self.assertEqual(_JubaModelCommand.start(args), 0)
def test_help(self): args = ['--help'] self.assertEqual(_JubaModelCommand.start(args), 0)
def _exit(self, args, status): return _JubaModelCommand.start(args)