abc@sdZddlmZddlmZmZmZmZmZm Z m Z m Z m Z dZ dZdZdZd Zd Zd Zd Zd ZdS(u webencodings.tests ~~~~~~~~~~~~~~~~~~ A basic test suite for Encoding. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. i(tunicode_literalsi( tlookuptLABELStdecodetencodet iter_decodet iter_encodetIncrementalDecodertIncrementalEncodertUTF8cOs:y|||Wn|k r%dSXtd|dS(NuDid not raise %s.(tAssertionError(t exceptiontfunctiontargstkwargs((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyt assert_raisess  cCstdjdksttdjdks6ttdjdksQttdjdkslttdjdksttdjdksttdjdksttddksttddksttd jd ksttd jd ks#ttd jd ks>ttd jd ksYttddksqttddkstdS(Nuutf-8uUtf-8uUTF-8uutf8uutf8 u utf8 uu8uutf-8 uUS-ASCIIu windows-1252u iso-8859-1ulatin1uLATIN1ulatin-1uLATİN1(RtnameR tNone(((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyt test_labelsscCsxVtD]N}td|dt|fks4ttd|dksOtxsdddgD]b}tdg||\}}t|gkstttdg||gks_tq_Wt|}|jddkst|jddt dks tt |}|jddks4t|jddt dkstqWx5t tj D]!}t|j |ksltqlWdS(Ntuiii tfinal(RRRR RRtlistRRtTrueRtsettvaluesR(tlabeltrepeattoutputt_tdecodertencoderR((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyttest_all_labels0s ', ! %cCsptttddtttddtttgdtttgdtttdtttddS(Nséuinvalidué(Rt LookupErrorRRRRRR(((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyttest_invalid_labelCs cCsztdddtdfks'ttdtddtdfksTttdddtdfks{ttdtdtdfksttdddtdfksttd ddtdfksttd ddtd fksttd ddtd fks>ttdddtd fksettdddtd fksttdddtd fksttdddtd fksttdddtd fksttdddtd fks(ttdddtd fksOttdddtd fksvtdS(Nsulatin1u€séuutf8uéuasciiuésésuutf-16besuutf-16lesussuUTF-16BEsuUTF-16LEuUTF-16(RRR R (((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyt test_decodeLs '-'''''''''''''cCstdddksttdddks6ttdddksQttdddkslttdddksttdd d kstdS( Nuéulatin1suutf8séuutf-16suutf-16leuutf-16bes(RR (((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyt test_encodebs cCs>d}|gddks$t|dgddksBt|dgddks`t|dgddks~t|d d gddkst|d d gddkst|d gddkst|dgddkst|dddgddks t|dddgddksDt|ddddddgddksqt|dgddkst|dgddkst|dgddkst|dgddkst|ddddddgddkst|ddd gdd ks:tdS(!NcSs"t||\}}dj|S(Nu(Rtjoin(tinputtfallback_encodingRt _encoding((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pytiter_decode_to_stringlsulatin1uRsuéthellouhellothetllothelltoséuéséssstaua�sssuï»sssssshux-user-defineduhllo(R (R(((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyttest_iter_decodeks. !!!!**cCsfdjtgddks$tdjtdgddksKtdjtdgddksrtdjtddddgddkstdjtddddgddkstdjtddddgddkstdjtddddgd d ks2tdjtdd dd gd dksbtdS(NRulatin1uuésuutf-16suutf-16leuutf-16besuhulloux-user-definedshllo(R$RR (((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyttest_iter_encodes$''0000 cCs^d}d}d}d}t|d|tdfks?tt|d|ksZtdS(Ns2, O#ɻtϨu2, O#ttaauaaux-user-defined(RRR R(tencodedtdecoded((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyttest_x_user_defineds 'N(t__doc__t __future__RRRRRRRRRRR RRRR!R"R#R/R0R4(((sB/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/tests.pyt s@