def METHOD_NAME(self, spec, name, ispkg=False):
    self.assertEqual(spec.name, name)
    self.assertIs(spec.loader, self.machinery.FrozenImporter)
    self.assertEqual(spec.origin, 'frozen')
    self.assertFalse(spec.has_location)
    if ispkg:
        self.assertIsNotNone(spec.submodule_search_locations)
    else:
        self.assertIsNone(spec.submodule_search_locations)
    self.assertIsNotNone(spec.loader_state)