a3afe1f4fbeffa7f64ee6e11cff95417c742299e,tests/unit/test_depend_utils.py,,test_ldconfig_cache,#,34

Before Change


    // free to enhance this code.
    utils.load_ldconfig_cache()
    for name in PYDYLIB_NAMES:
        lib = utils.LDCONFIG_CACHE.get(name)
        if lib:
            break
    assert lib, "Neither of %s found" % ", ".join(PYDYLIB_NAMES)

After Change


def test_ldconfig_cache():
    utils.load_ldconfig_cache()
    libpath = None
    for soname in utils.LDCONFIG_CACHE:
        if soname.startswith("libc.so."):
            libpath = utils.LDCONFIG_CACHE[soname]
            break
    assert libpath, "libc.so not found"
    assert os.path.isfile(libpath)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: pyinstaller/pyinstaller
Commit Name: a3afe1f4fbeffa7f64ee6e11cff95417c742299e
Time: 2015-11-22
Author: h.goebel@crazy-compilers.com
File Name: tests/unit/test_depend_utils.py
Class Name:
Method Name: test_ldconfig_cache


Project Name: onnx/onnx-coreml
Commit Name: ffed6ce438fc1ebdc8054d307ffdfce4bbf2f7f1
Time: 2019-09-03
Author: bhushan.s.94@gmail.com
File Name: onnx_coreml/_transformers.py
Class Name: GatherConstantRemover
Method Name: __call__


Project Name: Qiskit/qiskit-aqua
Commit Name: 8b6b1df0873375ca1fd6e1486e5eaaee0cf6695a
Time: 2018-07-05
Author: manoel@us.ibm.com
File Name: qiskit_acqua/quantumalgorithm.py
Class Name: QuantumAlgorithm
Method Name: register_and_get_operational_backends


Project Name: home-assistant/home-assistant
Commit Name: b4899ec46902741a209788d05cbc2214fcc391e7
Time: 2016-10-31
Author: mail@fabian-affolter.ch
File Name: homeassistant/components/sensor/yahoo_finance.py
Class Name:
Method Name: setup_platform