Esempio n. 1
0
except ImportError:
    print("Warning, no 'lxml' module installed, cannot do XML based tests.")
    sys.exit(0)

# Find common code relative in file system. Not using packages for test stuff.
sys.path.insert(
    0,
    os.path.normpath(
        os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")))
from test_common import (my_print, setup, convertUsing2to3, createSearchMode,
                         hasModule, check_output)

python_version = setup()

# The Python version used by Nuitka needs "lxml" too.
if not hasModule("lxml.etree"):
    print("Warning, no 'lxml' module installed, cannot run XML based tests.")
    sys.exit(0)

search_mode = createSearchMode()


def getKind(node):
    result = node.attrib["kind"]

    result = result.replace("Statements", "")
    result = result.replace("Statement", "")
    result = result.replace("Expression", "")

    return result
Esempio n. 2
0
            os.path.dirname( os.path.abspath( __file__ ) ),
            ".."
        )
    )
)
from test_common import (
    my_print,
    setup,
    convertUsing2to3,
    hasModule,
    check_output
)

python_version = setup()

if not hasModule("lxml.etree"):
    print("Warning, no 'lxml' module installed, cannot run XML based tests.")
    sys.exit(0)

search_mode = len( sys.argv ) > 1 and sys.argv[1] == "search"

start_at = sys.argv[2] if len( sys.argv ) > 2 else None

if start_at:
    active = False
else:
    active = True

def getKind( node ):
    result = node.attrib[ "kind" ]
Esempio n. 3
0
    extra_flags = [
        "expect_success",
        "standalone",
        "remove_output"
    ]

    if filename == "PySideUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith(b"2.6") or \
           python_version.startswith(b"3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue

        if not hasModule("PySide.QtCore"):
            my_print(
                "Skipping", filename, "PySide not installed for",
                python_version, "but test needs it."
            )
            continue

        # For the warnings.
        extra_flags.append( "ignore_stderr" )

    if filename == "PyQtUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith(b"2.6") or \
           python_version.startswith(b"3.2"):
            my_print("Skipping", filename, "not relevant.")
Esempio n. 4
0
    path = os.path.relpath(filename)

    if not active and start_at in (filename, path):
        active = True

    extra_flags = ["expect_success", "standalone", "remove_output"]

    if filename == "PySideUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue

        if not hasModule("PySide.QtCore"):
            my_print("Skipping", filename, "PySide not installed for",
                     python_version, "but test needs it.")
            continue

        # For the warnings.
        extra_flags.append("ignore_stderr")

    if filename == "PyQtUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue
Esempio n. 5
0
    extra_flags = [
        "expect_success",
        "standalone",
        "remove_output"
    ]

    if filename == "PySideUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            reportSkip(".", filename, "irrelevant Python version.")
            continue

        if not hasModule("PySide.QtCore"):
            reportSkip(".", filename, "PySide not installed for this Python version, but test needs it.")
            continue

        # For the warnings.
        extra_flags.append("ignore_stderr")

    if "PyQt4" in filename:
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            reportSkip(".", filename, "irrelevant Python version.")
            continue

        if not hasModule("PyQt4.QtGui"):
Esempio n. 6
0
    path = os.path.relpath(filename)

    if not active and start_at in (filename, path):
        active = True

    extra_flags = ["expect_success", "standalone", "remove_output"]

    if filename == "PySideUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue

        if not hasModule("PySide.QtCore"):
            my_print("Skipping", filename, "PySide not installed for",
                     python_version, "but test needs it.")
            continue

        # For the warnings.
        extra_flags.append("ignore_stderr")

    if filename == "PyQtUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue
Esempio n. 7
0
    if not active:
        my_print("Skipping", filename)
        continue

    extra_flags = ["expect_success", "standalone", "remove_output"]

    if filename == "PySideUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue

        if not hasModule("PySide.QtCore"):
            my_print("Skipping", filename, "PySide not installed for",
                     python_version, "but test needs it.")
            continue

        # For the warnings.
        extra_flags.append("ignore_stderr")

    if "PyQt4" in filename:
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue
Esempio n. 8
0
    extra_flags = [
        "expect_success",
        "standalone",
        "remove_output"
    ]

    if filename == "PySideUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue

        if not hasModule("PySide.QtCore"):
            my_print(
                "Skipping", filename, "PySide not installed for",
                python_version, "but test needs it."
            )
            continue

        # For the warnings.
        extra_flags.append("ignore_stderr")

    if "PyQt4" in filename:
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
Esempio n. 9
0
    extra_flags = [
        "expect_success",
        "standalone",
        "remove_output"
    ]

    if filename == "PySideUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")
            continue

        if not hasModule("PySide.QtCore"):
            my_print(
                "Skipping", filename, "PySide not installed for",
                python_version, "but test needs it."
            )
            continue

        # For the warnings.
        extra_flags.append( "ignore_stderr" )

    if filename == "PyQtUsing.py":
        # Don't test on platforms not supported by current Debian testing, and
        # which should be considered irrelevant by now.
        if python_version.startswith("2.6") or \
           python_version.startswith("3.2"):
            my_print("Skipping", filename, "not relevant.")