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
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" ]
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.")
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
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"):
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
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.")
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.")