(args: List)
return args
ensure compatibility with deprecated cli args in v2
ensure compatibility with deprecated cli args in v2
ensure compatibility with deprecated cli args in v2
def ensure_cli_args(args: List) -> List:
    """ ensure compatibility with deprecated cli args in v2
    """
    # remove deprecated --failfast
    if "--failfast" in args:
        logger.warning(f"remove deprecated argument: --failfast")
        args.pop(args.index("--failfast"))

    # convert --report-file to --html
    if "--report-file" in args:
        logger.warning(f"replace deprecated argument --report-file with --html")
        index = args.index("--report-file")
        args[index] = "--html"
        args.append("--self-contained-html")

    # keep compatibility with --save-tests in v2
    if "--save-tests" in args:
        logger.warning(
            f"generate conftest.py keep compatibility with --save-tests in v2"
        )
        args.pop(args.index("--save-tests"))
        _generate_conftest_for_summary(args)

    return args
def ensure_cli_args ( args : List ) -> List : # remove deprecated --failfast if "--failfast" in args : logger . warning ( f"remove deprecated argument: --failfast" ) args . pop ( args . index ( "--failfast" ) ) # convert --report-file to --html if "--report-file" in args : logger . warning ( f"replace deprecated argument --report-file with --html" ) index = args . index ( "--report-file" ) args [ index ] = "--html" args . append ( "--self-contained-html" ) # keep compatibility with --save-tests in v2 if "--save-tests" in args : logger . warning ( f"generate conftest.py keep compatibility with --save-tests in v2" ) args . pop ( args . index ( "--save-tests" ) ) _generate_conftest_for_summary ( args ) return args