os.path.dirname(os.path.abspath(__file__)), ".." ) ) ) from test_common import ( setup, # @UnresolvedImport my_print, # @UnresolvedImport createSearchMode, # @UnresolvedImport compareWithCPython, # @UnresolvedImport compileLibraryTest # @UnresolvedImport ) setup(needs_io_encoding = True) search_mode = createSearchMode() tmp_dir = tempfile.gettempdir() # Try to avoid RAM disk /tmp and use the disk one instead. if tmp_dir == "/tmp" and os.path.exists("/var/tmp"): tmp_dir = "/var/tmp" blacklist = ( "__phello__.foo.py", # Triggers error for "." in module name "idnadata", # Avoid too complex code for main program. "joined_strings.py", ) def decide(root, filename): return filename.endswith(".py") and \
# 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 def getRole(node, role): for child in node: if child.tag == "role" and child.attrib["name"] == role: