def test_oldPython(self):
        """
        L{_checkPythonVersion} raises L{ImportError} when run on a version of
        Python that is too old.
        """
        sys.version_info = self.unsupportedPythonVersion
        with self.assertRaises(ImportError) as raised:
            _checkPythonVersion()
        self.assertEqual("Twisted requires Python %d.%d or later."
                         % self.supportedPythonVersion,
                         str(raised.exception))

        L{_checkPythonVersion} raises L{ImportError} when run on a version of
        Python that is too old.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twisted.py