Beispiel #1
0
def main():
    if '--group=local' not in sys.argv:
        freeze_login_details()

    root_logger = logging.getLogger('gmusicapi')
    # using DynamicClientLoggers eliminates the need for root handlers
    # configure_debug_log_handlers(root_logger)

    # warnings typically signal a change in protocol,
    # so fail the build if anything >= warning are sent,

    noticer = NoticeLogging()
    noticer.setLevel(logging.WARNING)
    root_logger.addHandler(noticer)

    # proboscis does not have an exit=False equivalent,
    # so SystemExit must be caught instead (we need
    # to check the log noticer)
    try:
        TestProgram().run_and_exit()
    except SystemExit as e:
        print
        if noticer.seen_message:
            print '(failing build due to log warnings)'
            sys.exit(1)

        if e.code is not None:
            sys.exit(e.code)
Beispiel #2
0
def main():
    """Search env for auth envargs and run tests."""

    if '--group=local' not in sys.argv:
        # hack: assume we're just running the proboscis local group
        freeze_login_details(*retrieve_auth())

    # warnings typically signal a change in protocol,
    # so fail the build if anything >= warning are sent,
    noticer = NoticeLogging()
    noticer.setLevel(logging.WARNING)
    root_logger = logging.getLogger('gmusicapi')
    root_logger.addHandler(noticer)

    # proboscis does not have an exit=False equivalent,
    # so SystemExit must be caught instead (we need
    # to check the log noticer)
    try:
        TestProgram(module=sys.modules[__name__]).run_and_exit()
    except SystemExit as e:
        print()
        if noticer.seen_message:
            print('(failing build due to log warnings)')
            sys.exit(1)

        if e.code is not None:
            sys.exit(e.code)
Beispiel #3
0
def main():
    """Search env for auth envargs and run tests."""

    if '--group=local' not in sys.argv:
        # hack: assume we're just running the proboscis local group
        freeze_login_details(*retrieve_auth())

    if 'GM_AA_D_ID' in os.environ:
        freeze_method_kwargs(Mobileclient,
                             'get_stream_url',
                             device_id=os.environ['GM_AA_D_ID'])

    # warnings typically signal a change in protocol,
    # so fail the build if anything >= warning are sent,
    noticer = NoticeLogging()
    noticer.setLevel(logging.WARNING)
    root_logger = logging.getLogger('gmusicapi')
    root_logger.addHandler(noticer)

    # proboscis does not have an exit=False equivalent,
    # so SystemExit must be caught instead (we need
    # to check the log noticer)
    try:
        TestProgram(module=sys.modules[__name__]).run_and_exit()
    except SystemExit as e:
        print
        if noticer.seen_message:
            print '(failing build due to log warnings)'
            sys.exit(1)

        if e.code is not None:
            sys.exit(e.code)
Beispiel #4
0
def main():
    if '--group=local' not in sys.argv:
        freeze_login_details()

    root_logger = logging.getLogger('gmusicapi')
    # using DynamicClientLoggers eliminates the need for root handlers
    # configure_debug_log_handlers(root_logger)

    # warnings typically signal a change in protocol,
    # so fail the build if anything >= warning are sent,

    noticer = NoticeLogging()
    noticer.setLevel(logging.WARNING)
    root_logger.addHandler(noticer)

    # proboscis does not have an exit=False equivalent,
    # so SystemExit must be caught instead (we need
    # to check the log noticer)
    try:
        TestProgram().run_and_exit()
    except SystemExit as e:
        print
        if noticer.seen_message:
            print '(failing build due to log warnings)'
            sys.exit(1)

        if e.code is not None:
            sys.exit(e.code)