def test_parseBadVersion(self):
        """
        L{HTTPClientParser.parseVersion} raises L{ValueError} when passed an
        unparsable version.
        """
        protocol = HTTPClientParser(None, None)
        e = BadResponseVersion
        f = protocol.parseVersion

        def checkParsing(s):
            exc = self.assertRaises(e, f, s)
            self.assertEqual(exc.data, s)

        checkParsing(b'foo')
        checkParsing(b'foo/bar/baz')

        checkParsing(b'foo/')
        checkParsing(b'foo/..')

        checkParsing(b'foo/a.b')
        checkParsing(b'foo/-1.-1')

        L{HTTPClientParser.parseVersion} raises L{ValueError} when passed an
        unparsable version.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_newclient.py