예제 #1
0
    # not fully compatible and potentially an error.
    if filename == "YieldFrom33.py":
        extra_flags.append("ignore_stderr")

    active = search_mode.consider(
        dirname  = None,
        filename = filename
    )

    if active:
        if filename.startswith("Referencing") and not hasDebugPython():
            my_print("Skipped (no debug Python)")
            continue

        needs_2to3 = python_version.startswith('3') and \
                     not filename.endswith("32.py") and \
                     not filename.endswith("33.py")

        with withPythonPathChange(".."):
            compareWithCPython(
                dirname     = None,
                filename    = filename,
                extra_flags = extra_flags,
                search_mode = search_mode,
                needs_2to3  = needs_2to3
            )
    else:
        my_print("Skipping", filename)

search_mode.finish()
예제 #2
0
    if active:
        my_print("Consider output of recursively compiled program:", filename)

        for filename_main in os.listdir(filename):
            if filename_main.endswith("Main.py"):
                break

            if filename_main.endswith("Main"):
                break
        else:
            sys.exit("""\
Error, no file ends with 'Main.py' or 'Main' in %s, incomplete test case.""" %
                     (filename))

        extra_python_path = [
            os.path.abspath(os.path.join(filename, entry))
            for entry in os.listdir(filename) if entry.startswith("path")
        ]

        with withPythonPathChange(extra_python_path):
            compareWithCPython(dirname=filename,
                               filename=filename_main,
                               extra_flags=extra_flags,
                               search_mode=search_mode,
                               needs_2to3=False)
    else:
        my_print("Skipping", filename)

search_mode.finish()
예제 #3
0
    # being in no package.
    if filename == "Importing.py":
        extra_flags.append("ignore_warnings")

    # TODO: Nuitka does not give output for ignored exception in dtor, this is
    # not fully compatible and potentially an error.
    if filename == "YieldFrom33.py":
        extra_flags.append("ignore_stderr")

    active = search_mode.consider(dirname=None, filename=filename)

    if active:
        if filename.startswith("Referencing") and not hasDebugPython():
            my_print("Skipped (no debug Python)")
            continue

        needs_2to3 = python_version.startswith('3') and \
                     not filename.endswith("32.py") and \
                     not filename.endswith("33.py")

        with withPythonPathChange(".."):
            compareWithCPython(dirname=None,
                               filename=filename,
                               extra_flags=extra_flags,
                               search_mode=search_mode,
                               needs_2to3=needs_2to3)
    else:
        my_print("Skipping", filename)

search_mode.finish()
예제 #4
0
            if filename_main.endswith("Main"):
                break
        else:
            sys.exit(
                """\
Error, no file ends with 'Main.py' or 'Main' in %s, incomplete test case.""" % (
                    filename
                )
            )

        extra_python_path = [
            os.path.abspath(os.path.join(filename,entry))
            for entry in
            os.listdir(filename)
            if entry.startswith("path")
        ]

        with withPythonPathChange(extra_python_path):
            compareWithCPython(
                dirname     = filename,
                filename    = filename_main,
                extra_flags = extra_flags,
                search_mode = search_mode,
                needs_2to3  = False
            )
    else:
        my_print("Skipping", filename)

search_mode.finish()