def test_version(self):
        """
        The I{--version} option displays the version and raises
        L{SystemExit} with L{None} as the exit code.
        """
        out = NativeStringIO()
        self.patch(sys, 'stdout', out)
        systemExitCode = self.assertRaises(SystemExit, parseOptions,
                                           '--version')
        # SystemExit.code is None on success
        self.assertEqual(systemExitCode.code, None)
        data = out.getvalue()
        self.assertEqual(data, "mailmail version: {}\n".format(version))

        The I{--version} option displays the version and raises
        L{SystemExit} with L{None} as the exit code.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_mailmail.py