How to use the tomcatmanager.VERSION_STRING function in tomcatmanager

To help you get started, we’ve selected a few tomcatmanager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tomcatmanager / tomcatmanager / tests / test_main.py View on Github external
def test_main_version(capsys):
    with pytest.raises(SystemExit) as exit_e:
        main(['--version'])
    out, err = capsys.readouterr()
    out = out.splitlines()
    assert exit_e.value.code == 0
    assert out[0] == tm.VERSION_STRING
    assert not err
github tomcatmanager / tomcatmanager / src / tomcatmanager / interactive_tomcat_manager.py View on Github external
def do_version(self, cmdline: cmd2.Statement):
        """Show the version number of this program."""
        self.parse_args(self.version_parser, cmdline.argv)
        self.poutput(tm.VERSION_STRING)
github tomcatmanager / tomcatmanager / src / tomcatmanager / __main__.py View on Github external
quiet_help = 'suppress all status output'
    parser.add_argument('-q', '--quiet',
                        action='store_true', help=quiet_help)

    status_help = 'send status information to stdout instead of stderr'
    parser.add_argument('-s', '--status-to-stdout',
                        action='store_true', help=status_help)

    debug_help = 'show additional debugging information while processing commands'
    parser.add_argument('-d', '--debug',
                        action='store_true', help=debug_help)

    version_help = 'show the version information and exit'
    parser.add_argument('-v', '--version', action='version',
                        version=tm.VERSION_STRING, help=version_help)

    url_help = 'url of the tomcat manager web application'
    parser.add_argument('manager_url', nargs='?',
                        help=url_help)

    command_help = 'optional command to run, if no command given, enter an interactive shell'
    parser.add_argument('command', nargs='?',
                        help=command_help)

    arg_help = 'optional arguments for command'
    parser.add_argument('command_args', nargs=argparse.REMAINDER,
                        help=arg_help)

    return parser