def test_enterFailsWithoutFile(self):
        """
        A reservation without an open file used as a context manager
        raises a L{RuntimeError}.
        """
        with self.assertRaises(RuntimeError):
            with self.reservedFD:
                """This string cannot raise an exception."""

        A reservation without an open file used as a context manager
        raises a L{RuntimeError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_tcp.py