def test_keySizeZero(self):
        """
        If the key generated by L{keys.getPersistentRSAKey} is set to None
        the key size should then become 0.
        """
        tempDir = FilePath(self.mktemp())
        keyFile = tempDir.child("mykey.pem")

        key = keys._getPersistentRSAKey(keyFile, keySize=512)
        key._keyObject = None
        self.assertEqual( key.size(), 0)

        If the key generated by L{keys.getPersistentRSAKey} is set to None
        the key size should then become 0.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_keys.py