Example #1
0
def main(args=None):
    if args is None:
        args = sys.argv[1:]
    setup_std_streams()
    arguments = _build_arg_parser().parse_args(args)
    process_exclusive_ignorables(
        arguments,
        ('sources', 'outputs', 'attachments', 'metadata', 'details'))
    return main_show(arguments)
Example #2
0
def main(args=None):
    if args is None:
        args = sys.argv[1:]
    setup_std_streams()
    arguments = _build_arg_parser().parse_args(args)
    process_exclusive_ignorables(
        arguments,
        ('sources', 'outputs', 'attachments', 'metadata', 'details'))
    return main_show(arguments)
Example #3
0
def test_nbshow_app(filespath, capsys):
    afn = os.path.join(filespath, "multilevel-test-base.ipynb")

    args = nbshowapp._build_arg_parser().parse_args(
        [afn, '--log-level=CRITICAL'])
    process_exclusive_ignorables(
        args, ('sources', 'outputs', 'attachments', 'metadata', 'details'))
    assert 0 == main_show(args)
    assert args.log_level == 'CRITICAL'
    assert nbdime.log.logger.level == logging.CRITICAL
Example #4
0
def test_nbshow_app(filespath, capsys):
    afn = os.path.join(filespath, "multilevel-test-base.ipynb")

    args = nbshowapp._build_arg_parser().parse_args([afn, '--log-level=CRITICAL'])
    process_exclusive_ignorables(
        args,
        ('sources', 'outputs', 'attachments', 'metadata', 'details'))
    assert 0 == main_show(args)
    assert args.log_level == 'CRITICAL'
    assert nbdime.log.logger.level == logging.CRITICAL