[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

Michael Felt report at bugs.python.org
Wed Sep 28 08:39:39 EDT 2016


Michael Felt added the comment:

Is this suitable?

    def test_find(self):
        # to track that at least one call to find_library() found something
        found = false
        for name in ("c", "m"):
            lib = find_library(name)
            if lib:
                found = true
                cdll.LoadLibrary(lib)
                CDLL(lib)
        # test is FAILED if nothing was found
        self.assertTrue(found)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28276>
_______________________________________


More information about the Python-bugs-list mailing list