36b5941519ccae4d9234a392798fbcc95302828f,tests/functional/test_import.py,,,#,100

Before Change


         ("CDLL", "PyDLL", "WinDLL", "OleDLL", "cdll.LoadLibrary")),
    ):
    for funcname in funcnames:
        testname = "test_%s_%s__%s" % (name, funcname.replace(".", "_"), libname)
        source = 
        %s
        lib = %s(%%(soname)r)
         % (import_, prefix+funcname) + _template_ctypes_test

        // For test_source() to be able to get the real name of the
        // test-case, this function has to be named "func" and have a
        // local variable `__test_name__` containing the testname.
        @skip_if_lib_missing(libname, reason)
        def func(pyi_builder, __test_name__=testname,
                 libname=libname, source=source):
            // evaluate the soname here, so the test-code contains a constant
            soname = ctypes.util.find_library(libname)
            source = source +_template_ctypes_test
            pyi_builder.test_source(source % locals())

        if funcname in ("WinDLL", "OleDLL"):
            // WinDLL, OleDLL only work on windows.
            func = skipif_notwin(func)

        globals()[testname] = func
        del func

// TODO: Add test-cases forthe prefabricated library loaders supporting

After Change



libname = "gs"
reason = "libgs.so (Ghostscript)"
parameters = []
for prefix in ("", "ctypes."):
    for funcname in  ("CDLL", "PyDLL", "WinDLL", "OleDLL", "cdll.LoadLibrary"):
        params = (prefix+funcname, libname, reason)
        if funcname in ("WinDLL", "OleDLL"):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pyinstaller/pyinstaller
Commit Name: 36b5941519ccae4d9234a392798fbcc95302828f
Time: 2015-08-18
Author: h.goebel@crazy-compilers.com
File Name: tests/functional/test_import.py
Class Name:
Method Name:


Project Name: ScottfreeLLC/AlphaPy
Commit Name: 61ded5a18d28f8053d7547172fb2851b645c3dc4
Time: 2018-01-25
Author: Mark.R.Conway@gmail.com
File Name: alphapy/system.py
Class Name:
Method Name: run_system


Project Name: biolab/orange3
Commit Name: c77dd81910bd11bc43e23b107dc458f48ad1e858
Time: 2013-11-19
Author: anze.staric@gmail.com
File Name: Orange/canvas/utils/environ.py
Class Name:
Method Name: