def METHOD_NAME(self):
    if not self.loop:
        self.skipTest("could not create loop device")
    rdev = os.stat(self.loop.fileno()).st_rdev
    devt = MKDEV(os.major(rdev), os.minor(rdev))
    for part in for_each_partition(self.prog):
        if part_devt(part) == devt:
            break
    else:
        self.fail("loop partition not found")
    self.assertEqual(part_name(part), os.path.basename(self.loop.name).encode())