os.path.join( 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):
os.path.normpath( os.path.join( 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 ):
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import os, sys # 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, compareWithCPython) python_version = setup() 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 for filename in sorted(os.listdir(".")): if not filename.endswith(".py") or filename == "run_all.py": continue path = filename
nuitka = options.nuitka if os.path.exists(nuitka): nuitka = os.path.abspath(nuitka) elif nuitka: sys.exit("Error, nuitka binary '%s' not found." % nuitka) from test_common import ( my_print, setup, convertUsing2to3, getTempDir ) python_version = setup(silent = True) assert os.path.exists(test_case), (test_case, os.getcwd()) my_print("PYTHON='%s'" % python_version) my_print("PYTHON_BINARY='%s'" % os.environ["PYTHON"]) my_print("TEST_CASE_HASH='%s'" % hashlib.md5(open(test_case, "rb").read()).hexdigest()) needs_2to3 = python_version.startswith('3') and \ not test_case.endswith("32.py") and \ not test_case.endswith("33.py") if options.target_dir: shutil.copy( test_case,
) options, positional_args = parser.parse_args() if len(positional_args) != 1: sys.exit("Error, need to give test case file name as positional argument.") test_case = positional_args[0] if options.cpython == "no": options.cpython = "" from test_common import (my_print, setup, convertUsing2to3, getTempDir, decideFilenameVersionSkip, compareWithCPython, hasDebugPython) python_version = setup(silent=True) assert os.path.exists(test_case), (test_case, os.getcwd()) print("PYTHON='%s'" % python_version) print("TEST_CASE_HASH='%s'" % md5.md5(open(test_case).read()).hexdigest()) needs_2to3 = python_version.startswith("3") and \ not test_case.endswith("32.py") and \ not test_case.endswith("33.py") if options.target_dir: shutil.copy(test_case, os.path.join(options.target_dir, os.path.basename(test_case)))
import os, sys, tempfile, subprocess, shutil # 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 ( setup, # @UnresolvedImport my_print, # @UnresolvedImport createSearchMode, # @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. ) def decide(root, filename):
# See the License for the specific language governing permissions and # limitations under the License. # import os, sys, shutil # 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, hasModule, compareWithCPython, decideFilenameVersionSkip, getRuntimeTraceOfLoadedFiles) python_version = setup(needs_io_encoding=True) 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 for filename in sorted(os.listdir(".")): if not filename.endswith(".py"): continue if not decideFilenameVersionSkip(filename):
os.path.join( os.path.dirname(os.path.abspath(__file__)), ".." ) ) ) from test_common import ( my_print, setup, hasModule, compareWithCPython, decideFilenameVersionSkip, getRuntimeTraceOfLoadedFiles ) python_version = setup(needs_io_encoding=True) 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 for filename in sorted(os.listdir(".")): if not filename.endswith(".py"): continue if not decideFilenameVersionSkip(filename):