Esempio n. 1
0
    elif options.filename:
        fn = options.filename
        if fn.startswith('='): fn = fn[1:]
        g_option_fn = fn.strip('"')
        scope = 'file'
    elif options.g:
        scope = 'gui'
    elif options.m:
        scope = 'modes'
    elif options.p:
        scope = 'plugins'
        # elif options.s: scope = 'silent'
    elif options.u:
        scope = 'commands'
    elif options.v:
        scope = 'version'
    else:
        scope = 'all'
    return scope


#@-others
g_option_fn = None
scope = scanOptions()
if scope == 'version':
    report_version()
else:
    files = leoTest.LinterTable().get_files_for_scope(scope, fn=g_option_fn)
    main(files)
#@-leo
Esempio n. 2
0

# ==============================================================================
def main():
    choices = ('tests', 'make', 'dist', 'flake8',
               'tools', 'examples', 'release')

    args = _parse_args(choices)

    core_dir = os.path.abspath(os.path.dirname(__file__))

    if args.run_tests is None:
        run_tests = set(choices)
        run_tests.discard('release')
    else:
        run_tests = set(args.run_tests)

    if args.skip_tests:
        run_tests.difference_update(args.skip_tests)

    if os.environ.get('TRAVIS_TAG') or os.environ.get('APPVEYOR_REPO_TAG'):
        run_tests = ('release',)

    run(core_dir, args.tools_dir, args.examples_dir, run_tests)


# ==============================================================================

if __name__ == '__main__':
    main()
Esempio n. 3
0
    add('-v', '--version', dest='v',
        action='store_true', help='report flake8 version')
    # Parse the options.
    options, args = parser.parse_args()
    # silent = options.s
    if options.a: scope = 'all'
    elif options.c: scope = 'core'
    elif options.e: scope = 'external'
    elif options.filename:
        fn = options.filename
        if fn.startswith('='): fn = fn[1:]
        g_option_fn = fn.strip('"')
        scope = 'file'
    elif options.g: scope = 'gui'
    elif options.m: scope = 'modes'
    elif options.p: scope = 'plugins'
    # elif options.s: scope = 'silent'
    elif options.u: scope = 'commands'
    elif options.v: scope = 'version'
    else: scope = 'all'
    return scope
#@-others
g_option_fn = None
scope = scanOptions()
if scope == 'version':
    report_version()
else:
    files = leoTest.LinterTable().get_files_for_scope(scope, fn=g_option_fn)
    main(files)
#@-leo
Esempio n. 4
0

# ==============================================================================
def main():
    choices = ('tests', 'make', 'dist', 'flake8', 'tools', 'examples',
               'release')

    args = _parse_args(choices)

    core_dir = os.path.abspath(os.path.dirname(__file__))

    if args.run_tests is None:
        run_tests = set(choices)
        run_tests.discard('release')
    else:
        run_tests = set(args.run_tests)

    if args.skip_tests:
        run_tests.difference_update(args.skip_tests)

    if os.environ.get('TRAVIS_TAG') or os.environ.get('APPVEYOR_REPO_TAG'):
        run_tests = ('release', )

    run(core_dir, args.tools_dir, args.examples_dir, run_tests)


# ==============================================================================

if __name__ == '__main__':
    main()