#NEWLINE# def test_parseBadVersion( self ) : #NEWLINE# #INDENT# '\n        L{HTTPClientParser.parseVersion} raises L{ValueError} when passed an\n        unparsable version.\n        ' #NEWLINE# protocol = HTTPClientParser ( None , None ) #NEWLINE# e = BadResponseVersion #NEWLINE# f = protocol . parseVersion #NEWLINE# def checkParsing( s ) : #NEWLINE# #INDENT# exc = self . assertRaises ( e , f , s ) #NEWLINE# self . assertEqual ( exc . data , s ) #NEWLINE# #UNINDENT# checkParsing ( b'foo' ) #NEWLINE# checkParsing ( b'foo/bar/baz' ) #NEWLINE# checkParsing ( b'foo/' ) #NEWLINE# checkParsing ( b'foo/..' ) #NEWLINE# checkParsing ( b'foo/a.b' ) #NEWLINE# checkParsing ( b'foo/-1.-1' )