3 Pf@sdZddlmZddlmZmZmZmZmZm Z m Z m Z m Z ddZ ddZd d Zd d Zd dZddZddZddZddZdS)z webencodings.tests ~~~~~~~~~~~~~~~~~~ A basic test suite for Encoding. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. )unicode_literals) lookupLABELSdecodeencode iter_decode iter_encodeIncrementalDecoderIncrementalEncoderUTF8c Os4y|||Wn|k r"dSXtd|dS)NzDid not raise %s.)AssertionError)Z exceptionZfunctionargskwargsr/usr/lib/python3.6/tests.py assert_raisess rcCs tdjdksttdjdks$ttdjdks6ttdjdksHttdjdksZttdjdkslttdjdks~ttddksttddksttd jd ksttd jd ksttd jd ksttd jd ksttddksttddkstdS)Nzutf-8zUtf-8zUTF-8utf8zutf8 z utf8 u8uutf-8 zUS-ASCIIz windows-1252z iso-8859-1latin1ZLATIN1zlatin-1uLATİN1)rnamer rrrr test_labelssrcCsxtD]}td|dt|fks$ttd|dks6txLdD]D}tdg||\}}t|gksdtttdg||gks.iter_decode_to_stringrrrr+r%shelloZhellosheslloshelloséuésésaua�ssuï»sssshzx-user-defineduhllo)r )r/rrrtest_iter_decodeks.r7cCsdjtgddkstdjtdgddks2tdjtdgddksLtdjtddddgddksltdjtddddgddkstdjtddddgddkstdjtddddgd d kstdjtdd dd gd dkstdS)Nrrrr%r+zutf-16szutf-16lezutf-16besuhZllozx-user-definedshllo)r-r r rrrrtest_iter_encodes    r8cCs@d}d}d}d}t|d|tdfks*tt|d|ks s ,