def load_installed_version(self):
        installed_packages = get_installed_pypackages()
        if self.package in installed_packages:
            self.version = "=={}".format(
                installed_packages[self.package].version)
def test_contains_itself(self):
        class Recursive(Structure):
            pass

        try:
            Recursive._fields_ = [("next", Recursive)]
        except AttributeError as details:
            self.assertTrue("Structure or union cannot contain itself" in
                            str(details))
        else:
            self.fail("Structure or union cannot contain itself")