'Any child of the I{twisted} package has a privacy according to the
general rules defined in pydoctor.'

def test_privacyClassPublicCode(self):

    sut = TwistedSystem()
    twistedPackage = model.Package(system=sut, name='twisted', docstring='ignored', parent=None)
    twistedSubProjectPackage = model.Package(system=sut, name='subproject', docstring='ignored', parent=twistedPackage)
    twistedSubProjectModule = model.Module(system=sut, name='other_child', docstring='ignored', parent=twistedSubProjectPackage)
    twistedPrivateModule = model.Module(system=sut, name='_private_child', docstring='ignored', parent=twistedSubProjectPackage)
    result = sut.privacyClass(twistedSubProjectPackage)
    self.assertIs(result, model.PrivacyClass.VISIBLE)
    result = sut.privacyClass(twistedSubProjectModule)
    self.assertIs(result, model.PrivacyClass.VISIBLE)
    result = sut.privacyClass(twistedPrivateModule)
    self.assertIs(result, model.PrivacyClass.PRIVATE)
