Пример #1
0
                        help="Set the output format: \"text\" or \"csv\"")
    parser.add_argument('-v', '--visual', default=False, action="store_true", required=False,
                        help="Colorize the original source code showing coverage")
    parser.add_argument('-x', '--explain', default=False, action="store_true", required=False,
                        help="Display information about the collection of coverage information (guru mode).")
    parser.add_argument('-d', '--distribution', default="[95, 90]", action="store", required=False, type=str,
                        help="A list containing the score distributions for pretty-printing. Default [95, 90]")
    parser.add_argument('-T', '--includeTestSources', default=False, action="store_true", required=False,
                        help="Include analysis of the test sources. Default False")
    parser.add_argument('-t', '--testDir', default="", action="store", required=False, type=str,
                        help="Directory hint for locating test files.")

    parser.add_argument("files", help="Files to check", nargs="*")

    args = parser.parse_args()

    if not args.summary and not args.average and not args.visual and not args.explain:
        args.summary = True

    fileNames = []

    if args.stdin:
        for line in sys.stdin:
            t = line.strip()
            if len(t) > 0:
                fileNames.append(t)
    else:
        fileNames = args.files

    CoverageReport.commandLineMain(args, fileNames, args.testDir)
Пример #2
0
        default=False,
        action="store_true",
        required=False,
        help="Include analysis of the test sources. Default False")
    parser.add_argument('-t',
                        '--testDir',
                        default="",
                        action="store",
                        required=False,
                        type=str,
                        help="Directory hint for locating test files.")

    parser.add_argument("files", help="Files to check", nargs="*")

    args = parser.parse_args()

    if not args.summary and not args.average and not args.visual and not args.explain:
        args.summary = True

    fileNames = []

    if args.stdin:
        for line in sys.stdin:
            t = line.strip()
            if len(t) > 0:
                fileNames.append(t)
    else:
        fileNames = args.files

    CoverageReport.commandLineMain(args, fileNames, args.testDir)
Пример #3
0
                        help="Display the average score for all C source files (excluding test source files).")
    parser.add_argument('-o', '--output', default="text", action="store", required=False, type=str,
                        help="Set the output format: \"text\" or \"csv\"")
    parser.add_argument('-v', '--visual', default=False, action="store_true", required=False,
                        help="Colorize the original source code showing coverage")
    parser.add_argument('-x', '--explain', default=False, action="store_true", required=False,
                        help="Display information about the collection of coverage information (guru mode).")
    parser.add_argument('-d', '--distribution', default="[95, 90]", action="store", required=False, type=str,
                        help="A list containing the score distributions for pretty-printing. Default [95, 90]")
    parser.add_argument('-T', '--includeTestSources', default=False, action="store_true", required=False,
                        help="Include analysis of the test sources. Default False")

    parser.add_argument("files", help="Files to check", nargs="*")

    args = parser.parse_args()

    if not args.summary and not args.average and not args.visual and not args.explain:
        args.summary = True

    fileNames = []

    if args.stdin:
        for line in sys.stdin:
            t = line.strip()
            if len(t) > 0:
                fileNames.append(t)
    else:
        fileNames = args.files

    CoverageReport.commandLineMain(args, fileNames)