def test_removeProcessUnknownKeyError(self):
        """
        L{ProcessMonitor.removeProcess} raises a C{KeyError} if the given
        process name isn't recognised.
        """
        self.pm.startService()
        self.assertRaises(KeyError, self.pm.removeProcess, "foo")

        L{ProcessMonitor.removeProcess} raises a C{KeyError} if the given
        process name isn't recognised.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/runner/test/test_procmon.py