com.googler.python 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -0
- package/python3 +6 -0
- package/python3.4.2/bin/2to3 +5 -0
- package/python3.4.2/bin/2to3-3.4 +5 -0
- package/python3.4.2/bin/android-debian-builder +10 -0
- package/python3.4.2/bin/easy_install-3.4 +11 -0
- package/python3.4.2/bin/idle3 +5 -0
- package/python3.4.2/bin/idle3.4 +5 -0
- package/python3.4.2/bin/pip3 +11 -0
- package/python3.4.2/bin/pip3.4 +11 -0
- package/python3.4.2/bin/pydoc3 +5 -0
- package/python3.4.2/bin/pydoc3.4 +5 -0
- package/python3.4.2/bin/python3-config +111 -0
- package/python3.4.2/bin/python3.4 +0 -0
- package/python3.4.2/bin/python3.4-config +111 -0
- package/python3.4.2/bin/python3.4m-config +111 -0
- package/python3.4.2/bin/pyvenv +11 -0
- package/python3.4.2/bin/pyvenv-3.4 +11 -0
- package/python3.4.2/include/python3.4m/Python-ast.h +569 -0
- package/python3.4.2/include/python3.4m/Python.h +133 -0
- package/python3.4.2/include/python3.4m/abstract.h +1267 -0
- package/python3.4.2/include/python3.4m/accu.h +37 -0
- package/python3.4.2/include/python3.4m/asdl.h +45 -0
- package/python3.4.2/include/python3.4m/ast.h +22 -0
- package/python3.4.2/include/python3.4m/bitset.h +32 -0
- package/python3.4.2/include/python3.4m/bltinmodule.h +14 -0
- package/python3.4.2/include/python3.4m/boolobject.h +34 -0
- package/python3.4.2/include/python3.4m/bytearrayobject.h +62 -0
- package/python3.4.2/include/python3.4m/bytes_methods.h +46 -0
- package/python3.4.2/include/python3.4m/bytesobject.h +128 -0
- package/python3.4.2/include/python3.4m/cellobject.h +29 -0
- package/python3.4.2/include/python3.4m/ceval.h +205 -0
- package/python3.4.2/include/python3.4m/classobject.h +58 -0
- package/python3.4.2/include/python3.4m/code.h +115 -0
- package/python3.4.2/include/python3.4m/codecs.h +233 -0
- package/python3.4.2/include/python3.4m/compile.h +72 -0
- package/python3.4.2/include/python3.4m/complexobject.h +77 -0
- package/python3.4.2/include/python3.4m/datetime.h +243 -0
- package/python3.4.2/include/python3.4m/descrobject.h +105 -0
- package/python3.4.2/include/python3.4m/dictobject.h +126 -0
- package/python3.4.2/include/python3.4m/dtoa.h +19 -0
- package/python3.4.2/include/python3.4m/dynamic_annotations.h +499 -0
- package/python3.4.2/include/python3.4m/enumobject.h +17 -0
- package/python3.4.2/include/python3.4m/errcode.h +38 -0
- package/python3.4.2/include/python3.4m/eval.h +27 -0
- package/python3.4.2/include/python3.4m/fileobject.h +58 -0
- package/python3.4.2/include/python3.4m/fileutils.h +79 -0
- package/python3.4.2/include/python3.4m/floatobject.h +128 -0
- package/python3.4.2/include/python3.4m/frameobject.h +95 -0
- package/python3.4.2/include/python3.4m/funcobject.h +89 -0
- package/python3.4.2/include/python3.4m/genobject.h +46 -0
- package/python3.4.2/include/python3.4m/graminit.h +84 -0
- package/python3.4.2/include/python3.4m/grammar.h +93 -0
- package/python3.4.2/include/python3.4m/import.h +130 -0
- package/python3.4.2/include/python3.4m/intrcheck.h +21 -0
- package/python3.4.2/include/python3.4m/iterobject.h +25 -0
- package/python3.4.2/include/python3.4m/listobject.h +80 -0
- package/python3.4.2/include/python3.4m/longintrepr.h +103 -0
- package/python3.4.2/include/python3.4m/longobject.h +204 -0
- package/python3.4.2/include/python3.4m/marshal.h +28 -0
- package/python3.4.2/include/python3.4m/memoryobject.h +74 -0
- package/python3.4.2/include/python3.4m/metagrammar.h +18 -0
- package/python3.4.2/include/python3.4m/methodobject.h +93 -0
- package/python3.4.2/include/python3.4m/modsupport.h +132 -0
- package/python3.4.2/include/python3.4m/moduleobject.h +63 -0
- package/python3.4.2/include/python3.4m/namespaceobject.h +17 -0
- package/python3.4.2/include/python3.4m/node.h +44 -0
- package/python3.4.2/include/python3.4m/object.h +1015 -0
- package/python3.4.2/include/python3.4m/objimpl.h +361 -0
- package/python3.4.2/include/python3.4m/opcode.h +159 -0
- package/python3.4.2/include/python3.4m/osdefs.h +50 -0
- package/python3.4.2/include/python3.4m/parsetok.h +108 -0
- package/python3.4.2/include/python3.4m/patchlevel.h +35 -0
- package/python3.4.2/include/python3.4m/pgen.h +18 -0
- package/python3.4.2/include/python3.4m/pgenheaders.h +42 -0
- package/python3.4.2/include/python3.4m/py_curses.h +177 -0
- package/python3.4.2/include/python3.4m/pyarena.h +64 -0
- package/python3.4.2/include/python3.4m/pyatomic.h +184 -0
- package/python3.4.2/include/python3.4m/pycapsule.h +59 -0
- package/python3.4.2/include/python3.4m/pyconfig.h +1503 -0
- package/python3.4.2/include/python3.4m/pyctype.h +33 -0
- package/python3.4.2/include/python3.4m/pydebug.h +34 -0
- package/python3.4.2/include/python3.4m/pyerrors.h +464 -0
- package/python3.4.2/include/python3.4m/pyexpat.h +53 -0
- package/python3.4.2/include/python3.4m/pyfpe.h +176 -0
- package/python3.4.2/include/python3.4m/pygetopt.h +21 -0
- package/python3.4.2/include/python3.4m/pyhash.h +149 -0
- package/python3.4.2/include/python3.4m/pymacconfig.h +102 -0
- package/python3.4.2/include/python3.4m/pymacro.h +78 -0
- package/python3.4.2/include/python3.4m/pymath.h +190 -0
- package/python3.4.2/include/python3.4m/pymem.h +183 -0
- package/python3.4.2/include/python3.4m/pyport.h +883 -0
- package/python3.4.2/include/python3.4m/pystate.h +271 -0
- package/python3.4.2/include/python3.4m/pystrcmp.h +23 -0
- package/python3.4.2/include/python3.4m/pystrtod.h +41 -0
- package/python3.4.2/include/python3.4m/pythonrun.h +304 -0
- package/python3.4.2/include/python3.4m/pythread.h +93 -0
- package/python3.4.2/include/python3.4m/pytime.h +105 -0
- package/python3.4.2/include/python3.4m/rangeobject.h +27 -0
- package/python3.4.2/include/python3.4m/setobject.h +113 -0
- package/python3.4.2/include/python3.4m/sliceobject.h +50 -0
- package/python3.4.2/include/python3.4m/structmember.h +76 -0
- package/python3.4.2/include/python3.4m/structseq.h +49 -0
- package/python3.4.2/include/python3.4m/symtable.h +122 -0
- package/python3.4.2/include/python3.4m/sysmodule.h +43 -0
- package/python3.4.2/include/python3.4m/token.h +87 -0
- package/python3.4.2/include/python3.4m/traceback.h +72 -0
- package/python3.4.2/include/python3.4m/tupleobject.h +73 -0
- package/python3.4.2/include/python3.4m/typeslots.h +76 -0
- package/python3.4.2/include/python3.4m/ucnhash.h +36 -0
- package/python3.4.2/include/python3.4m/unicodeobject.h +2271 -0
- package/python3.4.2/include/python3.4m/warnings.h +54 -0
- package/python3.4.2/include/python3.4m/weakrefobject.h +86 -0
- package/python3.4.2/lib/pkgconfig/python-3.4.pc +13 -0
- package/python3.4.2/lib/pkgconfig/python-3.4m.pc +13 -0
- package/python3.4.2/lib/pkgconfig/python3.pc +13 -0
- package/python3.4.2/lib/python3.4/LICENSE.txt +254 -0
- package/python3.4.2/lib/python3.4/__future__.py +134 -0
- package/python3.4.2/lib/python3.4/__phello__.foo.py +1 -0
- package/python3.4.2/lib/python3.4/__pycache__/_bootlocale.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_collections_abc.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_sitebuiltins.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_sysconfigdata.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_weakrefset.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/abc.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/codecs.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/genericpath.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/io.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/os.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/posixpath.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/rlcompleter.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/site.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/stat.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/sysconfig.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/_bootlocale.py +34 -0
- package/python3.4.2/lib/python3.4/_collections_abc.py +753 -0
- package/python3.4.2/lib/python3.4/_compat_pickle.py +137 -0
- package/python3.4.2/lib/python3.4/_dummy_thread.py +155 -0
- package/python3.4.2/lib/python3.4/_markupbase.py +395 -0
- package/python3.4.2/lib/python3.4/_osx_support.py +502 -0
- package/python3.4.2/lib/python3.4/_pyio.py +2105 -0
- package/python3.4.2/lib/python3.4/_sitebuiltins.py +103 -0
- package/python3.4.2/lib/python3.4/_strptime.py +511 -0
- package/python3.4.2/lib/python3.4/_sysconfigdata.py +710 -0
- package/python3.4.2/lib/python3.4/_threading_local.py +246 -0
- package/python3.4.2/lib/python3.4/_weakrefset.py +196 -0
- package/python3.4.2/lib/python3.4/abc.py +248 -0
- package/python3.4.2/lib/python3.4/aifc.py +918 -0
- package/python3.4.2/lib/python3.4/antigravity.py +17 -0
- package/python3.4.2/lib/python3.4/argparse.py +2379 -0
- package/python3.4.2/lib/python3.4/ast.py +315 -0
- package/python3.4.2/lib/python3.4/asynchat.py +333 -0
- package/python3.4.2/lib/python3.4/asyncio/__init__.py +48 -0
- package/python3.4.2/lib/python3.4/asyncio/base_events.py +1055 -0
- package/python3.4.2/lib/python3.4/asyncio/base_subprocess.py +197 -0
- package/python3.4.2/lib/python3.4/asyncio/constants.py +7 -0
- package/python3.4.2/lib/python3.4/asyncio/coroutines.py +195 -0
- package/python3.4.2/lib/python3.4/asyncio/events.py +586 -0
- package/python3.4.2/lib/python3.4/asyncio/futures.py +411 -0
- package/python3.4.2/lib/python3.4/asyncio/locks.py +469 -0
- package/python3.4.2/lib/python3.4/asyncio/log.py +7 -0
- package/python3.4.2/lib/python3.4/asyncio/proactor_events.py +499 -0
- package/python3.4.2/lib/python3.4/asyncio/protocols.py +129 -0
- package/python3.4.2/lib/python3.4/asyncio/queues.py +288 -0
- package/python3.4.2/lib/python3.4/asyncio/selector_events.py +996 -0
- package/python3.4.2/lib/python3.4/asyncio/streams.py +485 -0
- package/python3.4.2/lib/python3.4/asyncio/subprocess.py +228 -0
- package/python3.4.2/lib/python3.4/asyncio/tasks.py +658 -0
- package/python3.4.2/lib/python3.4/asyncio/test_utils.py +425 -0
- package/python3.4.2/lib/python3.4/asyncio/transports.py +298 -0
- package/python3.4.2/lib/python3.4/asyncio/unix_events.py +922 -0
- package/python3.4.2/lib/python3.4/asyncio/windows_events.py +634 -0
- package/python3.4.2/lib/python3.4/asyncio/windows_utils.py +207 -0
- package/python3.4.2/lib/python3.4/asyncore.py +666 -0
- package/python3.4.2/lib/python3.4/base64.py +602 -0
- package/python3.4.2/lib/python3.4/bdb.py +673 -0
- package/python3.4.2/lib/python3.4/binhex.py +471 -0
- package/python3.4.2/lib/python3.4/bisect.py +92 -0
- package/python3.4.2/lib/python3.4/bz2.py +521 -0
- package/python3.4.2/lib/python3.4/cProfile.py +160 -0
- package/python3.4.2/lib/python3.4/calendar.py +703 -0
- package/python3.4.2/lib/python3.4/cgi.py +1061 -0
- package/python3.4.2/lib/python3.4/cgitb.py +320 -0
- package/python3.4.2/lib/python3.4/chunk.py +167 -0
- package/python3.4.2/lib/python3.4/cmd.py +401 -0
- package/python3.4.2/lib/python3.4/code.py +302 -0
- package/python3.4.2/lib/python3.4/codecs.py +1110 -0
- package/python3.4.2/lib/python3.4/codeop.py +168 -0
- package/python3.4.2/lib/python3.4/collections/__init__.py +1132 -0
- package/python3.4.2/lib/python3.4/collections/__main__.py +38 -0
- package/python3.4.2/lib/python3.4/collections/abc.py +2 -0
- package/python3.4.2/lib/python3.4/colorsys.py +164 -0
- package/python3.4.2/lib/python3.4/compileall.py +241 -0
- package/python3.4.2/lib/python3.4/concurrent/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/__init__.py +18 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/_base.py +575 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/process.py +427 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/thread.py +132 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Makefile +1835 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup +466 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup.config +13 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup.local +1 -0
- package/python3.4.2/lib/python3.4/config-3.4m/config.c +234 -0
- package/python3.4.2/lib/python3.4/config-3.4m/config.c.in +67 -0
- package/python3.4.2/lib/python3.4/config-3.4m/install-sh +294 -0
- package/python3.4.2/lib/python3.4/config-3.4m/makesetup +293 -0
- package/python3.4.2/lib/python3.4/config-3.4m/python-config.py +68 -0
- package/python3.4.2/lib/python3.4/configparser.py +1254 -0
- package/python3.4.2/lib/python3.4/contextlib.py +340 -0
- package/python3.4.2/lib/python3.4/copy.py +333 -0
- package/python3.4.2/lib/python3.4/copyreg.py +202 -0
- package/python3.4.2/lib/python3.4/crypt.py +62 -0
- package/python3.4.2/lib/python3.4/csv.py +449 -0
- package/python3.4.2/lib/python3.4/ctypes/__init__.py +541 -0
- package/python3.4.2/lib/python3.4/ctypes/_endian.py +59 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/README.ctypes +7 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/__init__.py +9 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/dyld.py +158 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/dylib.py +63 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib +2 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib.bat +1 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/framework.py +65 -0
- package/python3.4.2/lib/python3.4/ctypes/test/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/ctypes/test/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_anon.py +60 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_array_in_pointer.py +64 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_arrays.py +181 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_as_parameter.py +226 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_bitfields.py +263 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_buffers.py +64 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_bytes.py +65 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_byteswap.py +295 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_callbacks.py +247 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_cast.py +86 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_cfuncs.py +212 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_checkretval.py +36 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_delattr.py +21 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_errno.py +79 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_find.py +81 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_frombuffer.py +81 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_funcptr.py +127 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_functions.py +402 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_incomplete.py +42 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_init.py +40 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_internals.py +100 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_keeprefs.py +153 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_libc.py +33 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_loading.py +119 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_macholib.py +63 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_memfunctions.py +79 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_numbers.py +290 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_objects.py +67 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_parameters.py +176 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pep3118.py +206 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pickling.py +83 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pointers.py +192 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_prototypes.py +219 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_python_api.py +89 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_random_things.py +74 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_refcounts.py +101 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_repr.py +29 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_returnfuncptrs.py +67 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_simplesubclasses.py +55 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_sizes.py +34 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_slicing.py +167 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_stringptr.py +77 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_strings.py +225 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_struct_fields.py +50 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_structures.py +468 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_unaligned_structures.py +45 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_unicode.py +56 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_values.py +95 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_varsize_struct.py +50 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_win32.py +119 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_wintypes.py +41 -0
- package/python3.4.2/lib/python3.4/ctypes/util.py +267 -0
- package/python3.4.2/lib/python3.4/ctypes/wintypes.py +202 -0
- package/python3.4.2/lib/python3.4/curses/__init__.py +101 -0
- package/python3.4.2/lib/python3.4/curses/ascii.py +99 -0
- package/python3.4.2/lib/python3.4/curses/has_key.py +192 -0
- package/python3.4.2/lib/python3.4/curses/panel.py +6 -0
- package/python3.4.2/lib/python3.4/curses/textpad.py +188 -0
- package/python3.4.2/lib/python3.4/datetime.py +2136 -0
- package/python3.4.2/lib/python3.4/dbm/__init__.py +188 -0
- package/python3.4.2/lib/python3.4/dbm/dumb.py +291 -0
- package/python3.4.2/lib/python3.4/dbm/gnu.py +3 -0
- package/python3.4.2/lib/python3.4/dbm/ndbm.py +3 -0
- package/python3.4.2/lib/python3.4/decimal.py +6414 -0
- package/python3.4.2/lib/python3.4/difflib.py +2039 -0
- package/python3.4.2/lib/python3.4/dis.py +475 -0
- package/python3.4.2/lib/python3.4/distutils/README +13 -0
- package/python3.4.2/lib/python3.4/distutils/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/distutils/archive_util.py +245 -0
- package/python3.4.2/lib/python3.4/distutils/bcppcompiler.py +393 -0
- package/python3.4.2/lib/python3.4/distutils/ccompiler.py +1115 -0
- package/python3.4.2/lib/python3.4/distutils/cmd.py +435 -0
- package/python3.4.2/lib/python3.4/distutils/command/__init__.py +31 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist.py +142 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_dumb.py +122 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_msi.py +741 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_rpm.py +582 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_wininst.py +349 -0
- package/python3.4.2/lib/python3.4/distutils/command/build.py +148 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_clib.py +209 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_ext.py +735 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_py.py +416 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_scripts.py +160 -0
- package/python3.4.2/lib/python3.4/distutils/command/check.py +145 -0
- package/python3.4.2/lib/python3.4/distutils/command/clean.py +76 -0
- package/python3.4.2/lib/python3.4/distutils/command/command_template +33 -0
- package/python3.4.2/lib/python3.4/distutils/command/config.py +347 -0
- package/python3.4.2/lib/python3.4/distutils/command/install.py +650 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_data.py +79 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_egg_info.py +77 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_headers.py +47 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_lib.py +217 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_scripts.py +60 -0
- package/python3.4.2/lib/python3.4/distutils/command/register.py +304 -0
- package/python3.4.2/lib/python3.4/distutils/command/sdist.py +467 -0
- package/python3.4.2/lib/python3.4/distutils/command/upload.py +202 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0-amd64.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-6.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-7.1.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-8.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0-amd64.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/config.py +131 -0
- package/python3.4.2/lib/python3.4/distutils/core.py +237 -0
- package/python3.4.2/lib/python3.4/distutils/cygwinccompiler.py +405 -0
- package/python3.4.2/lib/python3.4/distutils/debug.py +5 -0
- package/python3.4.2/lib/python3.4/distutils/dep_util.py +92 -0
- package/python3.4.2/lib/python3.4/distutils/dir_util.py +210 -0
- package/python3.4.2/lib/python3.4/distutils/dist.py +1238 -0
- package/python3.4.2/lib/python3.4/distutils/errors.py +97 -0
- package/python3.4.2/lib/python3.4/distutils/extension.py +233 -0
- package/python3.4.2/lib/python3.4/distutils/fancy_getopt.py +457 -0
- package/python3.4.2/lib/python3.4/distutils/file_util.py +230 -0
- package/python3.4.2/lib/python3.4/distutils/filelist.py +328 -0
- package/python3.4.2/lib/python3.4/distutils/log.py +75 -0
- package/python3.4.2/lib/python3.4/distutils/msvc9compiler.py +788 -0
- package/python3.4.2/lib/python3.4/distutils/msvccompiler.py +640 -0
- package/python3.4.2/lib/python3.4/distutils/spawn.py +195 -0
- package/python3.4.2/lib/python3.4/distutils/sysconfig.py +562 -0
- package/python3.4.2/lib/python3.4/distutils/tests/Setup.sample +67 -0
- package/python3.4.2/lib/python3.4/distutils/tests/__init__.py +36 -0
- package/python3.4.2/lib/python3.4/distutils/tests/support.py +210 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_archive_util.py +341 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist.py +50 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_dumb.py +97 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_msi.py +25 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_rpm.py +134 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_wininst.py +31 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build.py +55 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_clib.py +143 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_ext.py +488 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_py.py +178 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_scripts.py +112 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_check.py +106 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_clean.py +51 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_cmd.py +126 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_config.py +120 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_config_cmd.py +89 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_core.py +108 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_cygwinccompiler.py +155 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dep_util.py +81 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dir_util.py +139 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dist.py +454 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_extension.py +69 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_file_util.py +85 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_filelist.py +299 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install.py +246 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_data.py +77 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_headers.py +41 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_lib.py +115 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_scripts.py +82 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_log.py +37 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_msvc9compiler.py +184 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_register.py +309 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_sdist.py +484 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_spawn.py +58 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_sysconfig.py +207 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_text_file.py +107 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_unixccompiler.py +150 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_upload.py +151 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_util.py +300 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_version.py +71 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_versionpredicate.py +13 -0
- package/python3.4.2/lib/python3.4/distutils/tests/xxmodule.c +396 -0
- package/python3.4.2/lib/python3.4/distutils/text_file.py +285 -0
- package/python3.4.2/lib/python3.4/distutils/unixccompiler.py +298 -0
- package/python3.4.2/lib/python3.4/distutils/util.py +553 -0
- package/python3.4.2/lib/python3.4/distutils/version.py +349 -0
- package/python3.4.2/lib/python3.4/distutils/versionpredicate.py +166 -0
- package/python3.4.2/lib/python3.4/doctest.py +2793 -0
- package/python3.4.2/lib/python3.4/dummy_threading.py +78 -0
- package/python3.4.2/lib/python3.4/email/__init__.py +64 -0
- package/python3.4.2/lib/python3.4/email/_encoded_words.py +221 -0
- package/python3.4.2/lib/python3.4/email/_header_value_parser.py +2947 -0
- package/python3.4.2/lib/python3.4/email/_parseaddr.py +540 -0
- package/python3.4.2/lib/python3.4/email/_policybase.py +358 -0
- package/python3.4.2/lib/python3.4/email/architecture.rst +216 -0
- package/python3.4.2/lib/python3.4/email/base64mime.py +119 -0
- package/python3.4.2/lib/python3.4/email/charset.py +409 -0
- package/python3.4.2/lib/python3.4/email/contentmanager.py +249 -0
- package/python3.4.2/lib/python3.4/email/encoders.py +69 -0
- package/python3.4.2/lib/python3.4/email/errors.py +107 -0
- package/python3.4.2/lib/python3.4/email/feedparser.py +526 -0
- package/python3.4.2/lib/python3.4/email/generator.py +507 -0
- package/python3.4.2/lib/python3.4/email/header.py +581 -0
- package/python3.4.2/lib/python3.4/email/headerregistry.py +583 -0
- package/python3.4.2/lib/python3.4/email/iterators.py +71 -0
- package/python3.4.2/lib/python3.4/email/message.py +1147 -0
- package/python3.4.2/lib/python3.4/email/mime/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/email/mime/application.py +36 -0
- package/python3.4.2/lib/python3.4/email/mime/audio.py +73 -0
- package/python3.4.2/lib/python3.4/email/mime/base.py +26 -0
- package/python3.4.2/lib/python3.4/email/mime/image.py +46 -0
- package/python3.4.2/lib/python3.4/email/mime/message.py +34 -0
- package/python3.4.2/lib/python3.4/email/mime/multipart.py +47 -0
- package/python3.4.2/lib/python3.4/email/mime/nonmultipart.py +22 -0
- package/python3.4.2/lib/python3.4/email/mime/text.py +41 -0
- package/python3.4.2/lib/python3.4/email/parser.py +132 -0
- package/python3.4.2/lib/python3.4/email/policy.py +201 -0
- package/python3.4.2/lib/python3.4/email/quoprimime.py +299 -0
- package/python3.4.2/lib/python3.4/email/utils.py +399 -0
- package/python3.4.2/lib/python3.4/encodings/__init__.py +152 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/__init__.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/aliases.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/ascii.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/latin_1.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/utf_8.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/aliases.py +544 -0
- package/python3.4.2/lib/python3.4/encodings/ascii.py +50 -0
- package/python3.4.2/lib/python3.4/encodings/base64_codec.py +55 -0
- package/python3.4.2/lib/python3.4/encodings/big5.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/big5hkscs.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/bz2_codec.py +78 -0
- package/python3.4.2/lib/python3.4/encodings/charmap.py +69 -0
- package/python3.4.2/lib/python3.4/encodings/cp037.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1006.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1026.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1125.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp1140.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1250.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1251.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1252.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1253.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1254.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1255.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1256.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1257.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1258.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp273.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp424.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp437.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp500.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp65001.py +40 -0
- package/python3.4.2/lib/python3.4/encodings/cp720.py +309 -0
- package/python3.4.2/lib/python3.4/encodings/cp737.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp775.py +697 -0
- package/python3.4.2/lib/python3.4/encodings/cp850.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp852.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp855.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp856.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp857.py +694 -0
- package/python3.4.2/lib/python3.4/encodings/cp858.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp860.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp861.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp862.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp863.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp864.py +690 -0
- package/python3.4.2/lib/python3.4/encodings/cp865.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp866.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp869.py +689 -0
- package/python3.4.2/lib/python3.4/encodings/cp874.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp875.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp932.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/cp949.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/cp950.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jis_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jisx0213.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jp.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_kr.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gb18030.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gb2312.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gbk.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/hex_codec.py +55 -0
- package/python3.4.2/lib/python3.4/encodings/hp_roman8.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/hz.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/idna.py +309 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_1.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_3.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_ext.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_kr.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_1.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_10.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_11.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_13.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_14.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_15.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_16.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_2.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_3.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_4.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_5.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_6.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_7.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_8.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_9.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/johab.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/koi8_r.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/koi8_u.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/latin_1.py +50 -0
- package/python3.4.2/lib/python3.4/encodings/mac_arabic.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/mac_centeuro.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_croatian.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_cyrillic.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_farsi.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_greek.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_iceland.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_latin2.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/mac_roman.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_romanian.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_turkish.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mbcs.py +47 -0
- package/python3.4.2/lib/python3.4/encodings/palmos.py +308 -0
- package/python3.4.2/lib/python3.4/encodings/ptcp154.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/punycode.py +237 -0
- package/python3.4.2/lib/python3.4/encodings/quopri_codec.py +56 -0
- package/python3.4.2/lib/python3.4/encodings/raw_unicode_escape.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/rot_13.py +113 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jis.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jis_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jisx0213.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/tis_620.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/undefined.py +49 -0
- package/python3.4.2/lib/python3.4/encodings/unicode_escape.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/unicode_internal.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16.py +155 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16_be.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16_le.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32.py +150 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32_be.py +37 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32_le.py +37 -0
- package/python3.4.2/lib/python3.4/encodings/utf_7.py +38 -0
- package/python3.4.2/lib/python3.4/encodings/utf_8.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_8_sig.py +130 -0
- package/python3.4.2/lib/python3.4/encodings/uu_codec.py +99 -0
- package/python3.4.2/lib/python3.4/encodings/zlib_codec.py +77 -0
- package/python3.4.2/lib/python3.4/ensurepip/__init__.py +210 -0
- package/python3.4.2/lib/python3.4/ensurepip/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl +0 -0
- package/python3.4.2/lib/python3.4/ensurepip/_bundled/setuptools-2.1-py2.py3-none-any.whl +0 -0
- package/python3.4.2/lib/python3.4/ensurepip/_uninstall.py +30 -0
- package/python3.4.2/lib/python3.4/enum.py +525 -0
- package/python3.4.2/lib/python3.4/filecmp.py +305 -0
- package/python3.4.2/lib/python3.4/fileinput.py +429 -0
- package/python3.4.2/lib/python3.4/fnmatch.py +109 -0
- package/python3.4.2/lib/python3.4/formatter.py +448 -0
- package/python3.4.2/lib/python3.4/fractions.py +630 -0
- package/python3.4.2/lib/python3.4/ftplib.py +1088 -0
- package/python3.4.2/lib/python3.4/functools.py +721 -0
- package/python3.4.2/lib/python3.4/genericpath.py +132 -0
- package/python3.4.2/lib/python3.4/getopt.py +215 -0
- package/python3.4.2/lib/python3.4/getpass.py +186 -0
- package/python3.4.2/lib/python3.4/gettext.py +523 -0
- package/python3.4.2/lib/python3.4/glob.py +110 -0
- package/python3.4.2/lib/python3.4/gzip.py +674 -0
- package/python3.4.2/lib/python3.4/hashlib.py +217 -0
- package/python3.4.2/lib/python3.4/heapq.py +476 -0
- package/python3.4.2/lib/python3.4/hmac.py +144 -0
- package/python3.4.2/lib/python3.4/html/__init__.py +132 -0
- package/python3.4.2/lib/python3.4/html/entities.py +2506 -0
- package/python3.4.2/lib/python3.4/html/parser.py +550 -0
- package/python3.4.2/lib/python3.4/http/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/http/client.py +1302 -0
- package/python3.4.2/lib/python3.4/http/cookiejar.py +2080 -0
- package/python3.4.2/lib/python3.4/http/cookies.py +578 -0
- package/python3.4.2/lib/python3.4/http/server.py +1241 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoComplete.py +233 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoCompleteWindow.py +415 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoExpand.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/Bindings.py +94 -0
- package/python3.4.2/lib/python3.4/idlelib/CREDITS.txt +37 -0
- package/python3.4.2/lib/python3.4/idlelib/CallTipWindow.py +170 -0
- package/python3.4.2/lib/python3.4/idlelib/CallTips.py +175 -0
- package/python3.4.2/lib/python3.4/idlelib/ChangeLog +1591 -0
- package/python3.4.2/lib/python3.4/idlelib/ClassBrowser.py +229 -0
- package/python3.4.2/lib/python3.4/idlelib/CodeContext.py +176 -0
- package/python3.4.2/lib/python3.4/idlelib/ColorDelegator.py +254 -0
- package/python3.4.2/lib/python3.4/idlelib/Debugger.py +490 -0
- package/python3.4.2/lib/python3.4/idlelib/Delegator.py +25 -0
- package/python3.4.2/lib/python3.4/idlelib/EditorWindow.py +1729 -0
- package/python3.4.2/lib/python3.4/idlelib/FileList.py +129 -0
- package/python3.4.2/lib/python3.4/idlelib/FormatParagraph.py +193 -0
- package/python3.4.2/lib/python3.4/idlelib/GrepDialog.py +159 -0
- package/python3.4.2/lib/python3.4/idlelib/HISTORY.txt +296 -0
- package/python3.4.2/lib/python3.4/idlelib/HyperParser.py +313 -0
- package/python3.4.2/lib/python3.4/idlelib/IOBinding.py +555 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/folder.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle.icns +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle.ico +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/minusnode.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/openfolder.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/plusnode.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/python.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/tk.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/IdleHistory.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/MultiCall.py +453 -0
- package/python3.4.2/lib/python3.4/idlelib/MultiStatusBar.py +45 -0
- package/python3.4.2/lib/python3.4/idlelib/NEWS.txt +877 -0
- package/python3.4.2/lib/python3.4/idlelib/ObjectBrowser.py +143 -0
- package/python3.4.2/lib/python3.4/idlelib/OutputWindow.py +144 -0
- package/python3.4.2/lib/python3.4/idlelib/ParenMatch.py +178 -0
- package/python3.4.2/lib/python3.4/idlelib/PathBrowser.py +106 -0
- package/python3.4.2/lib/python3.4/idlelib/Percolator.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/PyParse.py +618 -0
- package/python3.4.2/lib/python3.4/idlelib/PyShell.py +1619 -0
- package/python3.4.2/lib/python3.4/idlelib/README.txt +60 -0
- package/python3.4.2/lib/python3.4/idlelib/RemoteDebugger.py +389 -0
- package/python3.4.2/lib/python3.4/idlelib/RemoteObjectBrowser.py +36 -0
- package/python3.4.2/lib/python3.4/idlelib/ReplaceDialog.py +221 -0
- package/python3.4.2/lib/python3.4/idlelib/RstripExtension.py +33 -0
- package/python3.4.2/lib/python3.4/idlelib/ScriptBinding.py +207 -0
- package/python3.4.2/lib/python3.4/idlelib/ScrolledList.py +140 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchDialog.py +89 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchDialogBase.py +184 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchEngine.py +233 -0
- package/python3.4.2/lib/python3.4/idlelib/StackViewer.py +152 -0
- package/python3.4.2/lib/python3.4/idlelib/TODO.txt +210 -0
- package/python3.4.2/lib/python3.4/idlelib/ToolTip.py +97 -0
- package/python3.4.2/lib/python3.4/idlelib/TreeWidget.py +465 -0
- package/python3.4.2/lib/python3.4/idlelib/UndoDelegator.py +365 -0
- package/python3.4.2/lib/python3.4/idlelib/WidgetRedirector.py +174 -0
- package/python3.4.2/lib/python3.4/idlelib/WindowList.py +90 -0
- package/python3.4.2/lib/python3.4/idlelib/ZoomHeight.py +51 -0
- package/python3.4.2/lib/python3.4/idlelib/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/idlelib/__main__.py +9 -0
- package/python3.4.2/lib/python3.4/idlelib/aboutDialog.py +145 -0
- package/python3.4.2/lib/python3.4/idlelib/config-extensions.def +96 -0
- package/python3.4.2/lib/python3.4/idlelib/config-highlight.def +64 -0
- package/python3.4.2/lib/python3.4/idlelib/config-keys.def +214 -0
- package/python3.4.2/lib/python3.4/idlelib/config-main.def +79 -0
- package/python3.4.2/lib/python3.4/idlelib/configDialog.py +1195 -0
- package/python3.4.2/lib/python3.4/idlelib/configHandler.py +722 -0
- package/python3.4.2/lib/python3.4/idlelib/configHelpSourceEdit.py +166 -0
- package/python3.4.2/lib/python3.4/idlelib/configSectionNameDialog.py +98 -0
- package/python3.4.2/lib/python3.4/idlelib/dynOptionMenuWidget.py +57 -0
- package/python3.4.2/lib/python3.4/idlelib/extend.txt +83 -0
- package/python3.4.2/lib/python3.4/idlelib/help.txt +368 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.bat +4 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.py +11 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.pyw +21 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/README.txt +115 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/__init__.py +9 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/htest.py +369 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_idle.py +55 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_tk.py +298 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autocomplete.py +143 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autoexpand.py +141 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_calltips.py +172 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_config_name.py +75 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_configdialog.py +32 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_delegator.py +37 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_formatparagraph.py +377 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_grep.py +80 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_hyperparser.py +273 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_idlehistory.py +167 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_parenmatch.py +109 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_pathbrowser.py +12 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_rstrip.py +49 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchdialogbase.py +165 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchengine.py +329 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_text.py +228 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_textview.py +97 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_warning.py +73 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_widgetredir.py +122 -0
- package/python3.4.2/lib/python3.4/idlelib/idlever.py +1 -0
- package/python3.4.2/lib/python3.4/idlelib/keybindingDialog.py +266 -0
- package/python3.4.2/lib/python3.4/idlelib/macosxSupport.py +239 -0
- package/python3.4.2/lib/python3.4/idlelib/rpc.py +624 -0
- package/python3.4.2/lib/python3.4/idlelib/run.py +404 -0
- package/python3.4.2/lib/python3.4/idlelib/tabbedpages.py +498 -0
- package/python3.4.2/lib/python3.4/idlelib/testcode.py +31 -0
- package/python3.4.2/lib/python3.4/idlelib/textView.py +86 -0
- package/python3.4.2/lib/python3.4/imaplib.py +1549 -0
- package/python3.4.2/lib/python3.4/imghdr.py +154 -0
- package/python3.4.2/lib/python3.4/imp.py +315 -0
- package/python3.4.2/lib/python3.4/importlib/__init__.py +156 -0
- package/python3.4.2/lib/python3.4/importlib/_bootstrap.py +2461 -0
- package/python3.4.2/lib/python3.4/importlib/abc.py +323 -0
- package/python3.4.2/lib/python3.4/importlib/machinery.py +21 -0
- package/python3.4.2/lib/python3.4/importlib/util.py +202 -0
- package/python3.4.2/lib/python3.4/inspect.py +2759 -0
- package/python3.4.2/lib/python3.4/io.py +92 -0
- package/python3.4.2/lib/python3.4/ipaddress.py +2183 -0
- package/python3.4.2/lib/python3.4/json/__init__.py +331 -0
- package/python3.4.2/lib/python3.4/json/decoder.py +362 -0
- package/python3.4.2/lib/python3.4/json/encoder.py +433 -0
- package/python3.4.2/lib/python3.4/json/scanner.py +73 -0
- package/python3.4.2/lib/python3.4/json/tool.py +39 -0
- package/python3.4.2/lib/python3.4/keyword.py +94 -0
- package/python3.4.2/lib/python3.4/lib2to3/Grammar.txt +159 -0
- package/python3.4.2/lib/python3.4/lib2to3/Grammar3.4.2.final.0.pickle +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar.txt +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar3.4.2.final.0.pickle +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/lib2to3/btm_matcher.py +168 -0
- package/python3.4.2/lib/python3.4/lib2to3/btm_utils.py +281 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixer_base.py +187 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixer_util.py +455 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_apply.py +59 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_asserts.py +34 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_basestring.py +14 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_buffer.py +22 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_callable.py +37 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_dict.py +107 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_except.py +93 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exec.py +40 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_execfile.py +52 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exitfunc.py +72 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_filter.py +76 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_funcattrs.py +21 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_future.py +22 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_getcwdu.py +19 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_has_key.py +110 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_idioms.py +152 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_import.py +99 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports.py +145 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports2.py +16 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_input.py +26 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_intern.py +31 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_isinstance.py +52 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools.py +43 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools_imports.py +57 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_long.py +19 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_map.py +91 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_metaclass.py +228 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_methodattrs.py +24 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ne.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_next.py +103 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_nonzero.py +21 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_numliterals.py +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_operator.py +98 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_paren.py +44 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_print.py +87 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raise.py +90 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raw_input.py +17 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reduce.py +35 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reload.py +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_renames.py +70 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_repr.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_set_literal.py +53 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_standarderror.py +18 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_sys_exc.py +30 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_throw.py +56 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_tuple_params.py +175 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_types.py +62 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_unicode.py +42 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_urllib.py +197 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ws_comma.py +39 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xrange.py +73 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xreadlines.py +25 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_zip.py +35 -0
- package/python3.4.2/lib/python3.4/lib2to3/main.py +268 -0
- package/python3.4.2/lib/python3.4/lib2to3/patcomp.py +205 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/conv.py +257 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/driver.py +157 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/grammar.py +183 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/literals.py +60 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/parse.py +201 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/pgen.py +386 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/token.py +83 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/tokenize.py +502 -0
- package/python3.4.2/lib/python3.4/lib2to3/pygram.py +40 -0
- package/python3.4.2/lib/python3.4/lib2to3/pytree.py +864 -0
- package/python3.4.2/lib/python3.4/lib2to3/refactor.py +747 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/__init__.py +24 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/README +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/bom.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/crlf.py +3 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/different_encoding.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/false_encoding.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/bad_order.py +5 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_explicit.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_first.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_last.py +7 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_parrot.py +13 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_preorder.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/no_fixer_cls.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/parrot_example.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/infinite_recursion.py +2669 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/py2_test_grammar.py +974 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/py3_test_grammar.py +923 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/pytree_idempotency.py +92 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/support.py +54 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_all_fixers.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_fixers.py +4687 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_main.py +139 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_parser.py +249 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_pytree.py +477 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_refactor.py +321 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_util.py +594 -0
- package/python3.4.2/lib/python3.4/linecache.py +134 -0
- package/python3.4.2/lib/python3.4/locale.py +1559 -0
- package/python3.4.2/lib/python3.4/logging/__init__.py +1950 -0
- package/python3.4.2/lib/python3.4/logging/config.py +927 -0
- package/python3.4.2/lib/python3.4/logging/handlers.py +1452 -0
- package/python3.4.2/lib/python3.4/lzma.py +511 -0
- package/python3.4.2/lib/python3.4/macpath.py +205 -0
- package/python3.4.2/lib/python3.4/macurl2path.py +77 -0
- package/python3.4.2/lib/python3.4/mailbox.py +2136 -0
- package/python3.4.2/lib/python3.4/mailcap.py +253 -0
- package/python3.4.2/lib/python3.4/mimetypes.py +592 -0
- package/python3.4.2/lib/python3.4/modulefinder.py +642 -0
- package/python3.4.2/lib/python3.4/multiprocessing/__init__.py +38 -0
- package/python3.4.2/lib/python3.4/multiprocessing/connection.py +954 -0
- package/python3.4.2/lib/python3.4/multiprocessing/context.py +348 -0
- package/python3.4.2/lib/python3.4/multiprocessing/dummy/__init__.py +119 -0
- package/python3.4.2/lib/python3.4/multiprocessing/dummy/connection.py +74 -0
- package/python3.4.2/lib/python3.4/multiprocessing/forkserver.py +267 -0
- package/python3.4.2/lib/python3.4/multiprocessing/heap.py +249 -0
- package/python3.4.2/lib/python3.4/multiprocessing/managers.py +1131 -0
- package/python3.4.2/lib/python3.4/multiprocessing/pool.py +769 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_fork.py +83 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_forkserver.py +69 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_posix.py +69 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_win32.py +99 -0
- package/python3.4.2/lib/python3.4/multiprocessing/process.py +332 -0
- package/python3.4.2/lib/python3.4/multiprocessing/queues.py +367 -0
- package/python3.4.2/lib/python3.4/multiprocessing/reduction.py +240 -0
- package/python3.4.2/lib/python3.4/multiprocessing/resource_sharer.py +158 -0
- package/python3.4.2/lib/python3.4/multiprocessing/semaphore_tracker.py +143 -0
- package/python3.4.2/lib/python3.4/multiprocessing/sharedctypes.py +245 -0
- package/python3.4.2/lib/python3.4/multiprocessing/spawn.py +287 -0
- package/python3.4.2/lib/python3.4/multiprocessing/synchronize.py +418 -0
- package/python3.4.2/lib/python3.4/multiprocessing/util.py +367 -0
- package/python3.4.2/lib/python3.4/netrc.py +142 -0
- package/python3.4.2/lib/python3.4/nntplib.py +1134 -0
- package/python3.4.2/lib/python3.4/ntpath.py +625 -0
- package/python3.4.2/lib/python3.4/nturl2path.py +66 -0
- package/python3.4.2/lib/python3.4/numbers.py +394 -0
- package/python3.4.2/lib/python3.4/opcode.py +200 -0
- package/python3.4.2/lib/python3.4/operator.py +411 -0
- package/python3.4.2/lib/python3.4/optparse.py +1680 -0
- package/python3.4.2/lib/python3.4/os.py +980 -0
- package/python3.4.2/lib/python3.4/pathlib.py +1291 -0
- package/python3.4.2/lib/python3.4/pdb.py +1685 -0
- package/python3.4.2/lib/python3.4/pickle.py +1599 -0
- package/python3.4.2/lib/python3.4/pickletools.py +2818 -0
- package/python3.4.2/lib/python3.4/pipes.py +247 -0
- package/python3.4.2/lib/python3.4/pkgutil.py +629 -0
- package/python3.4.2/lib/python3.4/plat-linux/CDROM.py +207 -0
- package/python3.4.2/lib/python3.4/plat-linux/DLFCN.py +83 -0
- package/python3.4.2/lib/python3.4/plat-linux/IN.py +615 -0
- package/python3.4.2/lib/python3.4/plat-linux/TYPES.py +170 -0
- package/python3.4.2/lib/python3.4/plat-linux/regen +8 -0
- package/python3.4.2/lib/python3.4/platform.py +1476 -0
- package/python3.4.2/lib/python3.4/plistlib.py +1025 -0
- package/python3.4.2/lib/python3.4/poplib.py +461 -0
- package/python3.4.2/lib/python3.4/posixpath.py +457 -0
- package/python3.4.2/lib/python3.4/pprint.py +416 -0
- package/python3.4.2/lib/python3.4/profile.py +589 -0
- package/python3.4.2/lib/python3.4/pstats.py +691 -0
- package/python3.4.2/lib/python3.4/pty.py +170 -0
- package/python3.4.2/lib/python3.4/py_compile.py +185 -0
- package/python3.4.2/lib/python3.4/pyclbr.py +351 -0
- package/python3.4.2/lib/python3.4/pydoc.py +2622 -0
- package/python3.4.2/lib/python3.4/pydoc_data/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/pydoc_data/_pydoc.css +6 -0
- package/python3.4.2/lib/python3.4/pydoc_data/topics.py +79 -0
- package/python3.4.2/lib/python3.4/queue.py +249 -0
- package/python3.4.2/lib/python3.4/quopri.py +242 -0
- package/python3.4.2/lib/python3.4/random.py +742 -0
- package/python3.4.2/lib/python3.4/re.py +368 -0
- package/python3.4.2/lib/python3.4/reprlib.py +157 -0
- package/python3.4.2/lib/python3.4/rlcompleter.py +165 -0
- package/python3.4.2/lib/python3.4/runpy.py +271 -0
- package/python3.4.2/lib/python3.4/sched.py +167 -0
- package/python3.4.2/lib/python3.4/selectors.py +525 -0
- package/python3.4.2/lib/python3.4/shelve.py +239 -0
- package/python3.4.2/lib/python3.4/shlex.py +304 -0
- package/python3.4.2/lib/python3.4/shutil.py +1127 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/PKG-INFO +55 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/SOURCES.txt +126 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/entry_points.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/requires.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_compat.py +150 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_stringdefs.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/bccache.py +344 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/compiler.py +1640 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/constants.py +32 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/debug.py +337 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/defaults.py +43 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/environment.py +1191 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/exceptions.py +146 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/ext.py +636 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/filters.py +987 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/lexer.py +733 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/loaders.py +471 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/meta.py +103 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/nodes.py +914 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/optimizer.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/parser.py +895 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/runtime.py +581 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/sandbox.py +368 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/tests.py +149 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/__init__.py +156 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/api.py +261 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/bytecode_cache.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/core_tags.py +305 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/debug.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/doctests.py +29 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/ext.py +459 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/filters.py +515 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/imports.py +141 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/inheritance.py +250 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/lexnparse.py +593 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/loader.py +226 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/regression.py +279 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/broken.html +3 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/foo/test.html +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/syntaxerror.html +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/test.html +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/security.py +166 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/tests.py +93 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/utils.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/utils.py +520 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/visitor.py +87 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/PKG-INFO +119 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/SOURCES.txt +17 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/__init__.py +298 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_compat.py +26 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_constants.py +267 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_native.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_speedups.c +239 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/tests.py +179 -0
- package/python3.4.2/lib/python3.4/site-packages/README +2 -0
- package/python3.4.2/lib/python3.4/site-packages/_markerlib/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/_markerlib/markers.py +119 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/PKG-INFO +68 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/SOURCES.txt +23 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/entry_points.txt +3 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/requires.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/scripts/android-debian-builder +6 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__main__.py +26 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/build.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/config.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/deb.sh +106 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/default-config +42 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/first-time-setup.sh +94 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/init.sh +27 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/examples/jessie-armhf.cfg +26 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/run_tests.py +38 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/script.py +110 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/util.py +177 -0
- package/python3.4.2/lib/python3.4/site-packages/easy-install.pth +4 -0
- package/python3.4.2/lib/python3.4/site-packages/easy_install.py +5 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +277 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +8 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +119 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +50 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +56 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +137 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1064 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1301 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +488 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +364 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1026 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +317 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +323 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1575 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +721 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +958 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +3104 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/_base.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +20 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +65 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +205 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2713 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/ihatexml.py +285 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/inputstream.py +881 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +271 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +320 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/tokenizer.py +1731 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/_base.py +377 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +227 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +337 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +369 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +57 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/_base.py +200 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py +208 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/__init__.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/_base.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/datrie.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/py.py +67 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/utils.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py +2762 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +34 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +77 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +388 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem +5026 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +24 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +115 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +454 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +75 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +45 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +803 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/__init__.py +32 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +925 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py +231 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +62 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +61 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/compat.py +34 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +39 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +86 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +242 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +90 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +596 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py +428 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py +472 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py +283 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py +569 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py +219 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py +225 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py +200 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py +139 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +575 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +91 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +170 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +205 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +204 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py +710 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +422 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +126 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/fields.py +177 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py +100 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py +260 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +385 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +258 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/request.py +141 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +308 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +27 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +45 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +133 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py +234 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py +162 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +637 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +127 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +673 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +646 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +201 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/baseparser.py +224 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +371 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +114 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/help.py +33 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +314 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +162 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +80 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +195 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +351 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/download.py +644 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/index.py +990 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +172 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/log.py +276 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +102 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/req.py +1931 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +18 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/status_codes.py +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/util.py +720 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +251 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +131 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +151 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +273 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +560 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst +71 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/METADATA +98 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/RECORD +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/WHEEL +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/entry_points.txt +5 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/metadata.json +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pkg_resources.py +2719 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/__init__.py +98 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/archive_util.py +210 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-arm-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/alias.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_egg.py +553 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_rpm.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_wininst.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_ext.py +298 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_py.py +221 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/develop.py +167 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py +1915 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/egg_info.py +392 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install.py +103 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_egg_info.py +125 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_lib.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_scripts.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/launcher manifest.xml +15 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/register.py +10 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/rotate.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/saveopts.py +24 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/sdist.py +238 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/setopt.py +164 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/test.py +198 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/upload_docs.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/compat.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/depends.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/dist.py +796 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/extension.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-arm-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/lib2to3_ex.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/package_index.py +1057 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py26compat.py +19 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py27compat.py +15 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py31compat.py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py +322 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/script template (dev).py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/script template.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/site-patch.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/ssl_support.py +234 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/svn_utils.py +564 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/__init__.py +352 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/doctest.py +2683 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/environment.py +165 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/py26compat.py +14 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/script-with-bom.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/server.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_bdist_egg.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_build_ext.py +20 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_develop.py +122 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_dist_info.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_easy_install.py +394 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_egg_info.py +173 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_markerlib.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_packageindex.py +203 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_resources.py +620 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sandbox.py +79 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sdist.py +535 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_svn.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_test.py +124 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_upload_docs.py +72 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/version.py +1 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/DESCRIPTION.rst +1742 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/METADATA +1772 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/RECORD +149 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/WHEEL +6 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/dependency_links.txt +2 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt +62 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt.orig +62 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/pydist.json +1 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/requires.txt.orig +7 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/top_level.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site.py +616 -0
- package/python3.4.2/lib/python3.4/smtpd.py +861 -0
- package/python3.4.2/lib/python3.4/smtplib.py +999 -0
- package/python3.4.2/lib/python3.4/sndhdr.py +240 -0
- package/python3.4.2/lib/python3.4/socket.py +535 -0
- package/python3.4.2/lib/python3.4/socketserver.py +748 -0
- package/python3.4.2/lib/python3.4/sqlite3/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/sqlite3/dbapi2.py +89 -0
- package/python3.4.2/lib/python3.4/sqlite3/dump.py +70 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/dbapi.py +911 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/dump.py +81 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/factory.py +253 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/hooks.py +258 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/regression.py +358 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/transactions.py +204 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/types.py +403 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/userfunctions.py +468 -0
- package/python3.4.2/lib/python3.4/sre_compile.py +489 -0
- package/python3.4.2/lib/python3.4/sre_constants.py +261 -0
- package/python3.4.2/lib/python3.4/sre_parse.py +859 -0
- package/python3.4.2/lib/python3.4/ssl.py +945 -0
- package/python3.4.2/lib/python3.4/stat.py +155 -0
- package/python3.4.2/lib/python3.4/statistics.py +595 -0
- package/python3.4.2/lib/python3.4/string.py +282 -0
- package/python3.4.2/lib/python3.4/stringprep.py +272 -0
- package/python3.4.2/lib/python3.4/struct.py +15 -0
- package/python3.4.2/lib/python3.4/subprocess.py +1690 -0
- package/python3.4.2/lib/python3.4/sunau.py +525 -0
- package/python3.4.2/lib/python3.4/symbol.py +111 -0
- package/python3.4.2/lib/python3.4/symtable.py +240 -0
- package/python3.4.2/lib/python3.4/sysconfig.py +709 -0
- package/python3.4.2/lib/python3.4/tabnanny.py +332 -0
- package/python3.4.2/lib/python3.4/tarfile.py +2519 -0
- package/python3.4.2/lib/python3.4/telnetlib.py +672 -0
- package/python3.4.2/lib/python3.4/tempfile.py +698 -0
- package/python3.4.2/lib/python3.4/test/185test.db +0 -0
- package/python3.4.2/lib/python3.4/test/Sine-1000Hz-300ms.aif +0 -0
- package/python3.4.2/lib/python3.4/test/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/test/__main__.py +3 -0
- package/python3.4.2/lib/python3.4/test/_test_multiprocessing.py +3841 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-alaw.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiotest.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiotests.py +329 -0
- package/python3.4.2/lib/python3.4/test/autotest.py +6 -0
- package/python3.4.2/lib/python3.4/test/bad_coding.py +1 -0
- package/python3.4.2/lib/python3.4/test/bad_coding2.py +2 -0
- package/python3.4.2/lib/python3.4/test/badcert.pem +36 -0
- package/python3.4.2/lib/python3.4/test/badkey.pem +40 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_3131.py +2 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future10.py +3 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future3.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future4.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future5.py +12 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future6.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future7.py +11 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future8.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future9.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_pep3120.py +1 -0
- package/python3.4.2/lib/python3.4/test/buffer_tests.py +218 -0
- package/python3.4.2/lib/python3.4/test/bytecode_helper.py +41 -0
- package/python3.4.2/lib/python3.4/test/capath/4e1295a3.0 +14 -0
- package/python3.4.2/lib/python3.4/test/capath/5ed36f99.0 +41 -0
- package/python3.4.2/lib/python3.4/test/capath/6e88d7b8.0 +14 -0
- package/python3.4.2/lib/python3.4/test/capath/99d0fa06.0 +41 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.1 +2 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.2 +537 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.3 +69 -0
- package/python3.4.2/lib/python3.4/test/check_soundcard.vbs +13 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs-utf8.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/cp949-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/cp949.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213-utf8.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030-utf8.txt +15 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030.txt +15 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312-utf8.txt +6 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312.txt +6 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gbk-utf8.txt +14 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gbk.txt +14 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/hz-utf8.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/hz.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/johab-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/johab.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213-utf8.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cmath_testcases.txt +2370 -0
- package/python3.4.2/lib/python3.4/test/coding20731.py +4 -0
- package/python3.4.2/lib/python3.4/test/curses_tests.py +46 -0
- package/python3.4.2/lib/python3.4/test/data/README +2 -0
- package/python3.4.2/lib/python3.4/test/datetimetester.py +3786 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/abs.decTest +161 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/add.decTest +2716 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/and.decTest +338 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/base.decTest +1411 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/clamp.decTest +211 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/class.decTest +131 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/compare.decTest +758 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotal.decTest +798 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotmag.decTest +790 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copy.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copyabs.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copynegate.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copysign.decTest +177 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAbs.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAdd.decTest +1328 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAnd.decTest +347 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddBase.decTest +1104 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCanonical.decTest +357 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddClass.decTest +76 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompare.decTest +744 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareSig.decTest +647 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotal.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotalMag.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopy.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyAbs.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyNegate.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopySign.decTest +175 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivide.decTest +863 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivideInt.decTest +449 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddEncode.decTest +495 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddFMA.decTest +1698 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddInvert.decTest +202 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddLogB.decTest +159 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMax.decTest +322 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMaxMag.decTest +304 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMin.decTest +309 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinMag.decTest +293 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMultiply.decTest +553 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextMinus.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextPlus.decTest +124 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextToward.decTest +374 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddOr.decTest +292 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddPlus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddQuantize.decTest +833 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddReduce.decTest +182 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainder.decTest +600 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainderNear.decTest +629 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRotate.decTest +262 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSameQuantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddScaleB.decTest +243 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddShift.decTest +262 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSubtract.decTest +629 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddToIntegral.decTest +257 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddXor.decTest +337 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decDouble.decTest +65 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decQuad.decTest +65 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decSingle.decTest +25 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/divide.decTest +854 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/divideint.decTest +486 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAbs.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAdd.decTest +1215 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAnd.decTest +420 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqBase.decTest +1081 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCanonical.decTest +372 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqClass.decTest +77 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompare.decTest +753 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareSig.decTest +647 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotal.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotalMag.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopy.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyAbs.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyNegate.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopySign.decTest +175 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivide.decTest +808 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivideInt.decTest +453 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqEncode.decTest +477 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqFMA.decTest +1786 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqInvert.decTest +245 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqLogB.decTest +160 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMax.decTest +322 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMaxMag.decTest +304 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMin.decTest +309 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinMag.decTest +293 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMultiply.decTest +589 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextMinus.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextPlus.decTest +124 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextToward.decTest +375 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqOr.decTest +401 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqPlus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqQuantize.decTest +836 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqReduce.decTest +183 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainder.decTest +597 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainderNear.decTest +631 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRotate.decTest +298 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSameQuantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqScaleB.decTest +260 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqShift.decTest +298 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSubtract.decTest +635 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqToIntegral.decTest +257 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqXor.decTest +410 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dsBase.decTest +1062 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dsEncode.decTest +372 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/exp.decTest +674 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/extra.decTest +2830 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/fma.decTest +3426 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/inexact.decTest +215 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/invert.decTest +176 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ln.decTest +611 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/log10.decTest +551 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/logb.decTest +188 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/max.decTest +424 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/maxmag.decTest +404 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/min.decTest +407 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/minmag.decTest +390 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/minus.decTest +182 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/multiply.decTest +731 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nextminus.decTest +148 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nextplus.decTest +150 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nexttoward.decTest +426 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/or.decTest +334 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/plus.decTest +195 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/power.decTest +1624 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/powersqrt.decTest +2970 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/quantize.decTest +948 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/randomBound32.decTest +2443 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/randoms.decTest +4030 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/reduce.decTest +234 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/remainder.decTest +640 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/remainderNear.decTest +572 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rescale.decTest +764 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rotate.decTest +247 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rounding.decTest +1303 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/samequantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/scaleb.decTest +209 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/shift.decTest +250 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/squareroot.decTest +3834 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/subtract.decTest +873 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/testall.decTest +87 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegral.decTest +241 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegralx.decTest +255 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/xor.decTest +335 -0
- package/python3.4.2/lib/python3.4/test/dh512.pem +9 -0
- package/python3.4.2/lib/python3.4/test/dis_module.py +5 -0
- package/python3.4.2/lib/python3.4/test/doctest_aliases.py +13 -0
- package/python3.4.2/lib/python3.4/test/double_const.py +30 -0
- package/python3.4.2/lib/python3.4/test/empty.vbs +1 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/module_iso_8859_1.py +5 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/module_koi8_r.py +3 -0
- package/python3.4.2/lib/python3.4/test/exception_hierarchy.txt +61 -0
- package/python3.4.2/lib/python3.4/test/final_a.py +19 -0
- package/python3.4.2/lib/python3.4/test/final_b.py +19 -0
- package/python3.4.2/lib/python3.4/test/floating_points.txt +1028 -0
- package/python3.4.2/lib/python3.4/test/fork_wait.py +77 -0
- package/python3.4.2/lib/python3.4/test/formatfloat_testcases.txt +355 -0
- package/python3.4.2/lib/python3.4/test/future_test1.py +11 -0
- package/python3.4.2/lib/python3.4/test/future_test2.py +10 -0
- package/python3.4.2/lib/python3.4/test/gdb_sample.py +12 -0
- package/python3.4.2/lib/python3.4/test/https_svn_python_org_root.pem +41 -0
- package/python3.4.2/lib/python3.4/test/ieee754.txt +185 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.bmp +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.gif +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.jpg +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.pbm +3 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.pgm +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.png +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.ppm +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.ras +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.sgi +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.tiff +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.xbm +6 -0
- package/python3.4.2/lib/python3.4/test/inspect_fodder.py +58 -0
- package/python3.4.2/lib/python3.4/test/inspect_fodder2.py +111 -0
- package/python3.4.2/lib/python3.4/test/keycert.passwd.pem +33 -0
- package/python3.4.2/lib/python3.4/test/keycert.pem +31 -0
- package/python3.4.2/lib/python3.4/test/keycert2.pem +31 -0
- package/python3.4.2/lib/python3.4/test/keycert3.pem +73 -0
- package/python3.4.2/lib/python3.4/test/keycert4.pem +73 -0
- package/python3.4.2/lib/python3.4/test/list_tests.py +585 -0
- package/python3.4.2/lib/python3.4/test/lock_tests.py +896 -0
- package/python3.4.2/lib/python3.4/test/mailcap.txt +39 -0
- package/python3.4.2/lib/python3.4/test/make_ssl_certs.py +176 -0
- package/python3.4.2/lib/python3.4/test/mapping_tests.py +657 -0
- package/python3.4.2/lib/python3.4/test/math_testcases.txt +633 -0
- package/python3.4.2/lib/python3.4/test/memory_watchdog.py +28 -0
- package/python3.4.2/lib/python3.4/test/mime.types +1445 -0
- package/python3.4.2/lib/python3.4/test/mock_socket.py +156 -0
- package/python3.4.2/lib/python3.4/test/mp_fork_bomb.py +18 -0
- package/python3.4.2/lib/python3.4/test/multibytecodec_support.py +377 -0
- package/python3.4.2/lib/python3.4/test/nokia.pem +31 -0
- package/python3.4.2/lib/python3.4/test/nullbytecert.pem +90 -0
- package/python3.4.2/lib/python3.4/test/nullcert.pem +0 -0
- package/python3.4.2/lib/python3.4/test/outstanding_bugs.py +18 -0
- package/python3.4.2/lib/python3.4/test/pickletester.py +2253 -0
- package/python3.4.2/lib/python3.4/test/profilee.py +115 -0
- package/python3.4.2/lib/python3.4/test/pstats.pck +0 -0
- package/python3.4.2/lib/python3.4/test/pycacert.pem +78 -0
- package/python3.4.2/lib/python3.4/test/pycakey.pem +28 -0
- package/python3.4.2/lib/python3.4/test/pyclbr_input.py +33 -0
- package/python3.4.2/lib/python3.4/test/pydoc_mod.py +37 -0
- package/python3.4.2/lib/python3.4/test/pydocfodder.py +216 -0
- package/python3.4.2/lib/python3.4/test/pystone.py +277 -0
- package/python3.4.2/lib/python3.4/test/randv2_32.pck +633 -0
- package/python3.4.2/lib/python3.4/test/randv2_64.pck +633 -0
- package/python3.4.2/lib/python3.4/test/randv3.pck +633 -0
- package/python3.4.2/lib/python3.4/test/re_tests.py +670 -0
- package/python3.4.2/lib/python3.4/test/regrtest.py +1589 -0
- package/python3.4.2/lib/python3.4/test/relimport.py +1 -0
- package/python3.4.2/lib/python3.4/test/reperf.py +23 -0
- package/python3.4.2/lib/python3.4/test/revocation.crl +11 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest.py +76 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest_no_docstrings.py +12 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest_no_doctests.py +15 -0
- package/python3.4.2/lib/python3.4/test/script_helper.py +178 -0
- package/python3.4.2/lib/python3.4/test/seq_tests.py +397 -0
- package/python3.4.2/lib/python3.4/test/sgml_input.html +212 -0
- package/python3.4.2/lib/python3.4/test/sha256.pem +128 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/README +12 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.8svx +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.au +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.hcom +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.sndt +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.voc +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.wav +0 -0
- package/python3.4.2/lib/python3.4/test/sortperf.py +169 -0
- package/python3.4.2/lib/python3.4/test/ssl_cert.pem +15 -0
- package/python3.4.2/lib/python3.4/test/ssl_key.passwd.pem +18 -0
- package/python3.4.2/lib/python3.4/test/ssl_key.pem +16 -0
- package/python3.4.2/lib/python3.4/test/ssl_servers.py +205 -0
- package/python3.4.2/lib/python3.4/test/ssltests.py +22 -0
- package/python3.4.2/lib/python3.4/test/string_tests.py +1385 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/fd_status.py +34 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/input_reader.py +7 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/qcat.py +7 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/qgrep.py +10 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/sigchild_ignore.py +15 -0
- package/python3.4.2/lib/python3.4/test/support/__init__.py +2241 -0
- package/python3.4.2/lib/python3.4/test/test___all__.py +117 -0
- package/python3.4.2/lib/python3.4/test/test___future__.py +65 -0
- package/python3.4.2/lib/python3.4/test/test__locale.py +170 -0
- package/python3.4.2/lib/python3.4/test/test__opcode.py +23 -0
- package/python3.4.2/lib/python3.4/test/test__osx_support.py +281 -0
- package/python3.4.2/lib/python3.4/test/test_abc.py +408 -0
- package/python3.4.2/lib/python3.4/test/test_abstract_numbers.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_aifc.py +384 -0
- package/python3.4.2/lib/python3.4/test/test_argparse.py +4979 -0
- package/python3.4.2/lib/python3.4/test/test_array.py +1323 -0
- package/python3.4.2/lib/python3.4/test/test_ast.py +1038 -0
- package/python3.4.2/lib/python3.4/test/test_asynchat.py +333 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/__init__.py +10 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo.py +8 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo2.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo3.py +11 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/keycert3.pem +73 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/pycacert.pem +78 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_cert.pem +15 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_key.pem +16 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_base_events.py +1064 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_events.py +2240 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_futures.py +442 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_locks.py +858 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_proactor_events.py +492 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_queues.py +476 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_selector_events.py +1737 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_streams.py +628 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_subprocess.py +217 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_tasks.py +1977 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_transports.py +90 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_unix_events.py +1582 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_events.py +141 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_utils.py +171 -0
- package/python3.4.2/lib/python3.4/test/test_asyncore.py +859 -0
- package/python3.4.2/lib/python3.4/test/test_atexit.py +185 -0
- package/python3.4.2/lib/python3.4/test/test_audioop.py +534 -0
- package/python3.4.2/lib/python3.4/test/test_augassign.py +315 -0
- package/python3.4.2/lib/python3.4/test/test_base64.py +666 -0
- package/python3.4.2/lib/python3.4/test/test_bigaddrspace.py +101 -0
- package/python3.4.2/lib/python3.4/test/test_bigmem.py +1257 -0
- package/python3.4.2/lib/python3.4/test/test_binascii.py +270 -0
- package/python3.4.2/lib/python3.4/test/test_binhex.py +56 -0
- package/python3.4.2/lib/python3.4/test/test_binop.py +380 -0
- package/python3.4.2/lib/python3.4/test/test_bisect.py +328 -0
- package/python3.4.2/lib/python3.4/test/test_bool.py +347 -0
- package/python3.4.2/lib/python3.4/test/test_buffer.py +4294 -0
- package/python3.4.2/lib/python3.4/test/test_bufio.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_builtin.py +1637 -0
- package/python3.4.2/lib/python3.4/test/test_bytes.py +1433 -0
- package/python3.4.2/lib/python3.4/test/test_bz2.py +880 -0
- package/python3.4.2/lib/python3.4/test/test_calendar.py +714 -0
- package/python3.4.2/lib/python3.4/test/test_call.py +131 -0
- package/python3.4.2/lib/python3.4/test/test_capi.py +469 -0
- package/python3.4.2/lib/python3.4/test/test_cgi.py +489 -0
- package/python3.4.2/lib/python3.4/test/test_cgitb.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_charmapcodec.py +56 -0
- package/python3.4.2/lib/python3.4/test/test_class.py +552 -0
- package/python3.4.2/lib/python3.4/test/test_cmath.py +536 -0
- package/python3.4.2/lib/python3.4/test/test_cmd.py +243 -0
- package/python3.4.2/lib/python3.4/test/test_cmd_line.py +473 -0
- package/python3.4.2/lib/python3.4/test/test_cmd_line_script.py +481 -0
- package/python3.4.2/lib/python3.4/test/test_code.py +170 -0
- package/python3.4.2/lib/python3.4/test/test_code_module.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_codeccallbacks.py +880 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_cn.py +90 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_hk.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_iso2022.py +45 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_jp.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_kr.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_tw.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_cn.py +29 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_hk.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_jp.py +63 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_kr.py +40 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_tw.py +30 -0
- package/python3.4.2/lib/python3.4/test/test_codecs.py +2901 -0
- package/python3.4.2/lib/python3.4/test/test_codeop.py +304 -0
- package/python3.4.2/lib/python3.4/test/test_collections.py +1552 -0
- package/python3.4.2/lib/python3.4/test/test_colorsys.py +100 -0
- package/python3.4.2/lib/python3.4/test/test_compare.py +67 -0
- package/python3.4.2/lib/python3.4/test/test_compile.py +561 -0
- package/python3.4.2/lib/python3.4/test/test_compileall.py +384 -0
- package/python3.4.2/lib/python3.4/test/test_complex.py +638 -0
- package/python3.4.2/lib/python3.4/test/test_concurrent_futures.py +685 -0
- package/python3.4.2/lib/python3.4/test/test_configparser.py +1768 -0
- package/python3.4.2/lib/python3.4/test/test_contains.py +93 -0
- package/python3.4.2/lib/python3.4/test/test_contextlib.py +828 -0
- package/python3.4.2/lib/python3.4/test/test_copy.py +759 -0
- package/python3.4.2/lib/python3.4/test/test_copyreg.py +121 -0
- package/python3.4.2/lib/python3.4/test/test_cprofile.py +98 -0
- package/python3.4.2/lib/python3.4/test/test_crashers.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_crypt.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_csv.py +1074 -0
- package/python3.4.2/lib/python3.4/test/test_ctypes.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_curses.py +395 -0
- package/python3.4.2/lib/python3.4/test/test_datetime.py +48 -0
- package/python3.4.2/lib/python3.4/test/test_dbm.py +193 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_dumb.py +228 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_gnu.py +97 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_ndbm.py +54 -0
- package/python3.4.2/lib/python3.4/test/test_decimal.py +5504 -0
- package/python3.4.2/lib/python3.4/test/test_decorators.py +309 -0
- package/python3.4.2/lib/python3.4/test/test_defaultdict.py +190 -0
- package/python3.4.2/lib/python3.4/test/test_deque.py +817 -0
- package/python3.4.2/lib/python3.4/test/test_descr.py +5006 -0
- package/python3.4.2/lib/python3.4/test/test_descrtut.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_devpoll.py +146 -0
- package/python3.4.2/lib/python3.4/test/test_dict.py +928 -0
- package/python3.4.2/lib/python3.4/test/test_dictcomps.py +88 -0
- package/python3.4.2/lib/python3.4/test/test_dictviews.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_difflib.py +298 -0
- package/python3.4.2/lib/python3.4/test/test_difflib_expect.html +526 -0
- package/python3.4.2/lib/python3.4/test/test_dis.py +832 -0
- package/python3.4.2/lib/python3.4/test/test_distutils.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_doctest.py +2921 -0
- package/python3.4.2/lib/python3.4/test/test_doctest.txt +17 -0
- package/python3.4.2/lib/python3.4/test/test_doctest2.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_doctest2.txt +14 -0
- package/python3.4.2/lib/python3.4/test/test_doctest3.txt +5 -0
- package/python3.4.2/lib/python3.4/test/test_doctest4.txt +11 -0
- package/python3.4.2/lib/python3.4/test/test_docxmlrpc.py +219 -0
- package/python3.4.2/lib/python3.4/test/test_dummy_thread.py +182 -0
- package/python3.4.2/lib/python3.4/test/test_dummy_threading.py +64 -0
- package/python3.4.2/lib/python3.4/test/test_dynamic.py +143 -0
- package/python3.4.2/lib/python3.4/test/test_dynamicclassattribute.py +304 -0
- package/python3.4.2/lib/python3.4/test/test_email/__init__.py +159 -0
- package/python3.4.2/lib/python3.4/test/test_email/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/PyBanner048.gif +0 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/audiotest.au +0 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_01.txt +19 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_02.txt +136 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_03.txt +16 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_04.txt +37 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_05.txt +28 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_06.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_07.txt +83 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_08.txt +24 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_09.txt +24 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_10.txt +39 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_11.txt +7 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_12.txt +36 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_12a.txt +38 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_13.txt +94 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_14.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_15.txt +52 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_16.txt +123 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_17.txt +12 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_18.txt +6 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_19.txt +43 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_20.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_21.txt +20 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_22.txt +46 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_23.txt +8 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_24.txt +10 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_25.txt +117 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_26.txt +46 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_27.txt +15 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_28.txt +25 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_29.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_30.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_31.txt +15 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_32.txt +14 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_33.txt +29 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_34.txt +19 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_35.txt +4 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_36.txt +40 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_37.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_38.txt +101 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_39.txt +83 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_40.txt +10 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_41.txt +8 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_42.txt +20 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_43.txt +217 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_44.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_45.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_46.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/test__encoded_words.py +192 -0
- package/python3.4.2/lib/python3.4/test/test_email/test__header_value_parser.py +2606 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_asian_codecs.py +82 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_contentmanager.py +796 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_defect_handling.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_email.py +5289 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_generator.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_headerregistry.py +1594 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_inversion.py +49 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_message.py +783 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_parser.py +36 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_pickleable.py +74 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_policy.py +332 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_utils.py +140 -0
- package/python3.4.2/lib/python3.4/test/test_email/torture_test.py +136 -0
- package/python3.4.2/lib/python3.4/test/test_ensurepip.py +345 -0
- package/python3.4.2/lib/python3.4/test/test_enum.py +1592 -0
- package/python3.4.2/lib/python3.4/test/test_enumerate.py +272 -0
- package/python3.4.2/lib/python3.4/test/test_eof.py +31 -0
- package/python3.4.2/lib/python3.4/test/test_epoll.py +259 -0
- package/python3.4.2/lib/python3.4/test/test_errno.py +40 -0
- package/python3.4.2/lib/python3.4/test/test_exception_variations.py +180 -0
- package/python3.4.2/lib/python3.4/test/test_exceptions.py +978 -0
- package/python3.4.2/lib/python3.4/test/test_extcall.py +349 -0
- package/python3.4.2/lib/python3.4/test/test_faulthandler.py +623 -0
- package/python3.4.2/lib/python3.4/test/test_fcntl.py +152 -0
- package/python3.4.2/lib/python3.4/test/test_file.py +329 -0
- package/python3.4.2/lib/python3.4/test/test_file_eintr.py +236 -0
- package/python3.4.2/lib/python3.4/test/test_filecmp.py +217 -0
- package/python3.4.2/lib/python3.4/test/test_fileinput.py +891 -0
- package/python3.4.2/lib/python3.4/test/test_fileio.py +480 -0
- package/python3.4.2/lib/python3.4/test/test_finalization.py +522 -0
- package/python3.4.2/lib/python3.4/test/test_float.py +1312 -0
- package/python3.4.2/lib/python3.4/test/test_flufl.py +27 -0
- package/python3.4.2/lib/python3.4/test/test_fnmatch.py +89 -0
- package/python3.4.2/lib/python3.4/test/test_fork1.py +111 -0
- package/python3.4.2/lib/python3.4/test/test_format.py +362 -0
- package/python3.4.2/lib/python3.4/test/test_fractions.py +612 -0
- package/python3.4.2/lib/python3.4/test/test_frame.py +168 -0
- package/python3.4.2/lib/python3.4/test/test_ftplib.py +1080 -0
- package/python3.4.2/lib/python3.4/test/test_funcattrs.py +385 -0
- package/python3.4.2/lib/python3.4/test/test_functools.py +1584 -0
- package/python3.4.2/lib/python3.4/test/test_future.py +125 -0
- package/python3.4.2/lib/python3.4/test/test_future3.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_future4.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_future5.py +21 -0
- package/python3.4.2/lib/python3.4/test/test_gc.py +1013 -0
- package/python3.4.2/lib/python3.4/test/test_gdb.py +870 -0
- package/python3.4.2/lib/python3.4/test/test_generators.py +1940 -0
- package/python3.4.2/lib/python3.4/test/test_genericpath.py +439 -0
- package/python3.4.2/lib/python3.4/test/test_genexps.py +285 -0
- package/python3.4.2/lib/python3.4/test/test_getargs2.py +615 -0
- package/python3.4.2/lib/python3.4/test/test_getopt.py +187 -0
- package/python3.4.2/lib/python3.4/test/test_getpass.py +163 -0
- package/python3.4.2/lib/python3.4/test/test_gettext.py +467 -0
- package/python3.4.2/lib/python3.4/test/test_glob.py +200 -0
- package/python3.4.2/lib/python3.4/test/test_global.py +61 -0
- package/python3.4.2/lib/python3.4/test/test_grammar.py +1024 -0
- package/python3.4.2/lib/python3.4/test/test_grp.py +99 -0
- package/python3.4.2/lib/python3.4/test/test_gzip.py +561 -0
- package/python3.4.2/lib/python3.4/test/test_hash.py +346 -0
- package/python3.4.2/lib/python3.4/test/test_hashlib.py +533 -0
- package/python3.4.2/lib/python3.4/test/test_heapq.py +417 -0
- package/python3.4.2/lib/python3.4/test/test_hmac.py +506 -0
- package/python3.4.2/lib/python3.4/test/test_html.py +104 -0
- package/python3.4.2/lib/python3.4/test/test_htmlparser.py +832 -0
- package/python3.4.2/lib/python3.4/test/test_http_cookiejar.py +1714 -0
- package/python3.4.2/lib/python3.4/test/test_http_cookies.py +243 -0
- package/python3.4.2/lib/python3.4/test/test_httplib.py +1025 -0
- package/python3.4.2/lib/python3.4/test/test_httpservers.py +770 -0
- package/python3.4.2/lib/python3.4/test/test_idle.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_imaplib.py +504 -0
- package/python3.4.2/lib/python3.4/test/test_imghdr.py +131 -0
- package/python3.4.2/lib/python3.4/test/test_imp.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_import.py +1072 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/abc.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_finder.py +85 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_loader.py +106 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/util.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_case_sensitivity.py +51 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_finder.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_loader.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_path_hook.py +32 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/util.py +19 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_finder.py +80 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_loader.py +222 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___loader__.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___package__.py +133 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_api.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_caching.py +92 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_fromlist.py +129 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_meta_path.py +119 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_packages.py +110 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_path.py +144 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_relative_imports.py +216 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/util.py +20 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/missing_directory.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/nested_portion1.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion1/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion2/foo/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project1/parent/child/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project2/parent/child/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project3/parent/child/three.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/top_level_portion1.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/regrtest.py +17 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_case_sensitivity.py +83 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_file_loader.py +588 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_finder.py +232 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_path_hook.py +30 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_source_encoding.py +165 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/util.py +96 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_abc.py +951 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_api.py +437 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_locks.py +156 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_namespace_pkgs.py +293 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_spec.py +957 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_util.py +592 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_windows.py +29 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/util.py +225 -0
- package/python3.4.2/lib/python3.4/test/test_index.py +275 -0
- package/python3.4.2/lib/python3.4/test/test_inspect.py +3103 -0
- package/python3.4.2/lib/python3.4/test/test_int.py +458 -0
- package/python3.4.2/lib/python3.4/test/test_int_literal.py +147 -0
- package/python3.4.2/lib/python3.4/test/test_io.py +3481 -0
- package/python3.4.2/lib/python3.4/test/test_ioctl.py +91 -0
- package/python3.4.2/lib/python3.4/test/test_ipaddress.py +1693 -0
- package/python3.4.2/lib/python3.4/test/test_isinstance.py +289 -0
- package/python3.4.2/lib/python3.4/test/test_iter.py +927 -0
- package/python3.4.2/lib/python3.4/test/test_iterlen.py +229 -0
- package/python3.4.2/lib/python3.4/test/test_itertools.py +2142 -0
- package/python3.4.2/lib/python3.4/test/test_json/__init__.py +53 -0
- package/python3.4.2/lib/python3.4/test/test_json/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_decode.py +99 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_default.py +12 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_dump.py +49 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_encode_basestring_ascii.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_enum.py +120 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_fail.py +194 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_float.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_indent.py +67 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass1.py +75 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass2.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass3.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_recursion.py +100 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_scanstring.py +141 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_separators.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_speedups.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_tool.py +69 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_unicode.py +75 -0
- package/python3.4.2/lib/python3.4/test/test_keyword.py +138 -0
- package/python3.4.2/lib/python3.4/test/test_keywordonlyarg.py +193 -0
- package/python3.4.2/lib/python3.4/test/test_kqueue.py +219 -0
- package/python3.4.2/lib/python3.4/test/test_largefile.py +180 -0
- package/python3.4.2/lib/python3.4/test/test_lib2to3.py +22 -0
- package/python3.4.2/lib/python3.4/test/test_linecache.py +133 -0
- package/python3.4.2/lib/python3.4/test/test_list.py +125 -0
- package/python3.4.2/lib/python3.4/test/test_listcomps.py +148 -0
- package/python3.4.2/lib/python3.4/test/test_locale.py +528 -0
- package/python3.4.2/lib/python3.4/test/test_logging.py +4179 -0
- package/python3.4.2/lib/python3.4/test/test_long.py +1250 -0
- package/python3.4.2/lib/python3.4/test/test_longexp.py +14 -0
- package/python3.4.2/lib/python3.4/test/test_lzma.py +1592 -0
- package/python3.4.2/lib/python3.4/test/test_macpath.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_macurl2path.py +31 -0
- package/python3.4.2/lib/python3.4/test/test_mailbox.py +2287 -0
- package/python3.4.2/lib/python3.4/test/test_mailcap.py +221 -0
- package/python3.4.2/lib/python3.4/test/test_marshal.py +451 -0
- package/python3.4.2/lib/python3.4/test/test_math.py +1107 -0
- package/python3.4.2/lib/python3.4/test/test_memoryio.py +784 -0
- package/python3.4.2/lib/python3.4/test/test_memoryview.py +478 -0
- package/python3.4.2/lib/python3.4/test/test_metaclass.py +265 -0
- package/python3.4.2/lib/python3.4/test/test_mimetypes.py +111 -0
- package/python3.4.2/lib/python3.4/test/test_minidom.py +1545 -0
- package/python3.4.2/lib/python3.4/test/test_mmap.py +774 -0
- package/python3.4.2/lib/python3.4/test/test_module.py +222 -0
- package/python3.4.2/lib/python3.4/test/test_modulefinder.py +324 -0
- package/python3.4.2/lib/python3.4/test/test_msilib.py +46 -0
- package/python3.4.2/lib/python3.4/test/test_multibytecodec.py +263 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_fork.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_forkserver.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_main_handling.py +289 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_spawn.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_netrc.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_nis.py +43 -0
- package/python3.4.2/lib/python3.4/test/test_nntplib.py +1429 -0
- package/python3.4.2/lib/python3.4/test/test_normalization.py +104 -0
- package/python3.4.2/lib/python3.4/test/test_ntpath.py +385 -0
- package/python3.4.2/lib/python3.4/test/test_numeric_tower.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_opcodes.py +112 -0
- package/python3.4.2/lib/python3.4/test/test_openpty.py +25 -0
- package/python3.4.2/lib/python3.4/test/test_operator.py +484 -0
- package/python3.4.2/lib/python3.4/test/test_optparse.py +1657 -0
- package/python3.4.2/lib/python3.4/test/test_os.py +2550 -0
- package/python3.4.2/lib/python3.4/test/test_ossaudiodev.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_osx_env.py +34 -0
- package/python3.4.2/lib/python3.4/test/test_parser.py +745 -0
- package/python3.4.2/lib/python3.4/test/test_pathlib.py +1884 -0
- package/python3.4.2/lib/python3.4/test/test_pdb.py +1052 -0
- package/python3.4.2/lib/python3.4/test/test_peepholer.py +339 -0
- package/python3.4.2/lib/python3.4/test/test_pep247.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_pep277.py +201 -0
- package/python3.4.2/lib/python3.4/test/test_pep292.py +247 -0
- package/python3.4.2/lib/python3.4/test/test_pep3120.py +47 -0
- package/python3.4.2/lib/python3.4/test/test_pep3131.py +35 -0
- package/python3.4.2/lib/python3.4/test/test_pep3151.py +209 -0
- package/python3.4.2/lib/python3.4/test/test_pep352.py +184 -0
- package/python3.4.2/lib/python3.4/test/test_pep380.py +1023 -0
- package/python3.4.2/lib/python3.4/test/test_pickle.py +156 -0
- package/python3.4.2/lib/python3.4/test/test_pickletools.py +25 -0
- package/python3.4.2/lib/python3.4/test/test_pipes.py +196 -0
- package/python3.4.2/lib/python3.4/test/test_pkg.py +299 -0
- package/python3.4.2/lib/python3.4/test/test_pkgimport.py +84 -0
- package/python3.4.2/lib/python3.4/test/test_pkgutil.py +410 -0
- package/python3.4.2/lib/python3.4/test/test_platform.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_plistlib.py +526 -0
- package/python3.4.2/lib/python3.4/test/test_poll.py +215 -0
- package/python3.4.2/lib/python3.4/test/test_popen.py +64 -0
- package/python3.4.2/lib/python3.4/test/test_poplib.py +507 -0
- package/python3.4.2/lib/python3.4/test/test_posix.py +1183 -0
- package/python3.4.2/lib/python3.4/test/test_posixpath.py +544 -0
- package/python3.4.2/lib/python3.4/test/test_pow.py +129 -0
- package/python3.4.2/lib/python3.4/test/test_pprint.py +602 -0
- package/python3.4.2/lib/python3.4/test/test_print.py +132 -0
- package/python3.4.2/lib/python3.4/test/test_profile.py +187 -0
- package/python3.4.2/lib/python3.4/test/test_property.py +254 -0
- package/python3.4.2/lib/python3.4/test/test_pstats.py +45 -0
- package/python3.4.2/lib/python3.4/test/test_pty.py +302 -0
- package/python3.4.2/lib/python3.4/test/test_pulldom.py +347 -0
- package/python3.4.2/lib/python3.4/test/test_pwd.py +114 -0
- package/python3.4.2/lib/python3.4/test/test_py_compile.py +103 -0
- package/python3.4.2/lib/python3.4/test/test_pyclbr.py +181 -0
- package/python3.4.2/lib/python3.4/test/test_pydoc.py +1003 -0
- package/python3.4.2/lib/python3.4/test/test_pyexpat.py +708 -0
- package/python3.4.2/lib/python3.4/test/test_queue.py +363 -0
- package/python3.4.2/lib/python3.4/test/test_quopri.py +208 -0
- package/python3.4.2/lib/python3.4/test/test_raise.py +422 -0
- package/python3.4.2/lib/python3.4/test/test_random.py +759 -0
- package/python3.4.2/lib/python3.4/test/test_range.py +652 -0
- package/python3.4.2/lib/python3.4/test/test_re.py +1451 -0
- package/python3.4.2/lib/python3.4/test/test_readline.py +60 -0
- package/python3.4.2/lib/python3.4/test/test_regrtest.py +275 -0
- package/python3.4.2/lib/python3.4/test/test_reprlib.py +383 -0
- package/python3.4.2/lib/python3.4/test/test_resource.py +166 -0
- package/python3.4.2/lib/python3.4/test/test_richcmp.py +333 -0
- package/python3.4.2/lib/python3.4/test/test_rlcompleter.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_robotparser.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_runpy.py +691 -0
- package/python3.4.2/lib/python3.4/test/test_sax.py +1007 -0
- package/python3.4.2/lib/python3.4/test/test_sched.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_scope.py +764 -0
- package/python3.4.2/lib/python3.4/test/test_select.py +83 -0
- package/python3.4.2/lib/python3.4/test/test_selectors.py +453 -0
- package/python3.4.2/lib/python3.4/test/test_set.py +1839 -0
- package/python3.4.2/lib/python3.4/test/test_setcomps.py +151 -0
- package/python3.4.2/lib/python3.4/test/test_shelve.py +224 -0
- package/python3.4.2/lib/python3.4/test/test_shlex.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_shutil.py +1766 -0
- package/python3.4.2/lib/python3.4/test/test_signal.py +940 -0
- package/python3.4.2/lib/python3.4/test/test_site.py +468 -0
- package/python3.4.2/lib/python3.4/test/test_slice.py +247 -0
- package/python3.4.2/lib/python3.4/test/test_smtpd.py +557 -0
- package/python3.4.2/lib/python3.4/test/test_smtplib.py +950 -0
- package/python3.4.2/lib/python3.4/test/test_smtpnet.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_sndhdr.py +23 -0
- package/python3.4.2/lib/python3.4/test/test_socket.py +5163 -0
- package/python3.4.2/lib/python3.4/test/test_socketserver.py +314 -0
- package/python3.4.2/lib/python3.4/test/test_sort.py +285 -0
- package/python3.4.2/lib/python3.4/test/test_source_encoding.py +145 -0
- package/python3.4.2/lib/python3.4/test/test_spwd.py +60 -0
- package/python3.4.2/lib/python3.4/test/test_sqlite.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_ssl.py +2908 -0
- package/python3.4.2/lib/python3.4/test/test_startfile.py +37 -0
- package/python3.4.2/lib/python3.4/test/test_stat.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_statistics.py +1574 -0
- package/python3.4.2/lib/python3.4/test/test_strftime.py +204 -0
- package/python3.4.2/lib/python3.4/test/test_string.py +174 -0
- package/python3.4.2/lib/python3.4/test/test_stringprep.py +96 -0
- package/python3.4.2/lib/python3.4/test/test_strlit.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_strptime.py +577 -0
- package/python3.4.2/lib/python3.4/test/test_strtod.py +436 -0
- package/python3.4.2/lib/python3.4/test/test_struct.py +667 -0
- package/python3.4.2/lib/python3.4/test/test_structmembers.py +147 -0
- package/python3.4.2/lib/python3.4/test/test_structseq.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_subprocess.py +2474 -0
- package/python3.4.2/lib/python3.4/test/test_sunau.py +122 -0
- package/python3.4.2/lib/python3.4/test/test_sundry.py +59 -0
- package/python3.4.2/lib/python3.4/test/test_super.py +181 -0
- package/python3.4.2/lib/python3.4/test/test_support.py +315 -0
- package/python3.4.2/lib/python3.4/test/test_symtable.py +176 -0
- package/python3.4.2/lib/python3.4/test/test_syntax.py +593 -0
- package/python3.4.2/lib/python3.4/test/test_sys.py +1000 -0
- package/python3.4.2/lib/python3.4/test/test_sys_setprofile.py +386 -0
- package/python3.4.2/lib/python3.4/test/test_sys_settrace.py +834 -0
- package/python3.4.2/lib/python3.4/test/test_sysconfig.py +423 -0
- package/python3.4.2/lib/python3.4/test/test_syslog.py +43 -0
- package/python3.4.2/lib/python3.4/test/test_tarfile.py +2180 -0
- package/python3.4.2/lib/python3.4/test/test_tcl.py +642 -0
- package/python3.4.2/lib/python3.4/test/test_telnetlib.py +401 -0
- package/python3.4.2/lib/python3.4/test/test_tempfile.py +1248 -0
- package/python3.4.2/lib/python3.4/test/test_textwrap.py +929 -0
- package/python3.4.2/lib/python3.4/test/test_thread.py +260 -0
- package/python3.4.2/lib/python3.4/test/test_threaded_import.py +244 -0
- package/python3.4.2/lib/python3.4/test/test_threadedtempfile.py +78 -0
- package/python3.4.2/lib/python3.4/test/test_threading.py +1021 -0
- package/python3.4.2/lib/python3.4/test/test_threading_local.py +225 -0
- package/python3.4.2/lib/python3.4/test/test_threadsignals.py +227 -0
- package/python3.4.2/lib/python3.4/test/test_time.py +763 -0
- package/python3.4.2/lib/python3.4/test/test_timeit.py +306 -0
- package/python3.4.2/lib/python3.4/test/test_timeout.py +303 -0
- package/python3.4.2/lib/python3.4/test/test_tk.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_tokenize.py +1233 -0
- package/python3.4.2/lib/python3.4/test/test_trace.py +415 -0
- package/python3.4.2/lib/python3.4/test/test_traceback.py +451 -0
- package/python3.4.2/lib/python3.4/test/test_tracemalloc.py +826 -0
- package/python3.4.2/lib/python3.4/test/test_ttk_guionly.py +37 -0
- package/python3.4.2/lib/python3.4/test/test_ttk_textonly.py +17 -0
- package/python3.4.2/lib/python3.4/test/test_tuple.py +208 -0
- package/python3.4.2/lib/python3.4/test/test_typechecks.py +76 -0
- package/python3.4.2/lib/python3.4/test/test_types.py +1178 -0
- package/python3.4.2/lib/python3.4/test/test_ucn.py +240 -0
- package/python3.4.2/lib/python3.4/test/test_unary.py +58 -0
- package/python3.4.2/lib/python3.4/test/test_unicode.py +2596 -0
- package/python3.4.2/lib/python3.4/test/test_unicode_file.py +144 -0
- package/python3.4.2/lib/python3.4/test/test_unicodedata.py +323 -0
- package/python3.4.2/lib/python3.4/test/test_unittest.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_univnewlines.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_unpack.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_unpack_ex.py +174 -0
- package/python3.4.2/lib/python3.4/test/test_urllib.py +1486 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2.py +1646 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2_localnet.py +690 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2net.py +342 -0
- package/python3.4.2/lib/python3.4/test/test_urllib_response.py +59 -0
- package/python3.4.2/lib/python3.4/test/test_urllibnet.py +212 -0
- package/python3.4.2/lib/python3.4/test/test_urlparse.py +879 -0
- package/python3.4.2/lib/python3.4/test/test_userdict.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_userlist.py +65 -0
- package/python3.4.2/lib/python3.4/test/test_userstring.py +47 -0
- package/python3.4.2/lib/python3.4/test/test_uu.py +239 -0
- package/python3.4.2/lib/python3.4/test/test_uuid.py +498 -0
- package/python3.4.2/lib/python3.4/test/test_venv.py +406 -0
- package/python3.4.2/lib/python3.4/test/test_wait3.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_wait4.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_warnings.py +873 -0
- package/python3.4.2/lib/python3.4/test/test_wave.py +107 -0
- package/python3.4.2/lib/python3.4/test/test_weakref.py +1801 -0
- package/python3.4.2/lib/python3.4/test/test_weakset.py +450 -0
- package/python3.4.2/lib/python3.4/test/test_webbrowser.py +192 -0
- package/python3.4.2/lib/python3.4/test/test_winreg.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_winsound.py +253 -0
- package/python3.4.2/lib/python3.4/test/test_with.py +750 -0
- package/python3.4.2/lib/python3.4/test/test_wsgiref.py +640 -0
- package/python3.4.2/lib/python3.4/test/test_xdrlib.py +58 -0
- package/python3.4.2/lib/python3.4/test/test_xml_dom_minicompat.py +101 -0
- package/python3.4.2/lib/python3.4/test/test_xml_etree.py +2587 -0
- package/python3.4.2/lib/python3.4/test/test_xml_etree_c.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_xmlrpc.py +1114 -0
- package/python3.4.2/lib/python3.4/test/test_xmlrpc_net.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_zipfile.py +1783 -0
- package/python3.4.2/lib/python3.4/test/test_zipfile64.py +118 -0
- package/python3.4.2/lib/python3.4/test/test_zipimport.py +507 -0
- package/python3.4.2/lib/python3.4/test/test_zipimport_support.py +246 -0
- package/python3.4.2/lib/python3.4/test/test_zlib.py +725 -0
- package/python3.4.2/lib/python3.4/test/testcodec.py +48 -0
- package/python3.4.2/lib/python3.4/test/testtar.tar +0 -0
- package/python3.4.2/lib/python3.4/test/tf_inherit_check.py +25 -0
- package/python3.4.2/lib/python3.4/test/threaded_import_hangers.py +45 -0
- package/python3.4.2/lib/python3.4/test/time_hashlib.py +87 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt +13 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt +11 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt +13 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt +12 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests.txt +189 -0
- package/python3.4.2/lib/python3.4/test/tracedmodules/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/test/tracedmodules/testmod.py +9 -0
- package/python3.4.2/lib/python3.4/test/warning_tests.py +9 -0
- package/python3.4.2/lib/python3.4/test/win_console_handler.py +49 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/simple-ns.xml +7 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/simple.xml +6 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml +115 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml.out +115 -0
- package/python3.4.2/lib/python3.4/test/xmltests.py +21 -0
- package/python3.4.2/lib/python3.4/test/zip_cp437_header.zip +0 -0
- package/python3.4.2/lib/python3.4/test/zipdir.zip +0 -0
- package/python3.4.2/lib/python3.4/textwrap.py +470 -0
- package/python3.4.2/lib/python3.4/this.py +28 -0
- package/python3.4.2/lib/python3.4/threading.py +1359 -0
- package/python3.4.2/lib/python3.4/timeit.py +322 -0
- package/python3.4.2/lib/python3.4/tkinter/__init__.py +3898 -0
- package/python3.4.2/lib/python3.4/tkinter/__main__.py +7 -0
- package/python3.4.2/lib/python3.4/tkinter/_fix.py +78 -0
- package/python3.4.2/lib/python3.4/tkinter/colorchooser.py +72 -0
- package/python3.4.2/lib/python3.4/tkinter/commondialog.py +60 -0
- package/python3.4.2/lib/python3.4/tkinter/constants.py +110 -0
- package/python3.4.2/lib/python3.4/tkinter/dialog.py +49 -0
- package/python3.4.2/lib/python3.4/tkinter/dnd.py +321 -0
- package/python3.4.2/lib/python3.4/tkinter/filedialog.py +479 -0
- package/python3.4.2/lib/python3.4/tkinter/font.py +234 -0
- package/python3.4.2/lib/python3.4/tkinter/messagebox.py +134 -0
- package/python3.4.2/lib/python3.4/tkinter/scrolledtext.py +54 -0
- package/python3.4.2/lib/python3.4/tkinter/simpledialog.py +423 -0
- package/python3.4.2/lib/python3.4/tkinter/test/README +14 -0
- package/python3.4.2/lib/python3.4/tkinter/test/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/runtktests.py +71 -0
- package/python3.4.2/lib/python3.4/tkinter/test/support.py +104 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_font.py +27 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py +900 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_images.py +327 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_loadtk.py +46 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_misc.py +42 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_text.py +47 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_variables.py +186 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py +1193 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_extensions.py +291 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_functions.py +462 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_style.py +92 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_widgets.py +1598 -0
- package/python3.4.2/lib/python3.4/tkinter/test/widget_tests.py +521 -0
- package/python3.4.2/lib/python3.4/tkinter/tix.py +1944 -0
- package/python3.4.2/lib/python3.4/tkinter/ttk.py +1616 -0
- package/python3.4.2/lib/python3.4/token.py +140 -0
- package/python3.4.2/lib/python3.4/tokenize.py +691 -0
- package/python3.4.2/lib/python3.4/trace.py +858 -0
- package/python3.4.2/lib/python3.4/traceback.py +313 -0
- package/python3.4.2/lib/python3.4/tracemalloc.py +487 -0
- package/python3.4.2/lib/python3.4/tty.py +36 -0
- package/python3.4.2/lib/python3.4/turtle.py +4140 -0
- package/python3.4.2/lib/python3.4/turtledemo/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/turtledemo/__main__.py +380 -0
- package/python3.4.2/lib/python3.4/turtledemo/bytedesign.py +162 -0
- package/python3.4.2/lib/python3.4/turtledemo/chaos.py +59 -0
- package/python3.4.2/lib/python3.4/turtledemo/clock.py +132 -0
- package/python3.4.2/lib/python3.4/turtledemo/colormixer.py +58 -0
- package/python3.4.2/lib/python3.4/turtledemo/forest.py +108 -0
- package/python3.4.2/lib/python3.4/turtledemo/fractalcurves.py +138 -0
- package/python3.4.2/lib/python3.4/turtledemo/lindenmayer.py +119 -0
- package/python3.4.2/lib/python3.4/turtledemo/minimal_hanoi.py +79 -0
- package/python3.4.2/lib/python3.4/turtledemo/nim.py +226 -0
- package/python3.4.2/lib/python3.4/turtledemo/paint.py +54 -0
- package/python3.4.2/lib/python3.4/turtledemo/peace.py +61 -0
- package/python3.4.2/lib/python3.4/turtledemo/penrose.py +181 -0
- package/python3.4.2/lib/python3.4/turtledemo/planet_and_moon.py +112 -0
- package/python3.4.2/lib/python3.4/turtledemo/round_dance.py +86 -0
- package/python3.4.2/lib/python3.4/turtledemo/tree.py +63 -0
- package/python3.4.2/lib/python3.4/turtledemo/turtle.cfg +10 -0
- package/python3.4.2/lib/python3.4/turtledemo/two_canvases.py +54 -0
- package/python3.4.2/lib/python3.4/turtledemo/wikipedia.py +65 -0
- package/python3.4.2/lib/python3.4/turtledemo/yinyang.py +49 -0
- package/python3.4.2/lib/python3.4/types.py +158 -0
- package/python3.4.2/lib/python3.4/unittest/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/unittest/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/case.py +1400 -0
- package/python3.4.2/lib/python3.4/unittest/loader.py +379 -0
- package/python3.4.2/lib/python3.4/unittest/main.py +248 -0
- package/python3.4.2/lib/python3.4/unittest/mock.py +2330 -0
- package/python3.4.2/lib/python3.4/unittest/result.py +212 -0
- package/python3.4.2/lib/python3.4/unittest/runner.py +213 -0
- package/python3.4.2/lib/python3.4/unittest/signals.py +71 -0
- package/python3.4.2/lib/python3.4/unittest/suite.py +324 -0
- package/python3.4.2/lib/python3.4/unittest/test/__init__.py +22 -0
- package/python3.4.2/lib/python3.4/unittest/test/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/test/_test_warnings.py +73 -0
- package/python3.4.2/lib/python3.4/unittest/test/dummy.py +1 -0
- package/python3.4.2/lib/python3.4/unittest/test/support.py +142 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_assertions.py +398 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_break.py +288 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_case.py +1574 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_discovery.py +527 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_functiontestcase.py +148 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_loader.py +1312 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_program.py +396 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_result.py +660 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_runner.py +346 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_setups.py +506 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_skipping.py +227 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_suite.py +447 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/support.py +23 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testcallable.py +151 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testhelpers.py +908 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testmagicmethods.py +428 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testmock.py +1412 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testpatch.py +1801 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testsentinel.py +28 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testwith.py +259 -0
- package/python3.4.2/lib/python3.4/unittest/util.py +177 -0
- package/python3.4.2/lib/python3.4/urllib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/urllib/error.py +76 -0
- package/python3.4.2/lib/python3.4/urllib/parse.py +973 -0
- package/python3.4.2/lib/python3.4/urllib/request.py +2559 -0
- package/python3.4.2/lib/python3.4/urllib/response.py +76 -0
- package/python3.4.2/lib/python3.4/urllib/robotparser.py +212 -0
- package/python3.4.2/lib/python3.4/uu.py +199 -0
- package/python3.4.2/lib/python3.4/uuid.py +591 -0
- package/python3.4.2/lib/python3.4/venv/__init__.py +449 -0
- package/python3.4.2/lib/python3.4/venv/__main__.py +10 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate +76 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.csh +37 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.fish +74 -0
- package/python3.4.2/lib/python3.4/warnings.py +407 -0
- package/python3.4.2/lib/python3.4/wave.py +503 -0
- package/python3.4.2/lib/python3.4/weakref.py +577 -0
- package/python3.4.2/lib/python3.4/webbrowser.py +651 -0
- package/python3.4.2/lib/python3.4/wsgiref/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/wsgiref/handlers.py +547 -0
- package/python3.4.2/lib/python3.4/wsgiref/headers.py +184 -0
- package/python3.4.2/lib/python3.4/wsgiref/simple_server.py +165 -0
- package/python3.4.2/lib/python3.4/wsgiref/util.py +165 -0
- package/python3.4.2/lib/python3.4/wsgiref/validate.py +443 -0
- package/python3.4.2/lib/python3.4/xdrlib.py +224 -0
- package/python3.4.2/lib/python3.4/xml/__init__.py +20 -0
- package/python3.4.2/lib/python3.4/xml/dom/NodeFilter.py +27 -0
- package/python3.4.2/lib/python3.4/xml/dom/__init__.py +140 -0
- package/python3.4.2/lib/python3.4/xml/dom/domreg.py +97 -0
- package/python3.4.2/lib/python3.4/xml/dom/expatbuilder.py +965 -0
- package/python3.4.2/lib/python3.4/xml/dom/minicompat.py +109 -0
- package/python3.4.2/lib/python3.4/xml/dom/minidom.py +1983 -0
- package/python3.4.2/lib/python3.4/xml/dom/pulldom.py +342 -0
- package/python3.4.2/lib/python3.4/xml/dom/xmlbuilder.py +386 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementInclude.py +143 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementPath.py +308 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementTree.py +1667 -0
- package/python3.4.2/lib/python3.4/xml/etree/__init__.py +33 -0
- package/python3.4.2/lib/python3.4/xml/etree/cElementTree.py +3 -0
- package/python3.4.2/lib/python3.4/xml/parsers/__init__.py +8 -0
- package/python3.4.2/lib/python3.4/xml/parsers/expat.py +8 -0
- package/python3.4.2/lib/python3.4/xml/sax/__init__.py +105 -0
- package/python3.4.2/lib/python3.4/xml/sax/_exceptions.py +131 -0
- package/python3.4.2/lib/python3.4/xml/sax/expatreader.py +417 -0
- package/python3.4.2/lib/python3.4/xml/sax/handler.py +342 -0
- package/python3.4.2/lib/python3.4/xml/sax/saxutils.py +365 -0
- package/python3.4.2/lib/python3.4/xml/sax/xmlreader.py +378 -0
- package/python3.4.2/lib/python3.4/xmlrpc/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/xmlrpc/client.py +1479 -0
- package/python3.4.2/lib/python3.4/xmlrpc/server.py +986 -0
- package/python3.4.2/lib/python3.4/zipfile.py +1788 -0
- package/python3.4.2/share/man/man1/python3.1 +460 -0
- package/python3.4.2/share/man/man1/python3.4.1 +460 -0
|
@@ -0,0 +1,2901 @@
|
|
|
1
|
+
import codecs
|
|
2
|
+
import contextlib
|
|
3
|
+
import io
|
|
4
|
+
import locale
|
|
5
|
+
import sys
|
|
6
|
+
import unittest
|
|
7
|
+
import warnings
|
|
8
|
+
import encodings
|
|
9
|
+
|
|
10
|
+
from test import support
|
|
11
|
+
|
|
12
|
+
if sys.platform == 'win32':
|
|
13
|
+
VISTA_OR_LATER = (sys.getwindowsversion().major >= 6)
|
|
14
|
+
else:
|
|
15
|
+
VISTA_OR_LATER = False
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
import ctypes
|
|
19
|
+
except ImportError:
|
|
20
|
+
ctypes = None
|
|
21
|
+
SIZEOF_WCHAR_T = -1
|
|
22
|
+
else:
|
|
23
|
+
SIZEOF_WCHAR_T = ctypes.sizeof(ctypes.c_wchar)
|
|
24
|
+
|
|
25
|
+
def coding_checker(self, coder):
|
|
26
|
+
def check(input, expect):
|
|
27
|
+
self.assertEqual(coder(input), (expect, len(input)))
|
|
28
|
+
return check
|
|
29
|
+
|
|
30
|
+
class Queue(object):
|
|
31
|
+
"""
|
|
32
|
+
queue: write bytes at one end, read bytes from the other end
|
|
33
|
+
"""
|
|
34
|
+
def __init__(self, buffer):
|
|
35
|
+
self._buffer = buffer
|
|
36
|
+
|
|
37
|
+
def write(self, chars):
|
|
38
|
+
self._buffer += chars
|
|
39
|
+
|
|
40
|
+
def read(self, size=-1):
|
|
41
|
+
if size<0:
|
|
42
|
+
s = self._buffer
|
|
43
|
+
self._buffer = self._buffer[:0] # make empty
|
|
44
|
+
return s
|
|
45
|
+
else:
|
|
46
|
+
s = self._buffer[:size]
|
|
47
|
+
self._buffer = self._buffer[size:]
|
|
48
|
+
return s
|
|
49
|
+
|
|
50
|
+
class MixInCheckStateHandling:
|
|
51
|
+
def check_state_handling_decode(self, encoding, u, s):
|
|
52
|
+
for i in range(len(s)+1):
|
|
53
|
+
d = codecs.getincrementaldecoder(encoding)()
|
|
54
|
+
part1 = d.decode(s[:i])
|
|
55
|
+
state = d.getstate()
|
|
56
|
+
self.assertIsInstance(state[1], int)
|
|
57
|
+
# Check that the condition stated in the documentation for
|
|
58
|
+
# IncrementalDecoder.getstate() holds
|
|
59
|
+
if not state[1]:
|
|
60
|
+
# reset decoder to the default state without anything buffered
|
|
61
|
+
d.setstate((state[0][:0], 0))
|
|
62
|
+
# Feeding the previous input may not produce any output
|
|
63
|
+
self.assertTrue(not d.decode(state[0]))
|
|
64
|
+
# The decoder must return to the same state
|
|
65
|
+
self.assertEqual(state, d.getstate())
|
|
66
|
+
# Create a new decoder and set it to the state
|
|
67
|
+
# we extracted from the old one
|
|
68
|
+
d = codecs.getincrementaldecoder(encoding)()
|
|
69
|
+
d.setstate(state)
|
|
70
|
+
part2 = d.decode(s[i:], True)
|
|
71
|
+
self.assertEqual(u, part1+part2)
|
|
72
|
+
|
|
73
|
+
def check_state_handling_encode(self, encoding, u, s):
|
|
74
|
+
for i in range(len(u)+1):
|
|
75
|
+
d = codecs.getincrementalencoder(encoding)()
|
|
76
|
+
part1 = d.encode(u[:i])
|
|
77
|
+
state = d.getstate()
|
|
78
|
+
d = codecs.getincrementalencoder(encoding)()
|
|
79
|
+
d.setstate(state)
|
|
80
|
+
part2 = d.encode(u[i:], True)
|
|
81
|
+
self.assertEqual(s, part1+part2)
|
|
82
|
+
|
|
83
|
+
class ReadTest(MixInCheckStateHandling):
|
|
84
|
+
def check_partial(self, input, partialresults):
|
|
85
|
+
# get a StreamReader for the encoding and feed the bytestring version
|
|
86
|
+
# of input to the reader byte by byte. Read everything available from
|
|
87
|
+
# the StreamReader and check that the results equal the appropriate
|
|
88
|
+
# entries from partialresults.
|
|
89
|
+
q = Queue(b"")
|
|
90
|
+
r = codecs.getreader(self.encoding)(q)
|
|
91
|
+
result = ""
|
|
92
|
+
for (c, partialresult) in zip(input.encode(self.encoding), partialresults):
|
|
93
|
+
q.write(bytes([c]))
|
|
94
|
+
result += r.read()
|
|
95
|
+
self.assertEqual(result, partialresult)
|
|
96
|
+
# check that there's nothing left in the buffers
|
|
97
|
+
self.assertEqual(r.read(), "")
|
|
98
|
+
self.assertEqual(r.bytebuffer, b"")
|
|
99
|
+
|
|
100
|
+
# do the check again, this time using a incremental decoder
|
|
101
|
+
d = codecs.getincrementaldecoder(self.encoding)()
|
|
102
|
+
result = ""
|
|
103
|
+
for (c, partialresult) in zip(input.encode(self.encoding), partialresults):
|
|
104
|
+
result += d.decode(bytes([c]))
|
|
105
|
+
self.assertEqual(result, partialresult)
|
|
106
|
+
# check that there's nothing left in the buffers
|
|
107
|
+
self.assertEqual(d.decode(b"", True), "")
|
|
108
|
+
self.assertEqual(d.buffer, b"")
|
|
109
|
+
|
|
110
|
+
# Check whether the reset method works properly
|
|
111
|
+
d.reset()
|
|
112
|
+
result = ""
|
|
113
|
+
for (c, partialresult) in zip(input.encode(self.encoding), partialresults):
|
|
114
|
+
result += d.decode(bytes([c]))
|
|
115
|
+
self.assertEqual(result, partialresult)
|
|
116
|
+
# check that there's nothing left in the buffers
|
|
117
|
+
self.assertEqual(d.decode(b"", True), "")
|
|
118
|
+
self.assertEqual(d.buffer, b"")
|
|
119
|
+
|
|
120
|
+
# check iterdecode()
|
|
121
|
+
encoded = input.encode(self.encoding)
|
|
122
|
+
self.assertEqual(
|
|
123
|
+
input,
|
|
124
|
+
"".join(codecs.iterdecode([bytes([c]) for c in encoded], self.encoding))
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def test_readline(self):
|
|
128
|
+
def getreader(input):
|
|
129
|
+
stream = io.BytesIO(input.encode(self.encoding))
|
|
130
|
+
return codecs.getreader(self.encoding)(stream)
|
|
131
|
+
|
|
132
|
+
def readalllines(input, keepends=True, size=None):
|
|
133
|
+
reader = getreader(input)
|
|
134
|
+
lines = []
|
|
135
|
+
while True:
|
|
136
|
+
line = reader.readline(size=size, keepends=keepends)
|
|
137
|
+
if not line:
|
|
138
|
+
break
|
|
139
|
+
lines.append(line)
|
|
140
|
+
return "|".join(lines)
|
|
141
|
+
|
|
142
|
+
s = "foo\nbar\r\nbaz\rspam\u2028eggs"
|
|
143
|
+
sexpected = "foo\n|bar\r\n|baz\r|spam\u2028|eggs"
|
|
144
|
+
sexpectednoends = "foo|bar|baz|spam|eggs"
|
|
145
|
+
self.assertEqual(readalllines(s, True), sexpected)
|
|
146
|
+
self.assertEqual(readalllines(s, False), sexpectednoends)
|
|
147
|
+
self.assertEqual(readalllines(s, True, 10), sexpected)
|
|
148
|
+
self.assertEqual(readalllines(s, False, 10), sexpectednoends)
|
|
149
|
+
|
|
150
|
+
lineends = ("\n", "\r\n", "\r", "\u2028")
|
|
151
|
+
# Test long lines (multiple calls to read() in readline())
|
|
152
|
+
vw = []
|
|
153
|
+
vwo = []
|
|
154
|
+
for (i, lineend) in enumerate(lineends):
|
|
155
|
+
vw.append((i*200+200)*"\u3042" + lineend)
|
|
156
|
+
vwo.append((i*200+200)*"\u3042")
|
|
157
|
+
self.assertEqual(readalllines("".join(vw), True), "|".join(vw))
|
|
158
|
+
self.assertEqual(readalllines("".join(vw), False), "|".join(vwo))
|
|
159
|
+
|
|
160
|
+
# Test lines where the first read might end with \r, so the
|
|
161
|
+
# reader has to look ahead whether this is a lone \r or a \r\n
|
|
162
|
+
for size in range(80):
|
|
163
|
+
for lineend in lineends:
|
|
164
|
+
s = 10*(size*"a" + lineend + "xxx\n")
|
|
165
|
+
reader = getreader(s)
|
|
166
|
+
for i in range(10):
|
|
167
|
+
self.assertEqual(
|
|
168
|
+
reader.readline(keepends=True),
|
|
169
|
+
size*"a" + lineend,
|
|
170
|
+
)
|
|
171
|
+
self.assertEqual(
|
|
172
|
+
reader.readline(keepends=True),
|
|
173
|
+
"xxx\n",
|
|
174
|
+
)
|
|
175
|
+
reader = getreader(s)
|
|
176
|
+
for i in range(10):
|
|
177
|
+
self.assertEqual(
|
|
178
|
+
reader.readline(keepends=False),
|
|
179
|
+
size*"a",
|
|
180
|
+
)
|
|
181
|
+
self.assertEqual(
|
|
182
|
+
reader.readline(keepends=False),
|
|
183
|
+
"xxx",
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
def test_mixed_readline_and_read(self):
|
|
187
|
+
lines = ["Humpty Dumpty sat on a wall,\n",
|
|
188
|
+
"Humpty Dumpty had a great fall.\r\n",
|
|
189
|
+
"All the king's horses and all the king's men\r",
|
|
190
|
+
"Couldn't put Humpty together again."]
|
|
191
|
+
data = ''.join(lines)
|
|
192
|
+
def getreader():
|
|
193
|
+
stream = io.BytesIO(data.encode(self.encoding))
|
|
194
|
+
return codecs.getreader(self.encoding)(stream)
|
|
195
|
+
|
|
196
|
+
# Issue #8260: Test readline() followed by read()
|
|
197
|
+
f = getreader()
|
|
198
|
+
self.assertEqual(f.readline(), lines[0])
|
|
199
|
+
self.assertEqual(f.read(), ''.join(lines[1:]))
|
|
200
|
+
self.assertEqual(f.read(), '')
|
|
201
|
+
|
|
202
|
+
# Issue #16636: Test readline() followed by readlines()
|
|
203
|
+
f = getreader()
|
|
204
|
+
self.assertEqual(f.readline(), lines[0])
|
|
205
|
+
self.assertEqual(f.readlines(), lines[1:])
|
|
206
|
+
self.assertEqual(f.read(), '')
|
|
207
|
+
|
|
208
|
+
# Test read() followed by read()
|
|
209
|
+
f = getreader()
|
|
210
|
+
self.assertEqual(f.read(size=40, chars=5), data[:5])
|
|
211
|
+
self.assertEqual(f.read(), data[5:])
|
|
212
|
+
self.assertEqual(f.read(), '')
|
|
213
|
+
|
|
214
|
+
# Issue #12446: Test read() followed by readlines()
|
|
215
|
+
f = getreader()
|
|
216
|
+
self.assertEqual(f.read(size=40, chars=5), data[:5])
|
|
217
|
+
self.assertEqual(f.readlines(), [lines[0][5:]] + lines[1:])
|
|
218
|
+
self.assertEqual(f.read(), '')
|
|
219
|
+
|
|
220
|
+
def test_bug1175396(self):
|
|
221
|
+
s = [
|
|
222
|
+
'<%!--===================================================\r\n',
|
|
223
|
+
' BLOG index page: show recent articles,\r\n',
|
|
224
|
+
' today\'s articles, or articles of a specific date.\r\n',
|
|
225
|
+
'========================================================--%>\r\n',
|
|
226
|
+
'<%@inputencoding="ISO-8859-1"%>\r\n',
|
|
227
|
+
'<%@pagetemplate=TEMPLATE.y%>\r\n',
|
|
228
|
+
'<%@import=import frog.util, frog%>\r\n',
|
|
229
|
+
'<%@import=import frog.objects%>\r\n',
|
|
230
|
+
'<%@import=from frog.storageerrors import StorageError%>\r\n',
|
|
231
|
+
'<%\r\n',
|
|
232
|
+
'\r\n',
|
|
233
|
+
'import logging\r\n',
|
|
234
|
+
'log=logging.getLogger("Snakelets.logger")\r\n',
|
|
235
|
+
'\r\n',
|
|
236
|
+
'\r\n',
|
|
237
|
+
'user=self.SessionCtx.user\r\n',
|
|
238
|
+
'storageEngine=self.SessionCtx.storageEngine\r\n',
|
|
239
|
+
'\r\n',
|
|
240
|
+
'\r\n',
|
|
241
|
+
'def readArticlesFromDate(date, count=None):\r\n',
|
|
242
|
+
' entryids=storageEngine.listBlogEntries(date)\r\n',
|
|
243
|
+
' entryids.reverse() # descending\r\n',
|
|
244
|
+
' if count:\r\n',
|
|
245
|
+
' entryids=entryids[:count]\r\n',
|
|
246
|
+
' try:\r\n',
|
|
247
|
+
' return [ frog.objects.BlogEntry.load(storageEngine, date, Id) for Id in entryids ]\r\n',
|
|
248
|
+
' except StorageError,x:\r\n',
|
|
249
|
+
' log.error("Error loading articles: "+str(x))\r\n',
|
|
250
|
+
' self.abort("cannot load articles")\r\n',
|
|
251
|
+
'\r\n',
|
|
252
|
+
'showdate=None\r\n',
|
|
253
|
+
'\r\n',
|
|
254
|
+
'arg=self.Request.getArg()\r\n',
|
|
255
|
+
'if arg=="today":\r\n',
|
|
256
|
+
' #-------------------- TODAY\'S ARTICLES\r\n',
|
|
257
|
+
' self.write("<h2>Today\'s articles</h2>")\r\n',
|
|
258
|
+
' showdate = frog.util.isodatestr() \r\n',
|
|
259
|
+
' entries = readArticlesFromDate(showdate)\r\n',
|
|
260
|
+
'elif arg=="active":\r\n',
|
|
261
|
+
' #-------------------- ACTIVE ARTICLES redirect\r\n',
|
|
262
|
+
' self.Yredirect("active.y")\r\n',
|
|
263
|
+
'elif arg=="login":\r\n',
|
|
264
|
+
' #-------------------- LOGIN PAGE redirect\r\n',
|
|
265
|
+
' self.Yredirect("login.y")\r\n',
|
|
266
|
+
'elif arg=="date":\r\n',
|
|
267
|
+
' #-------------------- ARTICLES OF A SPECIFIC DATE\r\n',
|
|
268
|
+
' showdate = self.Request.getParameter("date")\r\n',
|
|
269
|
+
' self.write("<h2>Articles written on %s</h2>"% frog.util.mediumdatestr(showdate))\r\n',
|
|
270
|
+
' entries = readArticlesFromDate(showdate)\r\n',
|
|
271
|
+
'else:\r\n',
|
|
272
|
+
' #-------------------- RECENT ARTICLES\r\n',
|
|
273
|
+
' self.write("<h2>Recent articles</h2>")\r\n',
|
|
274
|
+
' dates=storageEngine.listBlogEntryDates()\r\n',
|
|
275
|
+
' if dates:\r\n',
|
|
276
|
+
' entries=[]\r\n',
|
|
277
|
+
' SHOWAMOUNT=10\r\n',
|
|
278
|
+
' for showdate in dates:\r\n',
|
|
279
|
+
' entries.extend( readArticlesFromDate(showdate, SHOWAMOUNT-len(entries)) )\r\n',
|
|
280
|
+
' if len(entries)>=SHOWAMOUNT:\r\n',
|
|
281
|
+
' break\r\n',
|
|
282
|
+
' \r\n',
|
|
283
|
+
]
|
|
284
|
+
stream = io.BytesIO("".join(s).encode(self.encoding))
|
|
285
|
+
reader = codecs.getreader(self.encoding)(stream)
|
|
286
|
+
for (i, line) in enumerate(reader):
|
|
287
|
+
self.assertEqual(line, s[i])
|
|
288
|
+
|
|
289
|
+
def test_readlinequeue(self):
|
|
290
|
+
q = Queue(b"")
|
|
291
|
+
writer = codecs.getwriter(self.encoding)(q)
|
|
292
|
+
reader = codecs.getreader(self.encoding)(q)
|
|
293
|
+
|
|
294
|
+
# No lineends
|
|
295
|
+
writer.write("foo\r")
|
|
296
|
+
self.assertEqual(reader.readline(keepends=False), "foo")
|
|
297
|
+
writer.write("\nbar\r")
|
|
298
|
+
self.assertEqual(reader.readline(keepends=False), "")
|
|
299
|
+
self.assertEqual(reader.readline(keepends=False), "bar")
|
|
300
|
+
writer.write("baz")
|
|
301
|
+
self.assertEqual(reader.readline(keepends=False), "baz")
|
|
302
|
+
self.assertEqual(reader.readline(keepends=False), "")
|
|
303
|
+
|
|
304
|
+
# Lineends
|
|
305
|
+
writer.write("foo\r")
|
|
306
|
+
self.assertEqual(reader.readline(keepends=True), "foo\r")
|
|
307
|
+
writer.write("\nbar\r")
|
|
308
|
+
self.assertEqual(reader.readline(keepends=True), "\n")
|
|
309
|
+
self.assertEqual(reader.readline(keepends=True), "bar\r")
|
|
310
|
+
writer.write("baz")
|
|
311
|
+
self.assertEqual(reader.readline(keepends=True), "baz")
|
|
312
|
+
self.assertEqual(reader.readline(keepends=True), "")
|
|
313
|
+
writer.write("foo\r\n")
|
|
314
|
+
self.assertEqual(reader.readline(keepends=True), "foo\r\n")
|
|
315
|
+
|
|
316
|
+
def test_bug1098990_a(self):
|
|
317
|
+
s1 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\r\n"
|
|
318
|
+
s2 = "offending line: ladfj askldfj klasdj fskla dfzaskdj fasklfj laskd fjasklfzzzzaa%whereisthis!!!\r\n"
|
|
319
|
+
s3 = "next line.\r\n"
|
|
320
|
+
|
|
321
|
+
s = (s1+s2+s3).encode(self.encoding)
|
|
322
|
+
stream = io.BytesIO(s)
|
|
323
|
+
reader = codecs.getreader(self.encoding)(stream)
|
|
324
|
+
self.assertEqual(reader.readline(), s1)
|
|
325
|
+
self.assertEqual(reader.readline(), s2)
|
|
326
|
+
self.assertEqual(reader.readline(), s3)
|
|
327
|
+
self.assertEqual(reader.readline(), "")
|
|
328
|
+
|
|
329
|
+
def test_bug1098990_b(self):
|
|
330
|
+
s1 = "aaaaaaaaaaaaaaaaaaaaaaaa\r\n"
|
|
331
|
+
s2 = "bbbbbbbbbbbbbbbbbbbbbbbb\r\n"
|
|
332
|
+
s3 = "stillokay:bbbbxx\r\n"
|
|
333
|
+
s4 = "broken!!!!badbad\r\n"
|
|
334
|
+
s5 = "againokay.\r\n"
|
|
335
|
+
|
|
336
|
+
s = (s1+s2+s3+s4+s5).encode(self.encoding)
|
|
337
|
+
stream = io.BytesIO(s)
|
|
338
|
+
reader = codecs.getreader(self.encoding)(stream)
|
|
339
|
+
self.assertEqual(reader.readline(), s1)
|
|
340
|
+
self.assertEqual(reader.readline(), s2)
|
|
341
|
+
self.assertEqual(reader.readline(), s3)
|
|
342
|
+
self.assertEqual(reader.readline(), s4)
|
|
343
|
+
self.assertEqual(reader.readline(), s5)
|
|
344
|
+
self.assertEqual(reader.readline(), "")
|
|
345
|
+
|
|
346
|
+
ill_formed_sequence_replace = "\ufffd"
|
|
347
|
+
|
|
348
|
+
def test_lone_surrogates(self):
|
|
349
|
+
self.assertRaises(UnicodeEncodeError, "\ud800".encode, self.encoding)
|
|
350
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "backslashreplace"),
|
|
351
|
+
"[\\udc80]".encode(self.encoding))
|
|
352
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "xmlcharrefreplace"),
|
|
353
|
+
"[�]".encode(self.encoding))
|
|
354
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "ignore"),
|
|
355
|
+
"[]".encode(self.encoding))
|
|
356
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "replace"),
|
|
357
|
+
"[?]".encode(self.encoding))
|
|
358
|
+
|
|
359
|
+
bom = "".encode(self.encoding)
|
|
360
|
+
for before, after in [("\U00010fff", "A"), ("[", "]"),
|
|
361
|
+
("A", "\U00010fff")]:
|
|
362
|
+
before_sequence = before.encode(self.encoding)[len(bom):]
|
|
363
|
+
after_sequence = after.encode(self.encoding)[len(bom):]
|
|
364
|
+
test_string = before + "\uDC80" + after
|
|
365
|
+
test_sequence = (bom + before_sequence +
|
|
366
|
+
self.ill_formed_sequence + after_sequence)
|
|
367
|
+
self.assertRaises(UnicodeDecodeError, test_sequence.decode,
|
|
368
|
+
self.encoding)
|
|
369
|
+
self.assertEqual(test_string.encode(self.encoding,
|
|
370
|
+
"surrogatepass"),
|
|
371
|
+
test_sequence)
|
|
372
|
+
self.assertEqual(test_sequence.decode(self.encoding,
|
|
373
|
+
"surrogatepass"),
|
|
374
|
+
test_string)
|
|
375
|
+
self.assertEqual(test_sequence.decode(self.encoding, "ignore"),
|
|
376
|
+
before + after)
|
|
377
|
+
self.assertEqual(test_sequence.decode(self.encoding, "replace"),
|
|
378
|
+
before + self.ill_formed_sequence_replace + after)
|
|
379
|
+
|
|
380
|
+
class UTF32Test(ReadTest, unittest.TestCase):
|
|
381
|
+
encoding = "utf-32"
|
|
382
|
+
if sys.byteorder == 'little':
|
|
383
|
+
ill_formed_sequence = b"\x80\xdc\x00\x00"
|
|
384
|
+
else:
|
|
385
|
+
ill_formed_sequence = b"\x00\x00\xdc\x80"
|
|
386
|
+
|
|
387
|
+
spamle = (b'\xff\xfe\x00\x00'
|
|
388
|
+
b's\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m\x00\x00\x00'
|
|
389
|
+
b's\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m\x00\x00\x00')
|
|
390
|
+
spambe = (b'\x00\x00\xfe\xff'
|
|
391
|
+
b'\x00\x00\x00s\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m'
|
|
392
|
+
b'\x00\x00\x00s\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m')
|
|
393
|
+
|
|
394
|
+
def test_only_one_bom(self):
|
|
395
|
+
_,_,reader,writer = codecs.lookup(self.encoding)
|
|
396
|
+
# encode some stream
|
|
397
|
+
s = io.BytesIO()
|
|
398
|
+
f = writer(s)
|
|
399
|
+
f.write("spam")
|
|
400
|
+
f.write("spam")
|
|
401
|
+
d = s.getvalue()
|
|
402
|
+
# check whether there is exactly one BOM in it
|
|
403
|
+
self.assertTrue(d == self.spamle or d == self.spambe)
|
|
404
|
+
# try to read it back
|
|
405
|
+
s = io.BytesIO(d)
|
|
406
|
+
f = reader(s)
|
|
407
|
+
self.assertEqual(f.read(), "spamspam")
|
|
408
|
+
|
|
409
|
+
def test_badbom(self):
|
|
410
|
+
s = io.BytesIO(4*b"\xff")
|
|
411
|
+
f = codecs.getreader(self.encoding)(s)
|
|
412
|
+
self.assertRaises(UnicodeError, f.read)
|
|
413
|
+
|
|
414
|
+
s = io.BytesIO(8*b"\xff")
|
|
415
|
+
f = codecs.getreader(self.encoding)(s)
|
|
416
|
+
self.assertRaises(UnicodeError, f.read)
|
|
417
|
+
|
|
418
|
+
def test_partial(self):
|
|
419
|
+
self.check_partial(
|
|
420
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
421
|
+
[
|
|
422
|
+
"", # first byte of BOM read
|
|
423
|
+
"", # second byte of BOM read
|
|
424
|
+
"", # third byte of BOM read
|
|
425
|
+
"", # fourth byte of BOM read => byteorder known
|
|
426
|
+
"",
|
|
427
|
+
"",
|
|
428
|
+
"",
|
|
429
|
+
"\x00",
|
|
430
|
+
"\x00",
|
|
431
|
+
"\x00",
|
|
432
|
+
"\x00",
|
|
433
|
+
"\x00\xff",
|
|
434
|
+
"\x00\xff",
|
|
435
|
+
"\x00\xff",
|
|
436
|
+
"\x00\xff",
|
|
437
|
+
"\x00\xff\u0100",
|
|
438
|
+
"\x00\xff\u0100",
|
|
439
|
+
"\x00\xff\u0100",
|
|
440
|
+
"\x00\xff\u0100",
|
|
441
|
+
"\x00\xff\u0100\uffff",
|
|
442
|
+
"\x00\xff\u0100\uffff",
|
|
443
|
+
"\x00\xff\u0100\uffff",
|
|
444
|
+
"\x00\xff\u0100\uffff",
|
|
445
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
446
|
+
]
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
def test_handlers(self):
|
|
450
|
+
self.assertEqual(('\ufffd', 1),
|
|
451
|
+
codecs.utf_32_decode(b'\x01', 'replace', True))
|
|
452
|
+
self.assertEqual(('', 1),
|
|
453
|
+
codecs.utf_32_decode(b'\x01', 'ignore', True))
|
|
454
|
+
|
|
455
|
+
def test_errors(self):
|
|
456
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_32_decode,
|
|
457
|
+
b"\xff", "strict", True)
|
|
458
|
+
|
|
459
|
+
def test_decoder_state(self):
|
|
460
|
+
self.check_state_handling_decode(self.encoding,
|
|
461
|
+
"spamspam", self.spamle)
|
|
462
|
+
self.check_state_handling_decode(self.encoding,
|
|
463
|
+
"spamspam", self.spambe)
|
|
464
|
+
|
|
465
|
+
def test_issue8941(self):
|
|
466
|
+
# Issue #8941: insufficient result allocation when decoding into
|
|
467
|
+
# surrogate pairs on UCS-2 builds.
|
|
468
|
+
encoded_le = b'\xff\xfe\x00\x00' + b'\x00\x00\x01\x00' * 1024
|
|
469
|
+
self.assertEqual('\U00010000' * 1024,
|
|
470
|
+
codecs.utf_32_decode(encoded_le)[0])
|
|
471
|
+
encoded_be = b'\x00\x00\xfe\xff' + b'\x00\x01\x00\x00' * 1024
|
|
472
|
+
self.assertEqual('\U00010000' * 1024,
|
|
473
|
+
codecs.utf_32_decode(encoded_be)[0])
|
|
474
|
+
|
|
475
|
+
class UTF32LETest(ReadTest, unittest.TestCase):
|
|
476
|
+
encoding = "utf-32-le"
|
|
477
|
+
ill_formed_sequence = b"\x80\xdc\x00\x00"
|
|
478
|
+
|
|
479
|
+
def test_partial(self):
|
|
480
|
+
self.check_partial(
|
|
481
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
482
|
+
[
|
|
483
|
+
"",
|
|
484
|
+
"",
|
|
485
|
+
"",
|
|
486
|
+
"\x00",
|
|
487
|
+
"\x00",
|
|
488
|
+
"\x00",
|
|
489
|
+
"\x00",
|
|
490
|
+
"\x00\xff",
|
|
491
|
+
"\x00\xff",
|
|
492
|
+
"\x00\xff",
|
|
493
|
+
"\x00\xff",
|
|
494
|
+
"\x00\xff\u0100",
|
|
495
|
+
"\x00\xff\u0100",
|
|
496
|
+
"\x00\xff\u0100",
|
|
497
|
+
"\x00\xff\u0100",
|
|
498
|
+
"\x00\xff\u0100\uffff",
|
|
499
|
+
"\x00\xff\u0100\uffff",
|
|
500
|
+
"\x00\xff\u0100\uffff",
|
|
501
|
+
"\x00\xff\u0100\uffff",
|
|
502
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
503
|
+
]
|
|
504
|
+
)
|
|
505
|
+
|
|
506
|
+
def test_simple(self):
|
|
507
|
+
self.assertEqual("\U00010203".encode(self.encoding), b"\x03\x02\x01\x00")
|
|
508
|
+
|
|
509
|
+
def test_errors(self):
|
|
510
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_32_le_decode,
|
|
511
|
+
b"\xff", "strict", True)
|
|
512
|
+
|
|
513
|
+
def test_issue8941(self):
|
|
514
|
+
# Issue #8941: insufficient result allocation when decoding into
|
|
515
|
+
# surrogate pairs on UCS-2 builds.
|
|
516
|
+
encoded = b'\x00\x00\x01\x00' * 1024
|
|
517
|
+
self.assertEqual('\U00010000' * 1024,
|
|
518
|
+
codecs.utf_32_le_decode(encoded)[0])
|
|
519
|
+
|
|
520
|
+
class UTF32BETest(ReadTest, unittest.TestCase):
|
|
521
|
+
encoding = "utf-32-be"
|
|
522
|
+
ill_formed_sequence = b"\x00\x00\xdc\x80"
|
|
523
|
+
|
|
524
|
+
def test_partial(self):
|
|
525
|
+
self.check_partial(
|
|
526
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
527
|
+
[
|
|
528
|
+
"",
|
|
529
|
+
"",
|
|
530
|
+
"",
|
|
531
|
+
"\x00",
|
|
532
|
+
"\x00",
|
|
533
|
+
"\x00",
|
|
534
|
+
"\x00",
|
|
535
|
+
"\x00\xff",
|
|
536
|
+
"\x00\xff",
|
|
537
|
+
"\x00\xff",
|
|
538
|
+
"\x00\xff",
|
|
539
|
+
"\x00\xff\u0100",
|
|
540
|
+
"\x00\xff\u0100",
|
|
541
|
+
"\x00\xff\u0100",
|
|
542
|
+
"\x00\xff\u0100",
|
|
543
|
+
"\x00\xff\u0100\uffff",
|
|
544
|
+
"\x00\xff\u0100\uffff",
|
|
545
|
+
"\x00\xff\u0100\uffff",
|
|
546
|
+
"\x00\xff\u0100\uffff",
|
|
547
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
548
|
+
]
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
def test_simple(self):
|
|
552
|
+
self.assertEqual("\U00010203".encode(self.encoding), b"\x00\x01\x02\x03")
|
|
553
|
+
|
|
554
|
+
def test_errors(self):
|
|
555
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_32_be_decode,
|
|
556
|
+
b"\xff", "strict", True)
|
|
557
|
+
|
|
558
|
+
def test_issue8941(self):
|
|
559
|
+
# Issue #8941: insufficient result allocation when decoding into
|
|
560
|
+
# surrogate pairs on UCS-2 builds.
|
|
561
|
+
encoded = b'\x00\x01\x00\x00' * 1024
|
|
562
|
+
self.assertEqual('\U00010000' * 1024,
|
|
563
|
+
codecs.utf_32_be_decode(encoded)[0])
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
class UTF16Test(ReadTest, unittest.TestCase):
|
|
567
|
+
encoding = "utf-16"
|
|
568
|
+
if sys.byteorder == 'little':
|
|
569
|
+
ill_formed_sequence = b"\x80\xdc"
|
|
570
|
+
else:
|
|
571
|
+
ill_formed_sequence = b"\xdc\x80"
|
|
572
|
+
|
|
573
|
+
spamle = b'\xff\xfes\x00p\x00a\x00m\x00s\x00p\x00a\x00m\x00'
|
|
574
|
+
spambe = b'\xfe\xff\x00s\x00p\x00a\x00m\x00s\x00p\x00a\x00m'
|
|
575
|
+
|
|
576
|
+
def test_only_one_bom(self):
|
|
577
|
+
_,_,reader,writer = codecs.lookup(self.encoding)
|
|
578
|
+
# encode some stream
|
|
579
|
+
s = io.BytesIO()
|
|
580
|
+
f = writer(s)
|
|
581
|
+
f.write("spam")
|
|
582
|
+
f.write("spam")
|
|
583
|
+
d = s.getvalue()
|
|
584
|
+
# check whether there is exactly one BOM in it
|
|
585
|
+
self.assertTrue(d == self.spamle or d == self.spambe)
|
|
586
|
+
# try to read it back
|
|
587
|
+
s = io.BytesIO(d)
|
|
588
|
+
f = reader(s)
|
|
589
|
+
self.assertEqual(f.read(), "spamspam")
|
|
590
|
+
|
|
591
|
+
def test_badbom(self):
|
|
592
|
+
s = io.BytesIO(b"\xff\xff")
|
|
593
|
+
f = codecs.getreader(self.encoding)(s)
|
|
594
|
+
self.assertRaises(UnicodeError, f.read)
|
|
595
|
+
|
|
596
|
+
s = io.BytesIO(b"\xff\xff\xff\xff")
|
|
597
|
+
f = codecs.getreader(self.encoding)(s)
|
|
598
|
+
self.assertRaises(UnicodeError, f.read)
|
|
599
|
+
|
|
600
|
+
def test_partial(self):
|
|
601
|
+
self.check_partial(
|
|
602
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
603
|
+
[
|
|
604
|
+
"", # first byte of BOM read
|
|
605
|
+
"", # second byte of BOM read => byteorder known
|
|
606
|
+
"",
|
|
607
|
+
"\x00",
|
|
608
|
+
"\x00",
|
|
609
|
+
"\x00\xff",
|
|
610
|
+
"\x00\xff",
|
|
611
|
+
"\x00\xff\u0100",
|
|
612
|
+
"\x00\xff\u0100",
|
|
613
|
+
"\x00\xff\u0100\uffff",
|
|
614
|
+
"\x00\xff\u0100\uffff",
|
|
615
|
+
"\x00\xff\u0100\uffff",
|
|
616
|
+
"\x00\xff\u0100\uffff",
|
|
617
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
618
|
+
]
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
def test_handlers(self):
|
|
622
|
+
self.assertEqual(('\ufffd', 1),
|
|
623
|
+
codecs.utf_16_decode(b'\x01', 'replace', True))
|
|
624
|
+
self.assertEqual(('', 1),
|
|
625
|
+
codecs.utf_16_decode(b'\x01', 'ignore', True))
|
|
626
|
+
|
|
627
|
+
def test_errors(self):
|
|
628
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_decode,
|
|
629
|
+
b"\xff", "strict", True)
|
|
630
|
+
|
|
631
|
+
def test_decoder_state(self):
|
|
632
|
+
self.check_state_handling_decode(self.encoding,
|
|
633
|
+
"spamspam", self.spamle)
|
|
634
|
+
self.check_state_handling_decode(self.encoding,
|
|
635
|
+
"spamspam", self.spambe)
|
|
636
|
+
|
|
637
|
+
def test_bug691291(self):
|
|
638
|
+
# Files are always opened in binary mode, even if no binary mode was
|
|
639
|
+
# specified. This means that no automatic conversion of '\n' is done
|
|
640
|
+
# on reading and writing.
|
|
641
|
+
s1 = 'Hello\r\nworld\r\n'
|
|
642
|
+
|
|
643
|
+
s = s1.encode(self.encoding)
|
|
644
|
+
self.addCleanup(support.unlink, support.TESTFN)
|
|
645
|
+
with open(support.TESTFN, 'wb') as fp:
|
|
646
|
+
fp.write(s)
|
|
647
|
+
with support.check_warnings(('', DeprecationWarning)):
|
|
648
|
+
reader = codecs.open(support.TESTFN, 'U', encoding=self.encoding)
|
|
649
|
+
with reader:
|
|
650
|
+
self.assertEqual(reader.read(), s1)
|
|
651
|
+
|
|
652
|
+
class UTF16LETest(ReadTest, unittest.TestCase):
|
|
653
|
+
encoding = "utf-16-le"
|
|
654
|
+
ill_formed_sequence = b"\x80\xdc"
|
|
655
|
+
|
|
656
|
+
def test_partial(self):
|
|
657
|
+
self.check_partial(
|
|
658
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
659
|
+
[
|
|
660
|
+
"",
|
|
661
|
+
"\x00",
|
|
662
|
+
"\x00",
|
|
663
|
+
"\x00\xff",
|
|
664
|
+
"\x00\xff",
|
|
665
|
+
"\x00\xff\u0100",
|
|
666
|
+
"\x00\xff\u0100",
|
|
667
|
+
"\x00\xff\u0100\uffff",
|
|
668
|
+
"\x00\xff\u0100\uffff",
|
|
669
|
+
"\x00\xff\u0100\uffff",
|
|
670
|
+
"\x00\xff\u0100\uffff",
|
|
671
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
672
|
+
]
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
def test_errors(self):
|
|
676
|
+
tests = [
|
|
677
|
+
(b'\xff', '\ufffd'),
|
|
678
|
+
(b'A\x00Z', 'A\ufffd'),
|
|
679
|
+
(b'A\x00B\x00C\x00D\x00Z', 'ABCD\ufffd'),
|
|
680
|
+
(b'\x00\xd8', '\ufffd'),
|
|
681
|
+
(b'\x00\xd8A', '\ufffd'),
|
|
682
|
+
(b'\x00\xd8A\x00', '\ufffdA'),
|
|
683
|
+
(b'\x00\xdcA\x00', '\ufffdA'),
|
|
684
|
+
]
|
|
685
|
+
for raw, expected in tests:
|
|
686
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_le_decode,
|
|
687
|
+
raw, 'strict', True)
|
|
688
|
+
self.assertEqual(raw.decode('utf-16le', 'replace'), expected)
|
|
689
|
+
|
|
690
|
+
def test_nonbmp(self):
|
|
691
|
+
self.assertEqual("\U00010203".encode(self.encoding),
|
|
692
|
+
b'\x00\xd8\x03\xde')
|
|
693
|
+
self.assertEqual(b'\x00\xd8\x03\xde'.decode(self.encoding),
|
|
694
|
+
"\U00010203")
|
|
695
|
+
|
|
696
|
+
class UTF16BETest(ReadTest, unittest.TestCase):
|
|
697
|
+
encoding = "utf-16-be"
|
|
698
|
+
ill_formed_sequence = b"\xdc\x80"
|
|
699
|
+
|
|
700
|
+
def test_partial(self):
|
|
701
|
+
self.check_partial(
|
|
702
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
703
|
+
[
|
|
704
|
+
"",
|
|
705
|
+
"\x00",
|
|
706
|
+
"\x00",
|
|
707
|
+
"\x00\xff",
|
|
708
|
+
"\x00\xff",
|
|
709
|
+
"\x00\xff\u0100",
|
|
710
|
+
"\x00\xff\u0100",
|
|
711
|
+
"\x00\xff\u0100\uffff",
|
|
712
|
+
"\x00\xff\u0100\uffff",
|
|
713
|
+
"\x00\xff\u0100\uffff",
|
|
714
|
+
"\x00\xff\u0100\uffff",
|
|
715
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
716
|
+
]
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
def test_errors(self):
|
|
720
|
+
tests = [
|
|
721
|
+
(b'\xff', '\ufffd'),
|
|
722
|
+
(b'\x00A\xff', 'A\ufffd'),
|
|
723
|
+
(b'\x00A\x00B\x00C\x00DZ', 'ABCD\ufffd'),
|
|
724
|
+
(b'\xd8\x00', '\ufffd'),
|
|
725
|
+
(b'\xd8\x00\xdc', '\ufffd'),
|
|
726
|
+
(b'\xd8\x00\x00A', '\ufffdA'),
|
|
727
|
+
(b'\xdc\x00\x00A', '\ufffdA'),
|
|
728
|
+
]
|
|
729
|
+
for raw, expected in tests:
|
|
730
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_be_decode,
|
|
731
|
+
raw, 'strict', True)
|
|
732
|
+
self.assertEqual(raw.decode('utf-16be', 'replace'), expected)
|
|
733
|
+
|
|
734
|
+
def test_nonbmp(self):
|
|
735
|
+
self.assertEqual("\U00010203".encode(self.encoding),
|
|
736
|
+
b'\xd8\x00\xde\x03')
|
|
737
|
+
self.assertEqual(b'\xd8\x00\xde\x03'.decode(self.encoding),
|
|
738
|
+
"\U00010203")
|
|
739
|
+
|
|
740
|
+
class UTF8Test(ReadTest, unittest.TestCase):
|
|
741
|
+
encoding = "utf-8"
|
|
742
|
+
ill_formed_sequence = b"\xed\xb2\x80"
|
|
743
|
+
ill_formed_sequence_replace = "\ufffd" * 3
|
|
744
|
+
|
|
745
|
+
def test_partial(self):
|
|
746
|
+
self.check_partial(
|
|
747
|
+
"\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
748
|
+
[
|
|
749
|
+
"\x00",
|
|
750
|
+
"\x00",
|
|
751
|
+
"\x00\xff",
|
|
752
|
+
"\x00\xff",
|
|
753
|
+
"\x00\xff\u07ff",
|
|
754
|
+
"\x00\xff\u07ff",
|
|
755
|
+
"\x00\xff\u07ff",
|
|
756
|
+
"\x00\xff\u07ff\u0800",
|
|
757
|
+
"\x00\xff\u07ff\u0800",
|
|
758
|
+
"\x00\xff\u07ff\u0800",
|
|
759
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
760
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
761
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
762
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
763
|
+
"\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
764
|
+
]
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
def test_decoder_state(self):
|
|
768
|
+
u = "\x00\x7f\x80\xff\u0100\u07ff\u0800\uffff\U0010ffff"
|
|
769
|
+
self.check_state_handling_decode(self.encoding,
|
|
770
|
+
u, u.encode(self.encoding))
|
|
771
|
+
|
|
772
|
+
def test_lone_surrogates(self):
|
|
773
|
+
super().test_lone_surrogates()
|
|
774
|
+
# not sure if this is making sense for
|
|
775
|
+
# UTF-16 and UTF-32
|
|
776
|
+
self.assertEqual("[\uDC80]".encode('utf-8', "surrogateescape"),
|
|
777
|
+
b'[\x80]')
|
|
778
|
+
|
|
779
|
+
def test_surrogatepass_handler(self):
|
|
780
|
+
self.assertEqual("abc\ud800def".encode("utf-8", "surrogatepass"),
|
|
781
|
+
b"abc\xed\xa0\x80def")
|
|
782
|
+
self.assertEqual(b"abc\xed\xa0\x80def".decode("utf-8", "surrogatepass"),
|
|
783
|
+
"abc\ud800def")
|
|
784
|
+
self.assertEqual("\U00010fff\uD800".encode("utf-8", "surrogatepass"),
|
|
785
|
+
b"\xf0\x90\xbf\xbf\xed\xa0\x80")
|
|
786
|
+
self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode("utf-8", "surrogatepass"),
|
|
787
|
+
"\U00010fff\uD800")
|
|
788
|
+
self.assertTrue(codecs.lookup_error("surrogatepass"))
|
|
789
|
+
with self.assertRaises(UnicodeDecodeError):
|
|
790
|
+
b"abc\xed\xa0".decode("utf-8", "surrogatepass")
|
|
791
|
+
with self.assertRaises(UnicodeDecodeError):
|
|
792
|
+
b"abc\xed\xa0z".decode("utf-8", "surrogatepass")
|
|
793
|
+
|
|
794
|
+
@unittest.skipUnless(sys.platform == 'win32',
|
|
795
|
+
'cp65001 is a Windows-only codec')
|
|
796
|
+
class CP65001Test(ReadTest, unittest.TestCase):
|
|
797
|
+
encoding = "cp65001"
|
|
798
|
+
|
|
799
|
+
def test_encode(self):
|
|
800
|
+
tests = [
|
|
801
|
+
('abc', 'strict', b'abc'),
|
|
802
|
+
('\xe9\u20ac', 'strict', b'\xc3\xa9\xe2\x82\xac'),
|
|
803
|
+
('\U0010ffff', 'strict', b'\xf4\x8f\xbf\xbf'),
|
|
804
|
+
]
|
|
805
|
+
if VISTA_OR_LATER:
|
|
806
|
+
tests.extend((
|
|
807
|
+
('\udc80', 'strict', None),
|
|
808
|
+
('\udc80', 'ignore', b''),
|
|
809
|
+
('\udc80', 'replace', b'?'),
|
|
810
|
+
('\udc80', 'backslashreplace', b'\\udc80'),
|
|
811
|
+
('\udc80', 'surrogatepass', b'\xed\xb2\x80'),
|
|
812
|
+
))
|
|
813
|
+
else:
|
|
814
|
+
tests.append(('\udc80', 'strict', b'\xed\xb2\x80'))
|
|
815
|
+
for text, errors, expected in tests:
|
|
816
|
+
if expected is not None:
|
|
817
|
+
try:
|
|
818
|
+
encoded = text.encode('cp65001', errors)
|
|
819
|
+
except UnicodeEncodeError as err:
|
|
820
|
+
self.fail('Unable to encode %a to cp65001 with '
|
|
821
|
+
'errors=%r: %s' % (text, errors, err))
|
|
822
|
+
self.assertEqual(encoded, expected,
|
|
823
|
+
'%a.encode("cp65001", %r)=%a != %a'
|
|
824
|
+
% (text, errors, encoded, expected))
|
|
825
|
+
else:
|
|
826
|
+
self.assertRaises(UnicodeEncodeError,
|
|
827
|
+
text.encode, "cp65001", errors)
|
|
828
|
+
|
|
829
|
+
def test_decode(self):
|
|
830
|
+
tests = [
|
|
831
|
+
(b'abc', 'strict', 'abc'),
|
|
832
|
+
(b'\xc3\xa9\xe2\x82\xac', 'strict', '\xe9\u20ac'),
|
|
833
|
+
(b'\xf4\x8f\xbf\xbf', 'strict', '\U0010ffff'),
|
|
834
|
+
(b'\xef\xbf\xbd', 'strict', '\ufffd'),
|
|
835
|
+
(b'[\xc3\xa9]', 'strict', '[\xe9]'),
|
|
836
|
+
# invalid bytes
|
|
837
|
+
(b'[\xff]', 'strict', None),
|
|
838
|
+
(b'[\xff]', 'ignore', '[]'),
|
|
839
|
+
(b'[\xff]', 'replace', '[\ufffd]'),
|
|
840
|
+
(b'[\xff]', 'surrogateescape', '[\udcff]'),
|
|
841
|
+
]
|
|
842
|
+
if VISTA_OR_LATER:
|
|
843
|
+
tests.extend((
|
|
844
|
+
(b'[\xed\xb2\x80]', 'strict', None),
|
|
845
|
+
(b'[\xed\xb2\x80]', 'ignore', '[]'),
|
|
846
|
+
(b'[\xed\xb2\x80]', 'replace', '[\ufffd\ufffd\ufffd]'),
|
|
847
|
+
))
|
|
848
|
+
else:
|
|
849
|
+
tests.extend((
|
|
850
|
+
(b'[\xed\xb2\x80]', 'strict', '[\udc80]'),
|
|
851
|
+
))
|
|
852
|
+
for raw, errors, expected in tests:
|
|
853
|
+
if expected is not None:
|
|
854
|
+
try:
|
|
855
|
+
decoded = raw.decode('cp65001', errors)
|
|
856
|
+
except UnicodeDecodeError as err:
|
|
857
|
+
self.fail('Unable to decode %a from cp65001 with '
|
|
858
|
+
'errors=%r: %s' % (raw, errors, err))
|
|
859
|
+
self.assertEqual(decoded, expected,
|
|
860
|
+
'%a.decode("cp65001", %r)=%a != %a'
|
|
861
|
+
% (raw, errors, decoded, expected))
|
|
862
|
+
else:
|
|
863
|
+
self.assertRaises(UnicodeDecodeError,
|
|
864
|
+
raw.decode, 'cp65001', errors)
|
|
865
|
+
|
|
866
|
+
@unittest.skipUnless(VISTA_OR_LATER, 'require Windows Vista or later')
|
|
867
|
+
def test_lone_surrogates(self):
|
|
868
|
+
self.assertRaises(UnicodeEncodeError, "\ud800".encode, "cp65001")
|
|
869
|
+
self.assertRaises(UnicodeDecodeError, b"\xed\xa0\x80".decode, "cp65001")
|
|
870
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "backslashreplace"),
|
|
871
|
+
b'[\\udc80]')
|
|
872
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "xmlcharrefreplace"),
|
|
873
|
+
b'[�]')
|
|
874
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "surrogateescape"),
|
|
875
|
+
b'[\x80]')
|
|
876
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "ignore"),
|
|
877
|
+
b'[]')
|
|
878
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "replace"),
|
|
879
|
+
b'[?]')
|
|
880
|
+
|
|
881
|
+
@unittest.skipUnless(VISTA_OR_LATER, 'require Windows Vista or later')
|
|
882
|
+
def test_surrogatepass_handler(self):
|
|
883
|
+
self.assertEqual("abc\ud800def".encode("cp65001", "surrogatepass"),
|
|
884
|
+
b"abc\xed\xa0\x80def")
|
|
885
|
+
self.assertEqual(b"abc\xed\xa0\x80def".decode("cp65001", "surrogatepass"),
|
|
886
|
+
"abc\ud800def")
|
|
887
|
+
self.assertEqual("\U00010fff\uD800".encode("cp65001", "surrogatepass"),
|
|
888
|
+
b"\xf0\x90\xbf\xbf\xed\xa0\x80")
|
|
889
|
+
self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode("cp65001", "surrogatepass"),
|
|
890
|
+
"\U00010fff\uD800")
|
|
891
|
+
self.assertTrue(codecs.lookup_error("surrogatepass"))
|
|
892
|
+
|
|
893
|
+
def test_readline(self):
|
|
894
|
+
self.skipTest("issue #20571: code page 65001 codec does not "
|
|
895
|
+
"support partial decoder yet")
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
class UTF7Test(ReadTest, unittest.TestCase):
|
|
899
|
+
encoding = "utf-7"
|
|
900
|
+
|
|
901
|
+
def test_partial(self):
|
|
902
|
+
self.check_partial(
|
|
903
|
+
'a+-b\x00c\x80d\u0100e\U00010000f',
|
|
904
|
+
[
|
|
905
|
+
'a',
|
|
906
|
+
'a',
|
|
907
|
+
'a+',
|
|
908
|
+
'a+-',
|
|
909
|
+
'a+-b',
|
|
910
|
+
'a+-b',
|
|
911
|
+
'a+-b',
|
|
912
|
+
'a+-b',
|
|
913
|
+
'a+-b',
|
|
914
|
+
'a+-b\x00',
|
|
915
|
+
'a+-b\x00c',
|
|
916
|
+
'a+-b\x00c',
|
|
917
|
+
'a+-b\x00c',
|
|
918
|
+
'a+-b\x00c',
|
|
919
|
+
'a+-b\x00c',
|
|
920
|
+
'a+-b\x00c\x80',
|
|
921
|
+
'a+-b\x00c\x80d',
|
|
922
|
+
'a+-b\x00c\x80d',
|
|
923
|
+
'a+-b\x00c\x80d',
|
|
924
|
+
'a+-b\x00c\x80d',
|
|
925
|
+
'a+-b\x00c\x80d',
|
|
926
|
+
'a+-b\x00c\x80d\u0100',
|
|
927
|
+
'a+-b\x00c\x80d\u0100e',
|
|
928
|
+
'a+-b\x00c\x80d\u0100e',
|
|
929
|
+
'a+-b\x00c\x80d\u0100e',
|
|
930
|
+
'a+-b\x00c\x80d\u0100e',
|
|
931
|
+
'a+-b\x00c\x80d\u0100e',
|
|
932
|
+
'a+-b\x00c\x80d\u0100e',
|
|
933
|
+
'a+-b\x00c\x80d\u0100e',
|
|
934
|
+
'a+-b\x00c\x80d\u0100e',
|
|
935
|
+
'a+-b\x00c\x80d\u0100e\U00010000',
|
|
936
|
+
'a+-b\x00c\x80d\u0100e\U00010000f',
|
|
937
|
+
]
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
def test_errors(self):
|
|
941
|
+
tests = [
|
|
942
|
+
(b'a\xffb', 'a\ufffdb'),
|
|
943
|
+
(b'a+IK', 'a\ufffd'),
|
|
944
|
+
(b'a+IK-b', 'a\ufffdb'),
|
|
945
|
+
(b'a+IK,b', 'a\ufffdb'),
|
|
946
|
+
(b'a+IKx', 'a\u20ac\ufffd'),
|
|
947
|
+
(b'a+IKx-b', 'a\u20ac\ufffdb'),
|
|
948
|
+
(b'a+IKwgr', 'a\u20ac\ufffd'),
|
|
949
|
+
(b'a+IKwgr-b', 'a\u20ac\ufffdb'),
|
|
950
|
+
(b'a+IKwgr,', 'a\u20ac\ufffd'),
|
|
951
|
+
(b'a+IKwgr,-b', 'a\u20ac\ufffd-b'),
|
|
952
|
+
(b'a+IKwgrB', 'a\u20ac\u20ac\ufffd'),
|
|
953
|
+
(b'a+IKwgrB-b', 'a\u20ac\u20ac\ufffdb'),
|
|
954
|
+
(b'a+/,+IKw-b', 'a\ufffd\u20acb'),
|
|
955
|
+
(b'a+//,+IKw-b', 'a\ufffd\u20acb'),
|
|
956
|
+
(b'a+///,+IKw-b', 'a\uffff\ufffd\u20acb'),
|
|
957
|
+
(b'a+////,+IKw-b', 'a\uffff\ufffd\u20acb'),
|
|
958
|
+
]
|
|
959
|
+
for raw, expected in tests:
|
|
960
|
+
with self.subTest(raw=raw):
|
|
961
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_7_decode,
|
|
962
|
+
raw, 'strict', True)
|
|
963
|
+
self.assertEqual(raw.decode('utf-7', 'replace'), expected)
|
|
964
|
+
|
|
965
|
+
def test_nonbmp(self):
|
|
966
|
+
self.assertEqual('\U000104A0'.encode(self.encoding), b'+2AHcoA-')
|
|
967
|
+
self.assertEqual('\ud801\udca0'.encode(self.encoding), b'+2AHcoA-')
|
|
968
|
+
self.assertEqual(b'+2AHcoA-'.decode(self.encoding), '\U000104A0')
|
|
969
|
+
|
|
970
|
+
test_lone_surrogates = None
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
class UTF16ExTest(unittest.TestCase):
|
|
974
|
+
|
|
975
|
+
def test_errors(self):
|
|
976
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_ex_decode, b"\xff", "strict", 0, True)
|
|
977
|
+
|
|
978
|
+
def test_bad_args(self):
|
|
979
|
+
self.assertRaises(TypeError, codecs.utf_16_ex_decode)
|
|
980
|
+
|
|
981
|
+
class ReadBufferTest(unittest.TestCase):
|
|
982
|
+
|
|
983
|
+
def test_array(self):
|
|
984
|
+
import array
|
|
985
|
+
self.assertEqual(
|
|
986
|
+
codecs.readbuffer_encode(array.array("b", b"spam")),
|
|
987
|
+
(b"spam", 4)
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
def test_empty(self):
|
|
991
|
+
self.assertEqual(codecs.readbuffer_encode(""), (b"", 0))
|
|
992
|
+
|
|
993
|
+
def test_bad_args(self):
|
|
994
|
+
self.assertRaises(TypeError, codecs.readbuffer_encode)
|
|
995
|
+
self.assertRaises(TypeError, codecs.readbuffer_encode, 42)
|
|
996
|
+
|
|
997
|
+
class UTF8SigTest(UTF8Test, unittest.TestCase):
|
|
998
|
+
encoding = "utf-8-sig"
|
|
999
|
+
|
|
1000
|
+
def test_partial(self):
|
|
1001
|
+
self.check_partial(
|
|
1002
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
1003
|
+
[
|
|
1004
|
+
"",
|
|
1005
|
+
"",
|
|
1006
|
+
"", # First BOM has been read and skipped
|
|
1007
|
+
"",
|
|
1008
|
+
"",
|
|
1009
|
+
"\ufeff", # Second BOM has been read and emitted
|
|
1010
|
+
"\ufeff\x00", # "\x00" read and emitted
|
|
1011
|
+
"\ufeff\x00", # First byte of encoded "\xff" read
|
|
1012
|
+
"\ufeff\x00\xff", # Second byte of encoded "\xff" read
|
|
1013
|
+
"\ufeff\x00\xff", # First byte of encoded "\u07ff" read
|
|
1014
|
+
"\ufeff\x00\xff\u07ff", # Second byte of encoded "\u07ff" read
|
|
1015
|
+
"\ufeff\x00\xff\u07ff",
|
|
1016
|
+
"\ufeff\x00\xff\u07ff",
|
|
1017
|
+
"\ufeff\x00\xff\u07ff\u0800",
|
|
1018
|
+
"\ufeff\x00\xff\u07ff\u0800",
|
|
1019
|
+
"\ufeff\x00\xff\u07ff\u0800",
|
|
1020
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1021
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1022
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1023
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1024
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
1025
|
+
]
|
|
1026
|
+
)
|
|
1027
|
+
|
|
1028
|
+
def test_bug1601501(self):
|
|
1029
|
+
# SF bug #1601501: check that the codec works with a buffer
|
|
1030
|
+
self.assertEqual(str(b"\xef\xbb\xbf", "utf-8-sig"), "")
|
|
1031
|
+
|
|
1032
|
+
def test_bom(self):
|
|
1033
|
+
d = codecs.getincrementaldecoder("utf-8-sig")()
|
|
1034
|
+
s = "spam"
|
|
1035
|
+
self.assertEqual(d.decode(s.encode("utf-8-sig")), s)
|
|
1036
|
+
|
|
1037
|
+
def test_stream_bom(self):
|
|
1038
|
+
unistring = "ABC\u00A1\u2200XYZ"
|
|
1039
|
+
bytestring = codecs.BOM_UTF8 + b"ABC\xC2\xA1\xE2\x88\x80XYZ"
|
|
1040
|
+
|
|
1041
|
+
reader = codecs.getreader("utf-8-sig")
|
|
1042
|
+
for sizehint in [None] + list(range(1, 11)) + \
|
|
1043
|
+
[64, 128, 256, 512, 1024]:
|
|
1044
|
+
istream = reader(io.BytesIO(bytestring))
|
|
1045
|
+
ostream = io.StringIO()
|
|
1046
|
+
while 1:
|
|
1047
|
+
if sizehint is not None:
|
|
1048
|
+
data = istream.read(sizehint)
|
|
1049
|
+
else:
|
|
1050
|
+
data = istream.read()
|
|
1051
|
+
|
|
1052
|
+
if not data:
|
|
1053
|
+
break
|
|
1054
|
+
ostream.write(data)
|
|
1055
|
+
|
|
1056
|
+
got = ostream.getvalue()
|
|
1057
|
+
self.assertEqual(got, unistring)
|
|
1058
|
+
|
|
1059
|
+
def test_stream_bare(self):
|
|
1060
|
+
unistring = "ABC\u00A1\u2200XYZ"
|
|
1061
|
+
bytestring = b"ABC\xC2\xA1\xE2\x88\x80XYZ"
|
|
1062
|
+
|
|
1063
|
+
reader = codecs.getreader("utf-8-sig")
|
|
1064
|
+
for sizehint in [None] + list(range(1, 11)) + \
|
|
1065
|
+
[64, 128, 256, 512, 1024]:
|
|
1066
|
+
istream = reader(io.BytesIO(bytestring))
|
|
1067
|
+
ostream = io.StringIO()
|
|
1068
|
+
while 1:
|
|
1069
|
+
if sizehint is not None:
|
|
1070
|
+
data = istream.read(sizehint)
|
|
1071
|
+
else:
|
|
1072
|
+
data = istream.read()
|
|
1073
|
+
|
|
1074
|
+
if not data:
|
|
1075
|
+
break
|
|
1076
|
+
ostream.write(data)
|
|
1077
|
+
|
|
1078
|
+
got = ostream.getvalue()
|
|
1079
|
+
self.assertEqual(got, unistring)
|
|
1080
|
+
|
|
1081
|
+
class EscapeDecodeTest(unittest.TestCase):
|
|
1082
|
+
def test_empty(self):
|
|
1083
|
+
self.assertEqual(codecs.escape_decode(b""), (b"", 0))
|
|
1084
|
+
|
|
1085
|
+
def test_raw(self):
|
|
1086
|
+
decode = codecs.escape_decode
|
|
1087
|
+
for b in range(256):
|
|
1088
|
+
b = bytes([b])
|
|
1089
|
+
if b != b'\\':
|
|
1090
|
+
self.assertEqual(decode(b + b'0'), (b + b'0', 2))
|
|
1091
|
+
|
|
1092
|
+
def test_escape(self):
|
|
1093
|
+
decode = codecs.escape_decode
|
|
1094
|
+
check = coding_checker(self, decode)
|
|
1095
|
+
check(b"[\\\n]", b"[]")
|
|
1096
|
+
check(br'[\"]', b'["]')
|
|
1097
|
+
check(br"[\']", b"[']")
|
|
1098
|
+
check(br"[\\]", br"[\]")
|
|
1099
|
+
check(br"[\a]", b"[\x07]")
|
|
1100
|
+
check(br"[\b]", b"[\x08]")
|
|
1101
|
+
check(br"[\t]", b"[\x09]")
|
|
1102
|
+
check(br"[\n]", b"[\x0a]")
|
|
1103
|
+
check(br"[\v]", b"[\x0b]")
|
|
1104
|
+
check(br"[\f]", b"[\x0c]")
|
|
1105
|
+
check(br"[\r]", b"[\x0d]")
|
|
1106
|
+
check(br"[\7]", b"[\x07]")
|
|
1107
|
+
check(br"[\8]", br"[\8]")
|
|
1108
|
+
check(br"[\78]", b"[\x078]")
|
|
1109
|
+
check(br"[\41]", b"[!]")
|
|
1110
|
+
check(br"[\418]", b"[!8]")
|
|
1111
|
+
check(br"[\101]", b"[A]")
|
|
1112
|
+
check(br"[\1010]", b"[A0]")
|
|
1113
|
+
check(br"[\501]", b"[A]")
|
|
1114
|
+
check(br"[\x41]", b"[A]")
|
|
1115
|
+
check(br"[\X41]", br"[\X41]")
|
|
1116
|
+
check(br"[\x410]", b"[A0]")
|
|
1117
|
+
for b in range(256):
|
|
1118
|
+
if b not in b'\n"\'\\abtnvfr01234567x':
|
|
1119
|
+
b = bytes([b])
|
|
1120
|
+
check(b'\\' + b, b'\\' + b)
|
|
1121
|
+
|
|
1122
|
+
def test_errors(self):
|
|
1123
|
+
decode = codecs.escape_decode
|
|
1124
|
+
self.assertRaises(ValueError, decode, br"\x")
|
|
1125
|
+
self.assertRaises(ValueError, decode, br"[\x]")
|
|
1126
|
+
self.assertEqual(decode(br"[\x]\x", "ignore"), (b"[]", 6))
|
|
1127
|
+
self.assertEqual(decode(br"[\x]\x", "replace"), (b"[?]?", 6))
|
|
1128
|
+
self.assertRaises(ValueError, decode, br"\x0")
|
|
1129
|
+
self.assertRaises(ValueError, decode, br"[\x0]")
|
|
1130
|
+
self.assertEqual(decode(br"[\x0]\x0", "ignore"), (b"[]", 8))
|
|
1131
|
+
self.assertEqual(decode(br"[\x0]\x0", "replace"), (b"[?]?", 8))
|
|
1132
|
+
|
|
1133
|
+
class RecodingTest(unittest.TestCase):
|
|
1134
|
+
def test_recoding(self):
|
|
1135
|
+
f = io.BytesIO()
|
|
1136
|
+
f2 = codecs.EncodedFile(f, "unicode_internal", "utf-8")
|
|
1137
|
+
f2.write("a")
|
|
1138
|
+
f2.close()
|
|
1139
|
+
# Python used to crash on this at exit because of a refcount
|
|
1140
|
+
# bug in _codecsmodule.c
|
|
1141
|
+
|
|
1142
|
+
# From RFC 3492
|
|
1143
|
+
punycode_testcases = [
|
|
1144
|
+
# A Arabic (Egyptian):
|
|
1145
|
+
("\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644"
|
|
1146
|
+
"\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F",
|
|
1147
|
+
b"egbpdaj6bu4bxfgehfvwxn"),
|
|
1148
|
+
# B Chinese (simplified):
|
|
1149
|
+
("\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587",
|
|
1150
|
+
b"ihqwcrb4cv8a8dqg056pqjye"),
|
|
1151
|
+
# C Chinese (traditional):
|
|
1152
|
+
("\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587",
|
|
1153
|
+
b"ihqwctvzc91f659drss3x8bo0yb"),
|
|
1154
|
+
# D Czech: Pro<ccaron>prost<ecaron>nemluv<iacute><ccaron>esky
|
|
1155
|
+
("\u0050\u0072\u006F\u010D\u0070\u0072\u006F\u0073\u0074"
|
|
1156
|
+
"\u011B\u006E\u0065\u006D\u006C\u0075\u0076\u00ED\u010D"
|
|
1157
|
+
"\u0065\u0073\u006B\u0079",
|
|
1158
|
+
b"Proprostnemluvesky-uyb24dma41a"),
|
|
1159
|
+
# E Hebrew:
|
|
1160
|
+
("\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8"
|
|
1161
|
+
"\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2"
|
|
1162
|
+
"\u05D1\u05E8\u05D9\u05EA",
|
|
1163
|
+
b"4dbcagdahymbxekheh6e0a7fei0b"),
|
|
1164
|
+
# F Hindi (Devanagari):
|
|
1165
|
+
("\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D"
|
|
1166
|
+
"\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939"
|
|
1167
|
+
"\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947"
|
|
1168
|
+
"\u0939\u0948\u0902",
|
|
1169
|
+
b"i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd"),
|
|
1170
|
+
|
|
1171
|
+
#(G) Japanese (kanji and hiragana):
|
|
1172
|
+
("\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092"
|
|
1173
|
+
"\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B",
|
|
1174
|
+
b"n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa"),
|
|
1175
|
+
|
|
1176
|
+
# (H) Korean (Hangul syllables):
|
|
1177
|
+
("\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774"
|
|
1178
|
+
"\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74"
|
|
1179
|
+
"\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C",
|
|
1180
|
+
b"989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j"
|
|
1181
|
+
b"psd879ccm6fea98c"),
|
|
1182
|
+
|
|
1183
|
+
# (I) Russian (Cyrillic):
|
|
1184
|
+
("\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E"
|
|
1185
|
+
"\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440"
|
|
1186
|
+
"\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A"
|
|
1187
|
+
"\u0438",
|
|
1188
|
+
b"b1abfaaepdrnnbgefbaDotcwatmq2g4l"),
|
|
1189
|
+
|
|
1190
|
+
# (J) Spanish: Porqu<eacute>nopuedensimplementehablarenEspa<ntilde>ol
|
|
1191
|
+
("\u0050\u006F\u0072\u0071\u0075\u00E9\u006E\u006F\u0070"
|
|
1192
|
+
"\u0075\u0065\u0064\u0065\u006E\u0073\u0069\u006D\u0070"
|
|
1193
|
+
"\u006C\u0065\u006D\u0065\u006E\u0074\u0065\u0068\u0061"
|
|
1194
|
+
"\u0062\u006C\u0061\u0072\u0065\u006E\u0045\u0073\u0070"
|
|
1195
|
+
"\u0061\u00F1\u006F\u006C",
|
|
1196
|
+
b"PorqunopuedensimplementehablarenEspaol-fmd56a"),
|
|
1197
|
+
|
|
1198
|
+
# (K) Vietnamese:
|
|
1199
|
+
# T<adotbelow>isaoh<odotbelow>kh<ocirc>ngth<ecirchookabove>ch\
|
|
1200
|
+
# <ihookabove>n<oacute>iti<ecircacute>ngVi<ecircdotbelow>t
|
|
1201
|
+
("\u0054\u1EA1\u0069\u0073\u0061\u006F\u0068\u1ECD\u006B"
|
|
1202
|
+
"\u0068\u00F4\u006E\u0067\u0074\u0068\u1EC3\u0063\u0068"
|
|
1203
|
+
"\u1EC9\u006E\u00F3\u0069\u0074\u0069\u1EBF\u006E\u0067"
|
|
1204
|
+
"\u0056\u0069\u1EC7\u0074",
|
|
1205
|
+
b"TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g"),
|
|
1206
|
+
|
|
1207
|
+
#(L) 3<nen>B<gumi><kinpachi><sensei>
|
|
1208
|
+
("\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F",
|
|
1209
|
+
b"3B-ww4c5e180e575a65lsy2b"),
|
|
1210
|
+
|
|
1211
|
+
# (M) <amuro><namie>-with-SUPER-MONKEYS
|
|
1212
|
+
("\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074"
|
|
1213
|
+
"\u0068\u002D\u0053\u0055\u0050\u0045\u0052\u002D\u004D"
|
|
1214
|
+
"\u004F\u004E\u004B\u0045\u0059\u0053",
|
|
1215
|
+
b"-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n"),
|
|
1216
|
+
|
|
1217
|
+
# (N) Hello-Another-Way-<sorezore><no><basho>
|
|
1218
|
+
("\u0048\u0065\u006C\u006C\u006F\u002D\u0041\u006E\u006F"
|
|
1219
|
+
"\u0074\u0068\u0065\u0072\u002D\u0057\u0061\u0079\u002D"
|
|
1220
|
+
"\u305D\u308C\u305E\u308C\u306E\u5834\u6240",
|
|
1221
|
+
b"Hello-Another-Way--fc4qua05auwb3674vfr0b"),
|
|
1222
|
+
|
|
1223
|
+
# (O) <hitotsu><yane><no><shita>2
|
|
1224
|
+
("\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B\u0032",
|
|
1225
|
+
b"2-u9tlzr9756bt3uc0v"),
|
|
1226
|
+
|
|
1227
|
+
# (P) Maji<de>Koi<suru>5<byou><mae>
|
|
1228
|
+
("\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059"
|
|
1229
|
+
"\u308B\u0035\u79D2\u524D",
|
|
1230
|
+
b"MajiKoi5-783gue6qz075azm5e"),
|
|
1231
|
+
|
|
1232
|
+
# (Q) <pafii>de<runba>
|
|
1233
|
+
("\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0",
|
|
1234
|
+
b"de-jg4avhby1noc0d"),
|
|
1235
|
+
|
|
1236
|
+
# (R) <sono><supiido><de>
|
|
1237
|
+
("\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067",
|
|
1238
|
+
b"d9juau41awczczp"),
|
|
1239
|
+
|
|
1240
|
+
# (S) -> $1.00 <-
|
|
1241
|
+
("\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020"
|
|
1242
|
+
"\u003C\u002D",
|
|
1243
|
+
b"-> $1.00 <--")
|
|
1244
|
+
]
|
|
1245
|
+
|
|
1246
|
+
for i in punycode_testcases:
|
|
1247
|
+
if len(i)!=2:
|
|
1248
|
+
print(repr(i))
|
|
1249
|
+
|
|
1250
|
+
class PunycodeTest(unittest.TestCase):
|
|
1251
|
+
def test_encode(self):
|
|
1252
|
+
for uni, puny in punycode_testcases:
|
|
1253
|
+
# Need to convert both strings to lower case, since
|
|
1254
|
+
# some of the extended encodings use upper case, but our
|
|
1255
|
+
# code produces only lower case. Converting just puny to
|
|
1256
|
+
# lower is also insufficient, since some of the input characters
|
|
1257
|
+
# are upper case.
|
|
1258
|
+
self.assertEqual(
|
|
1259
|
+
str(uni.encode("punycode"), "ascii").lower(),
|
|
1260
|
+
str(puny, "ascii").lower()
|
|
1261
|
+
)
|
|
1262
|
+
|
|
1263
|
+
def test_decode(self):
|
|
1264
|
+
for uni, puny in punycode_testcases:
|
|
1265
|
+
self.assertEqual(uni, puny.decode("punycode"))
|
|
1266
|
+
puny = puny.decode("ascii").encode("ascii")
|
|
1267
|
+
self.assertEqual(uni, puny.decode("punycode"))
|
|
1268
|
+
|
|
1269
|
+
class UnicodeInternalTest(unittest.TestCase):
|
|
1270
|
+
@unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
|
|
1271
|
+
def test_bug1251300(self):
|
|
1272
|
+
# Decoding with unicode_internal used to not correctly handle "code
|
|
1273
|
+
# points" above 0x10ffff on UCS-4 builds.
|
|
1274
|
+
ok = [
|
|
1275
|
+
(b"\x00\x10\xff\xff", "\U0010ffff"),
|
|
1276
|
+
(b"\x00\x00\x01\x01", "\U00000101"),
|
|
1277
|
+
(b"", ""),
|
|
1278
|
+
]
|
|
1279
|
+
not_ok = [
|
|
1280
|
+
b"\x7f\xff\xff\xff",
|
|
1281
|
+
b"\x80\x00\x00\x00",
|
|
1282
|
+
b"\x81\x00\x00\x00",
|
|
1283
|
+
b"\x00",
|
|
1284
|
+
b"\x00\x00\x00\x00\x00",
|
|
1285
|
+
]
|
|
1286
|
+
for internal, uni in ok:
|
|
1287
|
+
if sys.byteorder == "little":
|
|
1288
|
+
internal = bytes(reversed(internal))
|
|
1289
|
+
with support.check_warnings():
|
|
1290
|
+
self.assertEqual(uni, internal.decode("unicode_internal"))
|
|
1291
|
+
for internal in not_ok:
|
|
1292
|
+
if sys.byteorder == "little":
|
|
1293
|
+
internal = bytes(reversed(internal))
|
|
1294
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1295
|
+
'deprecated', DeprecationWarning)):
|
|
1296
|
+
self.assertRaises(UnicodeDecodeError, internal.decode,
|
|
1297
|
+
"unicode_internal")
|
|
1298
|
+
if sys.byteorder == "little":
|
|
1299
|
+
invalid = b"\x00\x00\x11\x00"
|
|
1300
|
+
else:
|
|
1301
|
+
invalid = b"\x00\x11\x00\x00"
|
|
1302
|
+
with support.check_warnings():
|
|
1303
|
+
self.assertRaises(UnicodeDecodeError,
|
|
1304
|
+
invalid.decode, "unicode_internal")
|
|
1305
|
+
with support.check_warnings():
|
|
1306
|
+
self.assertEqual(invalid.decode("unicode_internal", "replace"),
|
|
1307
|
+
'\ufffd')
|
|
1308
|
+
|
|
1309
|
+
@unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
|
|
1310
|
+
def test_decode_error_attributes(self):
|
|
1311
|
+
try:
|
|
1312
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1313
|
+
'deprecated', DeprecationWarning)):
|
|
1314
|
+
b"\x00\x00\x00\x00\x00\x11\x11\x00".decode("unicode_internal")
|
|
1315
|
+
except UnicodeDecodeError as ex:
|
|
1316
|
+
self.assertEqual("unicode_internal", ex.encoding)
|
|
1317
|
+
self.assertEqual(b"\x00\x00\x00\x00\x00\x11\x11\x00", ex.object)
|
|
1318
|
+
self.assertEqual(4, ex.start)
|
|
1319
|
+
self.assertEqual(8, ex.end)
|
|
1320
|
+
else:
|
|
1321
|
+
self.fail()
|
|
1322
|
+
|
|
1323
|
+
@unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
|
|
1324
|
+
def test_decode_callback(self):
|
|
1325
|
+
codecs.register_error("UnicodeInternalTest", codecs.ignore_errors)
|
|
1326
|
+
decoder = codecs.getdecoder("unicode_internal")
|
|
1327
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1328
|
+
'deprecated', DeprecationWarning)):
|
|
1329
|
+
ab = "ab".encode("unicode_internal").decode()
|
|
1330
|
+
ignored = decoder(bytes("%s\x22\x22\x22\x22%s" % (ab[:4], ab[4:]),
|
|
1331
|
+
"ascii"),
|
|
1332
|
+
"UnicodeInternalTest")
|
|
1333
|
+
self.assertEqual(("ab", 12), ignored)
|
|
1334
|
+
|
|
1335
|
+
def test_encode_length(self):
|
|
1336
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1337
|
+
'deprecated', DeprecationWarning)):
|
|
1338
|
+
# Issue 3739
|
|
1339
|
+
encoder = codecs.getencoder("unicode_internal")
|
|
1340
|
+
self.assertEqual(encoder("a")[1], 1)
|
|
1341
|
+
self.assertEqual(encoder("\xe9\u0142")[1], 2)
|
|
1342
|
+
|
|
1343
|
+
self.assertEqual(codecs.escape_encode(br'\x00')[1], 4)
|
|
1344
|
+
|
|
1345
|
+
# From http://www.gnu.org/software/libidn/draft-josefsson-idn-test-vectors.html
|
|
1346
|
+
nameprep_tests = [
|
|
1347
|
+
# 3.1 Map to nothing.
|
|
1348
|
+
(b'foo\xc2\xad\xcd\x8f\xe1\xa0\x86\xe1\xa0\x8bbar'
|
|
1349
|
+
b'\xe2\x80\x8b\xe2\x81\xa0baz\xef\xb8\x80\xef\xb8\x88\xef'
|
|
1350
|
+
b'\xb8\x8f\xef\xbb\xbf',
|
|
1351
|
+
b'foobarbaz'),
|
|
1352
|
+
# 3.2 Case folding ASCII U+0043 U+0041 U+0046 U+0045.
|
|
1353
|
+
(b'CAFE',
|
|
1354
|
+
b'cafe'),
|
|
1355
|
+
# 3.3 Case folding 8bit U+00DF (german sharp s).
|
|
1356
|
+
# The original test case is bogus; it says \xc3\xdf
|
|
1357
|
+
(b'\xc3\x9f',
|
|
1358
|
+
b'ss'),
|
|
1359
|
+
# 3.4 Case folding U+0130 (turkish capital I with dot).
|
|
1360
|
+
(b'\xc4\xb0',
|
|
1361
|
+
b'i\xcc\x87'),
|
|
1362
|
+
# 3.5 Case folding multibyte U+0143 U+037A.
|
|
1363
|
+
(b'\xc5\x83\xcd\xba',
|
|
1364
|
+
b'\xc5\x84 \xce\xb9'),
|
|
1365
|
+
# 3.6 Case folding U+2121 U+33C6 U+1D7BB.
|
|
1366
|
+
# XXX: skip this as it fails in UCS-2 mode
|
|
1367
|
+
#('\xe2\x84\xa1\xe3\x8f\x86\xf0\x9d\x9e\xbb',
|
|
1368
|
+
# 'telc\xe2\x88\x95kg\xcf\x83'),
|
|
1369
|
+
(None, None),
|
|
1370
|
+
# 3.7 Normalization of U+006a U+030c U+00A0 U+00AA.
|
|
1371
|
+
(b'j\xcc\x8c\xc2\xa0\xc2\xaa',
|
|
1372
|
+
b'\xc7\xb0 a'),
|
|
1373
|
+
# 3.8 Case folding U+1FB7 and normalization.
|
|
1374
|
+
(b'\xe1\xbe\xb7',
|
|
1375
|
+
b'\xe1\xbe\xb6\xce\xb9'),
|
|
1376
|
+
# 3.9 Self-reverting case folding U+01F0 and normalization.
|
|
1377
|
+
# The original test case is bogus, it says `\xc7\xf0'
|
|
1378
|
+
(b'\xc7\xb0',
|
|
1379
|
+
b'\xc7\xb0'),
|
|
1380
|
+
# 3.10 Self-reverting case folding U+0390 and normalization.
|
|
1381
|
+
(b'\xce\x90',
|
|
1382
|
+
b'\xce\x90'),
|
|
1383
|
+
# 3.11 Self-reverting case folding U+03B0 and normalization.
|
|
1384
|
+
(b'\xce\xb0',
|
|
1385
|
+
b'\xce\xb0'),
|
|
1386
|
+
# 3.12 Self-reverting case folding U+1E96 and normalization.
|
|
1387
|
+
(b'\xe1\xba\x96',
|
|
1388
|
+
b'\xe1\xba\x96'),
|
|
1389
|
+
# 3.13 Self-reverting case folding U+1F56 and normalization.
|
|
1390
|
+
(b'\xe1\xbd\x96',
|
|
1391
|
+
b'\xe1\xbd\x96'),
|
|
1392
|
+
# 3.14 ASCII space character U+0020.
|
|
1393
|
+
(b' ',
|
|
1394
|
+
b' '),
|
|
1395
|
+
# 3.15 Non-ASCII 8bit space character U+00A0.
|
|
1396
|
+
(b'\xc2\xa0',
|
|
1397
|
+
b' '),
|
|
1398
|
+
# 3.16 Non-ASCII multibyte space character U+1680.
|
|
1399
|
+
(b'\xe1\x9a\x80',
|
|
1400
|
+
None),
|
|
1401
|
+
# 3.17 Non-ASCII multibyte space character U+2000.
|
|
1402
|
+
(b'\xe2\x80\x80',
|
|
1403
|
+
b' '),
|
|
1404
|
+
# 3.18 Zero Width Space U+200b.
|
|
1405
|
+
(b'\xe2\x80\x8b',
|
|
1406
|
+
b''),
|
|
1407
|
+
# 3.19 Non-ASCII multibyte space character U+3000.
|
|
1408
|
+
(b'\xe3\x80\x80',
|
|
1409
|
+
b' '),
|
|
1410
|
+
# 3.20 ASCII control characters U+0010 U+007F.
|
|
1411
|
+
(b'\x10\x7f',
|
|
1412
|
+
b'\x10\x7f'),
|
|
1413
|
+
# 3.21 Non-ASCII 8bit control character U+0085.
|
|
1414
|
+
(b'\xc2\x85',
|
|
1415
|
+
None),
|
|
1416
|
+
# 3.22 Non-ASCII multibyte control character U+180E.
|
|
1417
|
+
(b'\xe1\xa0\x8e',
|
|
1418
|
+
None),
|
|
1419
|
+
# 3.23 Zero Width No-Break Space U+FEFF.
|
|
1420
|
+
(b'\xef\xbb\xbf',
|
|
1421
|
+
b''),
|
|
1422
|
+
# 3.24 Non-ASCII control character U+1D175.
|
|
1423
|
+
(b'\xf0\x9d\x85\xb5',
|
|
1424
|
+
None),
|
|
1425
|
+
# 3.25 Plane 0 private use character U+F123.
|
|
1426
|
+
(b'\xef\x84\xa3',
|
|
1427
|
+
None),
|
|
1428
|
+
# 3.26 Plane 15 private use character U+F1234.
|
|
1429
|
+
(b'\xf3\xb1\x88\xb4',
|
|
1430
|
+
None),
|
|
1431
|
+
# 3.27 Plane 16 private use character U+10F234.
|
|
1432
|
+
(b'\xf4\x8f\x88\xb4',
|
|
1433
|
+
None),
|
|
1434
|
+
# 3.28 Non-character code point U+8FFFE.
|
|
1435
|
+
(b'\xf2\x8f\xbf\xbe',
|
|
1436
|
+
None),
|
|
1437
|
+
# 3.29 Non-character code point U+10FFFF.
|
|
1438
|
+
(b'\xf4\x8f\xbf\xbf',
|
|
1439
|
+
None),
|
|
1440
|
+
# 3.30 Surrogate code U+DF42.
|
|
1441
|
+
(b'\xed\xbd\x82',
|
|
1442
|
+
None),
|
|
1443
|
+
# 3.31 Non-plain text character U+FFFD.
|
|
1444
|
+
(b'\xef\xbf\xbd',
|
|
1445
|
+
None),
|
|
1446
|
+
# 3.32 Ideographic description character U+2FF5.
|
|
1447
|
+
(b'\xe2\xbf\xb5',
|
|
1448
|
+
None),
|
|
1449
|
+
# 3.33 Display property character U+0341.
|
|
1450
|
+
(b'\xcd\x81',
|
|
1451
|
+
b'\xcc\x81'),
|
|
1452
|
+
# 3.34 Left-to-right mark U+200E.
|
|
1453
|
+
(b'\xe2\x80\x8e',
|
|
1454
|
+
None),
|
|
1455
|
+
# 3.35 Deprecated U+202A.
|
|
1456
|
+
(b'\xe2\x80\xaa',
|
|
1457
|
+
None),
|
|
1458
|
+
# 3.36 Language tagging character U+E0001.
|
|
1459
|
+
(b'\xf3\xa0\x80\x81',
|
|
1460
|
+
None),
|
|
1461
|
+
# 3.37 Language tagging character U+E0042.
|
|
1462
|
+
(b'\xf3\xa0\x81\x82',
|
|
1463
|
+
None),
|
|
1464
|
+
# 3.38 Bidi: RandALCat character U+05BE and LCat characters.
|
|
1465
|
+
(b'foo\xd6\xbebar',
|
|
1466
|
+
None),
|
|
1467
|
+
# 3.39 Bidi: RandALCat character U+FD50 and LCat characters.
|
|
1468
|
+
(b'foo\xef\xb5\x90bar',
|
|
1469
|
+
None),
|
|
1470
|
+
# 3.40 Bidi: RandALCat character U+FB38 and LCat characters.
|
|
1471
|
+
(b'foo\xef\xb9\xb6bar',
|
|
1472
|
+
b'foo \xd9\x8ebar'),
|
|
1473
|
+
# 3.41 Bidi: RandALCat without trailing RandALCat U+0627 U+0031.
|
|
1474
|
+
(b'\xd8\xa71',
|
|
1475
|
+
None),
|
|
1476
|
+
# 3.42 Bidi: RandALCat character U+0627 U+0031 U+0628.
|
|
1477
|
+
(b'\xd8\xa71\xd8\xa8',
|
|
1478
|
+
b'\xd8\xa71\xd8\xa8'),
|
|
1479
|
+
# 3.43 Unassigned code point U+E0002.
|
|
1480
|
+
# Skip this test as we allow unassigned
|
|
1481
|
+
#(b'\xf3\xa0\x80\x82',
|
|
1482
|
+
# None),
|
|
1483
|
+
(None, None),
|
|
1484
|
+
# 3.44 Larger test (shrinking).
|
|
1485
|
+
# Original test case reads \xc3\xdf
|
|
1486
|
+
(b'X\xc2\xad\xc3\x9f\xc4\xb0\xe2\x84\xa1j\xcc\x8c\xc2\xa0\xc2'
|
|
1487
|
+
b'\xaa\xce\xb0\xe2\x80\x80',
|
|
1488
|
+
b'xssi\xcc\x87tel\xc7\xb0 a\xce\xb0 '),
|
|
1489
|
+
# 3.45 Larger test (expanding).
|
|
1490
|
+
# Original test case reads \xc3\x9f
|
|
1491
|
+
(b'X\xc3\x9f\xe3\x8c\x96\xc4\xb0\xe2\x84\xa1\xe2\x92\x9f\xe3\x8c'
|
|
1492
|
+
b'\x80',
|
|
1493
|
+
b'xss\xe3\x82\xad\xe3\x83\xad\xe3\x83\xa1\xe3\x83\xbc\xe3'
|
|
1494
|
+
b'\x83\x88\xe3\x83\xabi\xcc\x87tel\x28d\x29\xe3\x82'
|
|
1495
|
+
b'\xa2\xe3\x83\x91\xe3\x83\xbc\xe3\x83\x88')
|
|
1496
|
+
]
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
class NameprepTest(unittest.TestCase):
|
|
1500
|
+
def test_nameprep(self):
|
|
1501
|
+
from encodings.idna import nameprep
|
|
1502
|
+
for pos, (orig, prepped) in enumerate(nameprep_tests):
|
|
1503
|
+
if orig is None:
|
|
1504
|
+
# Skipped
|
|
1505
|
+
continue
|
|
1506
|
+
# The Unicode strings are given in UTF-8
|
|
1507
|
+
orig = str(orig, "utf-8", "surrogatepass")
|
|
1508
|
+
if prepped is None:
|
|
1509
|
+
# Input contains prohibited characters
|
|
1510
|
+
self.assertRaises(UnicodeError, nameprep, orig)
|
|
1511
|
+
else:
|
|
1512
|
+
prepped = str(prepped, "utf-8", "surrogatepass")
|
|
1513
|
+
try:
|
|
1514
|
+
self.assertEqual(nameprep(orig), prepped)
|
|
1515
|
+
except Exception as e:
|
|
1516
|
+
raise support.TestFailed("Test 3.%d: %s" % (pos+1, str(e)))
|
|
1517
|
+
|
|
1518
|
+
class IDNACodecTest(unittest.TestCase):
|
|
1519
|
+
def test_builtin_decode(self):
|
|
1520
|
+
self.assertEqual(str(b"python.org", "idna"), "python.org")
|
|
1521
|
+
self.assertEqual(str(b"python.org.", "idna"), "python.org.")
|
|
1522
|
+
self.assertEqual(str(b"xn--pythn-mua.org", "idna"), "pyth\xf6n.org")
|
|
1523
|
+
self.assertEqual(str(b"xn--pythn-mua.org.", "idna"), "pyth\xf6n.org.")
|
|
1524
|
+
|
|
1525
|
+
def test_builtin_encode(self):
|
|
1526
|
+
self.assertEqual("python.org".encode("idna"), b"python.org")
|
|
1527
|
+
self.assertEqual("python.org.".encode("idna"), b"python.org.")
|
|
1528
|
+
self.assertEqual("pyth\xf6n.org".encode("idna"), b"xn--pythn-mua.org")
|
|
1529
|
+
self.assertEqual("pyth\xf6n.org.".encode("idna"), b"xn--pythn-mua.org.")
|
|
1530
|
+
|
|
1531
|
+
def test_stream(self):
|
|
1532
|
+
r = codecs.getreader("idna")(io.BytesIO(b"abc"))
|
|
1533
|
+
r.read(3)
|
|
1534
|
+
self.assertEqual(r.read(), "")
|
|
1535
|
+
|
|
1536
|
+
def test_incremental_decode(self):
|
|
1537
|
+
self.assertEqual(
|
|
1538
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"python.org"), "idna")),
|
|
1539
|
+
"python.org"
|
|
1540
|
+
)
|
|
1541
|
+
self.assertEqual(
|
|
1542
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"python.org."), "idna")),
|
|
1543
|
+
"python.org."
|
|
1544
|
+
)
|
|
1545
|
+
self.assertEqual(
|
|
1546
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"xn--pythn-mua.org."), "idna")),
|
|
1547
|
+
"pyth\xf6n.org."
|
|
1548
|
+
)
|
|
1549
|
+
self.assertEqual(
|
|
1550
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"xn--pythn-mua.org."), "idna")),
|
|
1551
|
+
"pyth\xf6n.org."
|
|
1552
|
+
)
|
|
1553
|
+
|
|
1554
|
+
decoder = codecs.getincrementaldecoder("idna")()
|
|
1555
|
+
self.assertEqual(decoder.decode(b"xn--xam", ), "")
|
|
1556
|
+
self.assertEqual(decoder.decode(b"ple-9ta.o", ), "\xe4xample.")
|
|
1557
|
+
self.assertEqual(decoder.decode(b"rg"), "")
|
|
1558
|
+
self.assertEqual(decoder.decode(b"", True), "org")
|
|
1559
|
+
|
|
1560
|
+
decoder.reset()
|
|
1561
|
+
self.assertEqual(decoder.decode(b"xn--xam", ), "")
|
|
1562
|
+
self.assertEqual(decoder.decode(b"ple-9ta.o", ), "\xe4xample.")
|
|
1563
|
+
self.assertEqual(decoder.decode(b"rg."), "org.")
|
|
1564
|
+
self.assertEqual(decoder.decode(b"", True), "")
|
|
1565
|
+
|
|
1566
|
+
def test_incremental_encode(self):
|
|
1567
|
+
self.assertEqual(
|
|
1568
|
+
b"".join(codecs.iterencode("python.org", "idna")),
|
|
1569
|
+
b"python.org"
|
|
1570
|
+
)
|
|
1571
|
+
self.assertEqual(
|
|
1572
|
+
b"".join(codecs.iterencode("python.org.", "idna")),
|
|
1573
|
+
b"python.org."
|
|
1574
|
+
)
|
|
1575
|
+
self.assertEqual(
|
|
1576
|
+
b"".join(codecs.iterencode("pyth\xf6n.org.", "idna")),
|
|
1577
|
+
b"xn--pythn-mua.org."
|
|
1578
|
+
)
|
|
1579
|
+
self.assertEqual(
|
|
1580
|
+
b"".join(codecs.iterencode("pyth\xf6n.org.", "idna")),
|
|
1581
|
+
b"xn--pythn-mua.org."
|
|
1582
|
+
)
|
|
1583
|
+
|
|
1584
|
+
encoder = codecs.getincrementalencoder("idna")()
|
|
1585
|
+
self.assertEqual(encoder.encode("\xe4x"), b"")
|
|
1586
|
+
self.assertEqual(encoder.encode("ample.org"), b"xn--xample-9ta.")
|
|
1587
|
+
self.assertEqual(encoder.encode("", True), b"org")
|
|
1588
|
+
|
|
1589
|
+
encoder.reset()
|
|
1590
|
+
self.assertEqual(encoder.encode("\xe4x"), b"")
|
|
1591
|
+
self.assertEqual(encoder.encode("ample.org."), b"xn--xample-9ta.org.")
|
|
1592
|
+
self.assertEqual(encoder.encode("", True), b"")
|
|
1593
|
+
|
|
1594
|
+
class CodecsModuleTest(unittest.TestCase):
|
|
1595
|
+
|
|
1596
|
+
def test_decode(self):
|
|
1597
|
+
self.assertEqual(codecs.decode(b'\xe4\xf6\xfc', 'latin-1'),
|
|
1598
|
+
'\xe4\xf6\xfc')
|
|
1599
|
+
self.assertRaises(TypeError, codecs.decode)
|
|
1600
|
+
self.assertEqual(codecs.decode(b'abc'), 'abc')
|
|
1601
|
+
self.assertRaises(UnicodeDecodeError, codecs.decode, b'\xff', 'ascii')
|
|
1602
|
+
|
|
1603
|
+
def test_encode(self):
|
|
1604
|
+
self.assertEqual(codecs.encode('\xe4\xf6\xfc', 'latin-1'),
|
|
1605
|
+
b'\xe4\xf6\xfc')
|
|
1606
|
+
self.assertRaises(TypeError, codecs.encode)
|
|
1607
|
+
self.assertRaises(LookupError, codecs.encode, "foo", "__spam__")
|
|
1608
|
+
self.assertEqual(codecs.encode('abc'), b'abc')
|
|
1609
|
+
self.assertRaises(UnicodeEncodeError, codecs.encode, '\xffff', 'ascii')
|
|
1610
|
+
|
|
1611
|
+
def test_register(self):
|
|
1612
|
+
self.assertRaises(TypeError, codecs.register)
|
|
1613
|
+
self.assertRaises(TypeError, codecs.register, 42)
|
|
1614
|
+
|
|
1615
|
+
def test_lookup(self):
|
|
1616
|
+
self.assertRaises(TypeError, codecs.lookup)
|
|
1617
|
+
self.assertRaises(LookupError, codecs.lookup, "__spam__")
|
|
1618
|
+
self.assertRaises(LookupError, codecs.lookup, " ")
|
|
1619
|
+
|
|
1620
|
+
def test_getencoder(self):
|
|
1621
|
+
self.assertRaises(TypeError, codecs.getencoder)
|
|
1622
|
+
self.assertRaises(LookupError, codecs.getencoder, "__spam__")
|
|
1623
|
+
|
|
1624
|
+
def test_getdecoder(self):
|
|
1625
|
+
self.assertRaises(TypeError, codecs.getdecoder)
|
|
1626
|
+
self.assertRaises(LookupError, codecs.getdecoder, "__spam__")
|
|
1627
|
+
|
|
1628
|
+
def test_getreader(self):
|
|
1629
|
+
self.assertRaises(TypeError, codecs.getreader)
|
|
1630
|
+
self.assertRaises(LookupError, codecs.getreader, "__spam__")
|
|
1631
|
+
|
|
1632
|
+
def test_getwriter(self):
|
|
1633
|
+
self.assertRaises(TypeError, codecs.getwriter)
|
|
1634
|
+
self.assertRaises(LookupError, codecs.getwriter, "__spam__")
|
|
1635
|
+
|
|
1636
|
+
def test_lookup_issue1813(self):
|
|
1637
|
+
# Issue #1813: under Turkish locales, lookup of some codecs failed
|
|
1638
|
+
# because 'I' is lowercased as "ı" (dotless i)
|
|
1639
|
+
oldlocale = locale.setlocale(locale.LC_CTYPE)
|
|
1640
|
+
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
|
|
1641
|
+
try:
|
|
1642
|
+
locale.setlocale(locale.LC_CTYPE, 'tr_TR')
|
|
1643
|
+
except locale.Error:
|
|
1644
|
+
# Unsupported locale on this system
|
|
1645
|
+
self.skipTest('test needs Turkish locale')
|
|
1646
|
+
c = codecs.lookup('ASCII')
|
|
1647
|
+
self.assertEqual(c.name, 'ascii')
|
|
1648
|
+
|
|
1649
|
+
class StreamReaderTest(unittest.TestCase):
|
|
1650
|
+
|
|
1651
|
+
def setUp(self):
|
|
1652
|
+
self.reader = codecs.getreader('utf-8')
|
|
1653
|
+
self.stream = io.BytesIO(b'\xed\x95\x9c\n\xea\xb8\x80')
|
|
1654
|
+
|
|
1655
|
+
def test_readlines(self):
|
|
1656
|
+
f = self.reader(self.stream)
|
|
1657
|
+
self.assertEqual(f.readlines(), ['\ud55c\n', '\uae00'])
|
|
1658
|
+
|
|
1659
|
+
class EncodedFileTest(unittest.TestCase):
|
|
1660
|
+
|
|
1661
|
+
def test_basic(self):
|
|
1662
|
+
f = io.BytesIO(b'\xed\x95\x9c\n\xea\xb8\x80')
|
|
1663
|
+
ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
|
|
1664
|
+
self.assertEqual(ef.read(), b'\\\xd5\n\x00\x00\xae')
|
|
1665
|
+
|
|
1666
|
+
f = io.BytesIO()
|
|
1667
|
+
ef = codecs.EncodedFile(f, 'utf-8', 'latin-1')
|
|
1668
|
+
ef.write(b'\xc3\xbc')
|
|
1669
|
+
self.assertEqual(f.getvalue(), b'\xfc')
|
|
1670
|
+
|
|
1671
|
+
all_unicode_encodings = [
|
|
1672
|
+
"ascii",
|
|
1673
|
+
"big5",
|
|
1674
|
+
"big5hkscs",
|
|
1675
|
+
"charmap",
|
|
1676
|
+
"cp037",
|
|
1677
|
+
"cp1006",
|
|
1678
|
+
"cp1026",
|
|
1679
|
+
"cp1125",
|
|
1680
|
+
"cp1140",
|
|
1681
|
+
"cp1250",
|
|
1682
|
+
"cp1251",
|
|
1683
|
+
"cp1252",
|
|
1684
|
+
"cp1253",
|
|
1685
|
+
"cp1254",
|
|
1686
|
+
"cp1255",
|
|
1687
|
+
"cp1256",
|
|
1688
|
+
"cp1257",
|
|
1689
|
+
"cp1258",
|
|
1690
|
+
"cp424",
|
|
1691
|
+
"cp437",
|
|
1692
|
+
"cp500",
|
|
1693
|
+
"cp720",
|
|
1694
|
+
"cp737",
|
|
1695
|
+
"cp775",
|
|
1696
|
+
"cp850",
|
|
1697
|
+
"cp852",
|
|
1698
|
+
"cp855",
|
|
1699
|
+
"cp856",
|
|
1700
|
+
"cp857",
|
|
1701
|
+
"cp858",
|
|
1702
|
+
"cp860",
|
|
1703
|
+
"cp861",
|
|
1704
|
+
"cp862",
|
|
1705
|
+
"cp863",
|
|
1706
|
+
"cp864",
|
|
1707
|
+
"cp865",
|
|
1708
|
+
"cp866",
|
|
1709
|
+
"cp869",
|
|
1710
|
+
"cp874",
|
|
1711
|
+
"cp875",
|
|
1712
|
+
"cp932",
|
|
1713
|
+
"cp949",
|
|
1714
|
+
"cp950",
|
|
1715
|
+
"euc_jis_2004",
|
|
1716
|
+
"euc_jisx0213",
|
|
1717
|
+
"euc_jp",
|
|
1718
|
+
"euc_kr",
|
|
1719
|
+
"gb18030",
|
|
1720
|
+
"gb2312",
|
|
1721
|
+
"gbk",
|
|
1722
|
+
"hp_roman8",
|
|
1723
|
+
"hz",
|
|
1724
|
+
"idna",
|
|
1725
|
+
"iso2022_jp",
|
|
1726
|
+
"iso2022_jp_1",
|
|
1727
|
+
"iso2022_jp_2",
|
|
1728
|
+
"iso2022_jp_2004",
|
|
1729
|
+
"iso2022_jp_3",
|
|
1730
|
+
"iso2022_jp_ext",
|
|
1731
|
+
"iso2022_kr",
|
|
1732
|
+
"iso8859_1",
|
|
1733
|
+
"iso8859_10",
|
|
1734
|
+
"iso8859_11",
|
|
1735
|
+
"iso8859_13",
|
|
1736
|
+
"iso8859_14",
|
|
1737
|
+
"iso8859_15",
|
|
1738
|
+
"iso8859_16",
|
|
1739
|
+
"iso8859_2",
|
|
1740
|
+
"iso8859_3",
|
|
1741
|
+
"iso8859_4",
|
|
1742
|
+
"iso8859_5",
|
|
1743
|
+
"iso8859_6",
|
|
1744
|
+
"iso8859_7",
|
|
1745
|
+
"iso8859_8",
|
|
1746
|
+
"iso8859_9",
|
|
1747
|
+
"johab",
|
|
1748
|
+
"koi8_r",
|
|
1749
|
+
"koi8_u",
|
|
1750
|
+
"latin_1",
|
|
1751
|
+
"mac_cyrillic",
|
|
1752
|
+
"mac_greek",
|
|
1753
|
+
"mac_iceland",
|
|
1754
|
+
"mac_latin2",
|
|
1755
|
+
"mac_roman",
|
|
1756
|
+
"mac_turkish",
|
|
1757
|
+
"palmos",
|
|
1758
|
+
"ptcp154",
|
|
1759
|
+
"punycode",
|
|
1760
|
+
"raw_unicode_escape",
|
|
1761
|
+
"shift_jis",
|
|
1762
|
+
"shift_jis_2004",
|
|
1763
|
+
"shift_jisx0213",
|
|
1764
|
+
"tis_620",
|
|
1765
|
+
"unicode_escape",
|
|
1766
|
+
"unicode_internal",
|
|
1767
|
+
"utf_16",
|
|
1768
|
+
"utf_16_be",
|
|
1769
|
+
"utf_16_le",
|
|
1770
|
+
"utf_7",
|
|
1771
|
+
"utf_8",
|
|
1772
|
+
]
|
|
1773
|
+
|
|
1774
|
+
if hasattr(codecs, "mbcs_encode"):
|
|
1775
|
+
all_unicode_encodings.append("mbcs")
|
|
1776
|
+
|
|
1777
|
+
# The following encoding is not tested, because it's not supposed
|
|
1778
|
+
# to work:
|
|
1779
|
+
# "undefined"
|
|
1780
|
+
|
|
1781
|
+
# The following encodings don't work in stateful mode
|
|
1782
|
+
broken_unicode_with_streams = [
|
|
1783
|
+
"punycode",
|
|
1784
|
+
"unicode_internal"
|
|
1785
|
+
]
|
|
1786
|
+
broken_incremental_coders = broken_unicode_with_streams + [
|
|
1787
|
+
"idna",
|
|
1788
|
+
]
|
|
1789
|
+
|
|
1790
|
+
class BasicUnicodeTest(unittest.TestCase, MixInCheckStateHandling):
|
|
1791
|
+
def test_basics(self):
|
|
1792
|
+
s = "abc123" # all codecs should be able to encode these
|
|
1793
|
+
for encoding in all_unicode_encodings:
|
|
1794
|
+
name = codecs.lookup(encoding).name
|
|
1795
|
+
if encoding.endswith("_codec"):
|
|
1796
|
+
name += "_codec"
|
|
1797
|
+
elif encoding == "latin_1":
|
|
1798
|
+
name = "latin_1"
|
|
1799
|
+
self.assertEqual(encoding.replace("_", "-"), name.replace("_", "-"))
|
|
1800
|
+
|
|
1801
|
+
with support.check_warnings():
|
|
1802
|
+
# unicode-internal has been deprecated
|
|
1803
|
+
(b, size) = codecs.getencoder(encoding)(s)
|
|
1804
|
+
self.assertEqual(size, len(s), "encoding=%r" % encoding)
|
|
1805
|
+
(chars, size) = codecs.getdecoder(encoding)(b)
|
|
1806
|
+
self.assertEqual(chars, s, "encoding=%r" % encoding)
|
|
1807
|
+
|
|
1808
|
+
if encoding not in broken_unicode_with_streams:
|
|
1809
|
+
# check stream reader/writer
|
|
1810
|
+
q = Queue(b"")
|
|
1811
|
+
writer = codecs.getwriter(encoding)(q)
|
|
1812
|
+
encodedresult = b""
|
|
1813
|
+
for c in s:
|
|
1814
|
+
writer.write(c)
|
|
1815
|
+
chunk = q.read()
|
|
1816
|
+
self.assertTrue(type(chunk) is bytes, type(chunk))
|
|
1817
|
+
encodedresult += chunk
|
|
1818
|
+
q = Queue(b"")
|
|
1819
|
+
reader = codecs.getreader(encoding)(q)
|
|
1820
|
+
decodedresult = ""
|
|
1821
|
+
for c in encodedresult:
|
|
1822
|
+
q.write(bytes([c]))
|
|
1823
|
+
decodedresult += reader.read()
|
|
1824
|
+
self.assertEqual(decodedresult, s, "encoding=%r" % encoding)
|
|
1825
|
+
|
|
1826
|
+
if encoding not in broken_incremental_coders:
|
|
1827
|
+
# check incremental decoder/encoder and iterencode()/iterdecode()
|
|
1828
|
+
try:
|
|
1829
|
+
encoder = codecs.getincrementalencoder(encoding)()
|
|
1830
|
+
except LookupError: # no IncrementalEncoder
|
|
1831
|
+
pass
|
|
1832
|
+
else:
|
|
1833
|
+
# check incremental decoder/encoder
|
|
1834
|
+
encodedresult = b""
|
|
1835
|
+
for c in s:
|
|
1836
|
+
encodedresult += encoder.encode(c)
|
|
1837
|
+
encodedresult += encoder.encode("", True)
|
|
1838
|
+
decoder = codecs.getincrementaldecoder(encoding)()
|
|
1839
|
+
decodedresult = ""
|
|
1840
|
+
for c in encodedresult:
|
|
1841
|
+
decodedresult += decoder.decode(bytes([c]))
|
|
1842
|
+
decodedresult += decoder.decode(b"", True)
|
|
1843
|
+
self.assertEqual(decodedresult, s,
|
|
1844
|
+
"encoding=%r" % encoding)
|
|
1845
|
+
|
|
1846
|
+
# check iterencode()/iterdecode()
|
|
1847
|
+
result = "".join(codecs.iterdecode(
|
|
1848
|
+
codecs.iterencode(s, encoding), encoding))
|
|
1849
|
+
self.assertEqual(result, s, "encoding=%r" % encoding)
|
|
1850
|
+
|
|
1851
|
+
# check iterencode()/iterdecode() with empty string
|
|
1852
|
+
result = "".join(codecs.iterdecode(
|
|
1853
|
+
codecs.iterencode("", encoding), encoding))
|
|
1854
|
+
self.assertEqual(result, "")
|
|
1855
|
+
|
|
1856
|
+
if encoding not in ("idna", "mbcs"):
|
|
1857
|
+
# check incremental decoder/encoder with errors argument
|
|
1858
|
+
try:
|
|
1859
|
+
encoder = codecs.getincrementalencoder(encoding)("ignore")
|
|
1860
|
+
except LookupError: # no IncrementalEncoder
|
|
1861
|
+
pass
|
|
1862
|
+
else:
|
|
1863
|
+
encodedresult = b"".join(encoder.encode(c) for c in s)
|
|
1864
|
+
decoder = codecs.getincrementaldecoder(encoding)("ignore")
|
|
1865
|
+
decodedresult = "".join(decoder.decode(bytes([c]))
|
|
1866
|
+
for c in encodedresult)
|
|
1867
|
+
self.assertEqual(decodedresult, s,
|
|
1868
|
+
"encoding=%r" % encoding)
|
|
1869
|
+
|
|
1870
|
+
@support.cpython_only
|
|
1871
|
+
def test_basics_capi(self):
|
|
1872
|
+
from _testcapi import codec_incrementalencoder, codec_incrementaldecoder
|
|
1873
|
+
s = "abc123" # all codecs should be able to encode these
|
|
1874
|
+
for encoding in all_unicode_encodings:
|
|
1875
|
+
if encoding not in broken_incremental_coders:
|
|
1876
|
+
# check incremental decoder/encoder (fetched via the C API)
|
|
1877
|
+
try:
|
|
1878
|
+
cencoder = codec_incrementalencoder(encoding)
|
|
1879
|
+
except LookupError: # no IncrementalEncoder
|
|
1880
|
+
pass
|
|
1881
|
+
else:
|
|
1882
|
+
# check C API
|
|
1883
|
+
encodedresult = b""
|
|
1884
|
+
for c in s:
|
|
1885
|
+
encodedresult += cencoder.encode(c)
|
|
1886
|
+
encodedresult += cencoder.encode("", True)
|
|
1887
|
+
cdecoder = codec_incrementaldecoder(encoding)
|
|
1888
|
+
decodedresult = ""
|
|
1889
|
+
for c in encodedresult:
|
|
1890
|
+
decodedresult += cdecoder.decode(bytes([c]))
|
|
1891
|
+
decodedresult += cdecoder.decode(b"", True)
|
|
1892
|
+
self.assertEqual(decodedresult, s,
|
|
1893
|
+
"encoding=%r" % encoding)
|
|
1894
|
+
|
|
1895
|
+
if encoding not in ("idna", "mbcs"):
|
|
1896
|
+
# check incremental decoder/encoder with errors argument
|
|
1897
|
+
try:
|
|
1898
|
+
cencoder = codec_incrementalencoder(encoding, "ignore")
|
|
1899
|
+
except LookupError: # no IncrementalEncoder
|
|
1900
|
+
pass
|
|
1901
|
+
else:
|
|
1902
|
+
encodedresult = b"".join(cencoder.encode(c) for c in s)
|
|
1903
|
+
cdecoder = codec_incrementaldecoder(encoding, "ignore")
|
|
1904
|
+
decodedresult = "".join(cdecoder.decode(bytes([c]))
|
|
1905
|
+
for c in encodedresult)
|
|
1906
|
+
self.assertEqual(decodedresult, s,
|
|
1907
|
+
"encoding=%r" % encoding)
|
|
1908
|
+
|
|
1909
|
+
def test_seek(self):
|
|
1910
|
+
# all codecs should be able to encode these
|
|
1911
|
+
s = "%s\n%s\n" % (100*"abc123", 100*"def456")
|
|
1912
|
+
for encoding in all_unicode_encodings:
|
|
1913
|
+
if encoding == "idna": # FIXME: See SF bug #1163178
|
|
1914
|
+
continue
|
|
1915
|
+
if encoding in broken_unicode_with_streams:
|
|
1916
|
+
continue
|
|
1917
|
+
reader = codecs.getreader(encoding)(io.BytesIO(s.encode(encoding)))
|
|
1918
|
+
for t in range(5):
|
|
1919
|
+
# Test that calling seek resets the internal codec state and buffers
|
|
1920
|
+
reader.seek(0, 0)
|
|
1921
|
+
data = reader.read()
|
|
1922
|
+
self.assertEqual(s, data)
|
|
1923
|
+
|
|
1924
|
+
def test_bad_decode_args(self):
|
|
1925
|
+
for encoding in all_unicode_encodings:
|
|
1926
|
+
decoder = codecs.getdecoder(encoding)
|
|
1927
|
+
self.assertRaises(TypeError, decoder)
|
|
1928
|
+
if encoding not in ("idna", "punycode"):
|
|
1929
|
+
self.assertRaises(TypeError, decoder, 42)
|
|
1930
|
+
|
|
1931
|
+
def test_bad_encode_args(self):
|
|
1932
|
+
for encoding in all_unicode_encodings:
|
|
1933
|
+
encoder = codecs.getencoder(encoding)
|
|
1934
|
+
with support.check_warnings():
|
|
1935
|
+
# unicode-internal has been deprecated
|
|
1936
|
+
self.assertRaises(TypeError, encoder)
|
|
1937
|
+
|
|
1938
|
+
def test_encoding_map_type_initialized(self):
|
|
1939
|
+
from encodings import cp1140
|
|
1940
|
+
# This used to crash, we are only verifying there's no crash.
|
|
1941
|
+
table_type = type(cp1140.encoding_table)
|
|
1942
|
+
self.assertEqual(table_type, table_type)
|
|
1943
|
+
|
|
1944
|
+
def test_decoder_state(self):
|
|
1945
|
+
# Check that getstate() and setstate() handle the state properly
|
|
1946
|
+
u = "abc123"
|
|
1947
|
+
for encoding in all_unicode_encodings:
|
|
1948
|
+
if encoding not in broken_incremental_coders:
|
|
1949
|
+
self.check_state_handling_decode(encoding, u, u.encode(encoding))
|
|
1950
|
+
self.check_state_handling_encode(encoding, u, u.encode(encoding))
|
|
1951
|
+
|
|
1952
|
+
class CharmapTest(unittest.TestCase):
|
|
1953
|
+
def test_decode_with_string_map(self):
|
|
1954
|
+
self.assertEqual(
|
|
1955
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict", "abc"),
|
|
1956
|
+
("abc", 3)
|
|
1957
|
+
)
|
|
1958
|
+
|
|
1959
|
+
self.assertEqual(
|
|
1960
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict", "\U0010FFFFbc"),
|
|
1961
|
+
("\U0010FFFFbc", 3)
|
|
1962
|
+
)
|
|
1963
|
+
|
|
1964
|
+
self.assertRaises(UnicodeDecodeError,
|
|
1965
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab"
|
|
1966
|
+
)
|
|
1967
|
+
|
|
1968
|
+
self.assertRaises(UnicodeDecodeError,
|
|
1969
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab\ufffe"
|
|
1970
|
+
)
|
|
1971
|
+
|
|
1972
|
+
self.assertEqual(
|
|
1973
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace", "ab"),
|
|
1974
|
+
("ab\ufffd", 3)
|
|
1975
|
+
)
|
|
1976
|
+
|
|
1977
|
+
self.assertEqual(
|
|
1978
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace", "ab\ufffe"),
|
|
1979
|
+
("ab\ufffd", 3)
|
|
1980
|
+
)
|
|
1981
|
+
|
|
1982
|
+
self.assertEqual(
|
|
1983
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore", "ab"),
|
|
1984
|
+
("ab", 3)
|
|
1985
|
+
)
|
|
1986
|
+
|
|
1987
|
+
self.assertEqual(
|
|
1988
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore", "ab\ufffe"),
|
|
1989
|
+
("ab", 3)
|
|
1990
|
+
)
|
|
1991
|
+
|
|
1992
|
+
allbytes = bytes(range(256))
|
|
1993
|
+
self.assertEqual(
|
|
1994
|
+
codecs.charmap_decode(allbytes, "ignore", ""),
|
|
1995
|
+
("", len(allbytes))
|
|
1996
|
+
)
|
|
1997
|
+
|
|
1998
|
+
def test_decode_with_int2str_map(self):
|
|
1999
|
+
self.assertEqual(
|
|
2000
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2001
|
+
{0: 'a', 1: 'b', 2: 'c'}),
|
|
2002
|
+
("abc", 3)
|
|
2003
|
+
)
|
|
2004
|
+
|
|
2005
|
+
self.assertEqual(
|
|
2006
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2007
|
+
{0: 'Aa', 1: 'Bb', 2: 'Cc'}),
|
|
2008
|
+
("AaBbCc", 3)
|
|
2009
|
+
)
|
|
2010
|
+
|
|
2011
|
+
self.assertEqual(
|
|
2012
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2013
|
+
{0: '\U0010FFFF', 1: 'b', 2: 'c'}),
|
|
2014
|
+
("\U0010FFFFbc", 3)
|
|
2015
|
+
)
|
|
2016
|
+
|
|
2017
|
+
self.assertEqual(
|
|
2018
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2019
|
+
{0: 'a', 1: 'b', 2: ''}),
|
|
2020
|
+
("ab", 3)
|
|
2021
|
+
)
|
|
2022
|
+
|
|
2023
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2024
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2025
|
+
{0: 'a', 1: 'b'}
|
|
2026
|
+
)
|
|
2027
|
+
|
|
2028
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2029
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2030
|
+
{0: 'a', 1: 'b', 2: None}
|
|
2031
|
+
)
|
|
2032
|
+
|
|
2033
|
+
# Issue #14850
|
|
2034
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2035
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2036
|
+
{0: 'a', 1: 'b', 2: '\ufffe'}
|
|
2037
|
+
)
|
|
2038
|
+
|
|
2039
|
+
self.assertEqual(
|
|
2040
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2041
|
+
{0: 'a', 1: 'b'}),
|
|
2042
|
+
("ab\ufffd", 3)
|
|
2043
|
+
)
|
|
2044
|
+
|
|
2045
|
+
self.assertEqual(
|
|
2046
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2047
|
+
{0: 'a', 1: 'b', 2: None}),
|
|
2048
|
+
("ab\ufffd", 3)
|
|
2049
|
+
)
|
|
2050
|
+
|
|
2051
|
+
# Issue #14850
|
|
2052
|
+
self.assertEqual(
|
|
2053
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2054
|
+
{0: 'a', 1: 'b', 2: '\ufffe'}),
|
|
2055
|
+
("ab\ufffd", 3)
|
|
2056
|
+
)
|
|
2057
|
+
|
|
2058
|
+
self.assertEqual(
|
|
2059
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2060
|
+
{0: 'a', 1: 'b'}),
|
|
2061
|
+
("ab", 3)
|
|
2062
|
+
)
|
|
2063
|
+
|
|
2064
|
+
self.assertEqual(
|
|
2065
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2066
|
+
{0: 'a', 1: 'b', 2: None}),
|
|
2067
|
+
("ab", 3)
|
|
2068
|
+
)
|
|
2069
|
+
|
|
2070
|
+
# Issue #14850
|
|
2071
|
+
self.assertEqual(
|
|
2072
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2073
|
+
{0: 'a', 1: 'b', 2: '\ufffe'}),
|
|
2074
|
+
("ab", 3)
|
|
2075
|
+
)
|
|
2076
|
+
|
|
2077
|
+
allbytes = bytes(range(256))
|
|
2078
|
+
self.assertEqual(
|
|
2079
|
+
codecs.charmap_decode(allbytes, "ignore", {}),
|
|
2080
|
+
("", len(allbytes))
|
|
2081
|
+
)
|
|
2082
|
+
|
|
2083
|
+
def test_decode_with_int2int_map(self):
|
|
2084
|
+
a = ord('a')
|
|
2085
|
+
b = ord('b')
|
|
2086
|
+
c = ord('c')
|
|
2087
|
+
|
|
2088
|
+
self.assertEqual(
|
|
2089
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2090
|
+
{0: a, 1: b, 2: c}),
|
|
2091
|
+
("abc", 3)
|
|
2092
|
+
)
|
|
2093
|
+
|
|
2094
|
+
# Issue #15379
|
|
2095
|
+
self.assertEqual(
|
|
2096
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2097
|
+
{0: 0x10FFFF, 1: b, 2: c}),
|
|
2098
|
+
("\U0010FFFFbc", 3)
|
|
2099
|
+
)
|
|
2100
|
+
|
|
2101
|
+
self.assertEqual(
|
|
2102
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2103
|
+
{0: sys.maxunicode, 1: b, 2: c}),
|
|
2104
|
+
(chr(sys.maxunicode) + "bc", 3)
|
|
2105
|
+
)
|
|
2106
|
+
|
|
2107
|
+
self.assertRaises(TypeError,
|
|
2108
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2109
|
+
{0: sys.maxunicode + 1, 1: b, 2: c}
|
|
2110
|
+
)
|
|
2111
|
+
|
|
2112
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2113
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2114
|
+
{0: a, 1: b},
|
|
2115
|
+
)
|
|
2116
|
+
|
|
2117
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2118
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2119
|
+
{0: a, 1: b, 2: 0xFFFE},
|
|
2120
|
+
)
|
|
2121
|
+
|
|
2122
|
+
self.assertEqual(
|
|
2123
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2124
|
+
{0: a, 1: b}),
|
|
2125
|
+
("ab\ufffd", 3)
|
|
2126
|
+
)
|
|
2127
|
+
|
|
2128
|
+
self.assertEqual(
|
|
2129
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2130
|
+
{0: a, 1: b, 2: 0xFFFE}),
|
|
2131
|
+
("ab\ufffd", 3)
|
|
2132
|
+
)
|
|
2133
|
+
|
|
2134
|
+
self.assertEqual(
|
|
2135
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2136
|
+
{0: a, 1: b}),
|
|
2137
|
+
("ab", 3)
|
|
2138
|
+
)
|
|
2139
|
+
|
|
2140
|
+
self.assertEqual(
|
|
2141
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2142
|
+
{0: a, 1: b, 2: 0xFFFE}),
|
|
2143
|
+
("ab", 3)
|
|
2144
|
+
)
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
class WithStmtTest(unittest.TestCase):
|
|
2148
|
+
def test_encodedfile(self):
|
|
2149
|
+
f = io.BytesIO(b"\xc3\xbc")
|
|
2150
|
+
with codecs.EncodedFile(f, "latin-1", "utf-8") as ef:
|
|
2151
|
+
self.assertEqual(ef.read(), b"\xfc")
|
|
2152
|
+
|
|
2153
|
+
def test_streamreaderwriter(self):
|
|
2154
|
+
f = io.BytesIO(b"\xc3\xbc")
|
|
2155
|
+
info = codecs.lookup("utf-8")
|
|
2156
|
+
with codecs.StreamReaderWriter(f, info.streamreader,
|
|
2157
|
+
info.streamwriter, 'strict') as srw:
|
|
2158
|
+
self.assertEqual(srw.read(), "\xfc")
|
|
2159
|
+
|
|
2160
|
+
class TypesTest(unittest.TestCase):
|
|
2161
|
+
def test_decode_unicode(self):
|
|
2162
|
+
# Most decoders don't accept unicode input
|
|
2163
|
+
decoders = [
|
|
2164
|
+
codecs.utf_7_decode,
|
|
2165
|
+
codecs.utf_8_decode,
|
|
2166
|
+
codecs.utf_16_le_decode,
|
|
2167
|
+
codecs.utf_16_be_decode,
|
|
2168
|
+
codecs.utf_16_ex_decode,
|
|
2169
|
+
codecs.utf_32_decode,
|
|
2170
|
+
codecs.utf_32_le_decode,
|
|
2171
|
+
codecs.utf_32_be_decode,
|
|
2172
|
+
codecs.utf_32_ex_decode,
|
|
2173
|
+
codecs.latin_1_decode,
|
|
2174
|
+
codecs.ascii_decode,
|
|
2175
|
+
codecs.charmap_decode,
|
|
2176
|
+
]
|
|
2177
|
+
if hasattr(codecs, "mbcs_decode"):
|
|
2178
|
+
decoders.append(codecs.mbcs_decode)
|
|
2179
|
+
for decoder in decoders:
|
|
2180
|
+
self.assertRaises(TypeError, decoder, "xxx")
|
|
2181
|
+
|
|
2182
|
+
def test_unicode_escape(self):
|
|
2183
|
+
# Escape-decoding an unicode string is supported ang gives the same
|
|
2184
|
+
# result as decoding the equivalent ASCII bytes string.
|
|
2185
|
+
self.assertEqual(codecs.unicode_escape_decode(r"\u1234"), ("\u1234", 6))
|
|
2186
|
+
self.assertEqual(codecs.unicode_escape_decode(br"\u1234"), ("\u1234", 6))
|
|
2187
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(r"\u1234"), ("\u1234", 6))
|
|
2188
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(br"\u1234"), ("\u1234", 6))
|
|
2189
|
+
|
|
2190
|
+
self.assertRaises(UnicodeDecodeError, codecs.unicode_escape_decode, br"\U00110000")
|
|
2191
|
+
self.assertEqual(codecs.unicode_escape_decode(r"\U00110000", "replace"), ("\ufffd", 10))
|
|
2192
|
+
|
|
2193
|
+
self.assertRaises(UnicodeDecodeError, codecs.raw_unicode_escape_decode, br"\U00110000")
|
|
2194
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(r"\U00110000", "replace"), ("\ufffd", 10))
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
class UnicodeEscapeTest(unittest.TestCase):
|
|
2198
|
+
def test_empty(self):
|
|
2199
|
+
self.assertEqual(codecs.unicode_escape_encode(""), (b"", 0))
|
|
2200
|
+
self.assertEqual(codecs.unicode_escape_decode(b""), ("", 0))
|
|
2201
|
+
|
|
2202
|
+
def test_raw_encode(self):
|
|
2203
|
+
encode = codecs.unicode_escape_encode
|
|
2204
|
+
for b in range(32, 127):
|
|
2205
|
+
if b != b'\\'[0]:
|
|
2206
|
+
self.assertEqual(encode(chr(b)), (bytes([b]), 1))
|
|
2207
|
+
|
|
2208
|
+
def test_raw_decode(self):
|
|
2209
|
+
decode = codecs.unicode_escape_decode
|
|
2210
|
+
for b in range(256):
|
|
2211
|
+
if b != b'\\'[0]:
|
|
2212
|
+
self.assertEqual(decode(bytes([b]) + b'0'), (chr(b) + '0', 2))
|
|
2213
|
+
|
|
2214
|
+
def test_escape_encode(self):
|
|
2215
|
+
encode = codecs.unicode_escape_encode
|
|
2216
|
+
check = coding_checker(self, encode)
|
|
2217
|
+
check('\t', br'\t')
|
|
2218
|
+
check('\n', br'\n')
|
|
2219
|
+
check('\r', br'\r')
|
|
2220
|
+
check('\\', br'\\')
|
|
2221
|
+
for b in range(32):
|
|
2222
|
+
if chr(b) not in '\t\n\r':
|
|
2223
|
+
check(chr(b), ('\\x%02x' % b).encode())
|
|
2224
|
+
for b in range(127, 256):
|
|
2225
|
+
check(chr(b), ('\\x%02x' % b).encode())
|
|
2226
|
+
check('\u20ac', br'\u20ac')
|
|
2227
|
+
check('\U0001d120', br'\U0001d120')
|
|
2228
|
+
|
|
2229
|
+
def test_escape_decode(self):
|
|
2230
|
+
decode = codecs.unicode_escape_decode
|
|
2231
|
+
check = coding_checker(self, decode)
|
|
2232
|
+
check(b"[\\\n]", "[]")
|
|
2233
|
+
check(br'[\"]', '["]')
|
|
2234
|
+
check(br"[\']", "[']")
|
|
2235
|
+
check(br"[\\]", r"[\]")
|
|
2236
|
+
check(br"[\a]", "[\x07]")
|
|
2237
|
+
check(br"[\b]", "[\x08]")
|
|
2238
|
+
check(br"[\t]", "[\x09]")
|
|
2239
|
+
check(br"[\n]", "[\x0a]")
|
|
2240
|
+
check(br"[\v]", "[\x0b]")
|
|
2241
|
+
check(br"[\f]", "[\x0c]")
|
|
2242
|
+
check(br"[\r]", "[\x0d]")
|
|
2243
|
+
check(br"[\7]", "[\x07]")
|
|
2244
|
+
check(br"[\8]", r"[\8]")
|
|
2245
|
+
check(br"[\78]", "[\x078]")
|
|
2246
|
+
check(br"[\41]", "[!]")
|
|
2247
|
+
check(br"[\418]", "[!8]")
|
|
2248
|
+
check(br"[\101]", "[A]")
|
|
2249
|
+
check(br"[\1010]", "[A0]")
|
|
2250
|
+
check(br"[\x41]", "[A]")
|
|
2251
|
+
check(br"[\x410]", "[A0]")
|
|
2252
|
+
check(br"\u20ac", "\u20ac")
|
|
2253
|
+
check(br"\U0001d120", "\U0001d120")
|
|
2254
|
+
for b in range(256):
|
|
2255
|
+
if b not in b'\n"\'\\abtnvfr01234567xuUN':
|
|
2256
|
+
check(b'\\' + bytes([b]), '\\' + chr(b))
|
|
2257
|
+
|
|
2258
|
+
def test_decode_errors(self):
|
|
2259
|
+
decode = codecs.unicode_escape_decode
|
|
2260
|
+
for c, d in (b'x', 2), (b'u', 4), (b'U', 4):
|
|
2261
|
+
for i in range(d):
|
|
2262
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2263
|
+
b"\\" + c + b"0"*i)
|
|
2264
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2265
|
+
b"[\\" + c + b"0"*i + b"]")
|
|
2266
|
+
data = b"[\\" + c + b"0"*i + b"]\\" + c + b"0"*i
|
|
2267
|
+
self.assertEqual(decode(data, "ignore"), ("[]", len(data)))
|
|
2268
|
+
self.assertEqual(decode(data, "replace"),
|
|
2269
|
+
("[\ufffd]\ufffd", len(data)))
|
|
2270
|
+
self.assertRaises(UnicodeDecodeError, decode, br"\U00110000")
|
|
2271
|
+
self.assertEqual(decode(br"\U00110000", "ignore"), ("", 10))
|
|
2272
|
+
self.assertEqual(decode(br"\U00110000", "replace"), ("\ufffd", 10))
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
class RawUnicodeEscapeTest(unittest.TestCase):
|
|
2276
|
+
def test_empty(self):
|
|
2277
|
+
self.assertEqual(codecs.raw_unicode_escape_encode(""), (b"", 0))
|
|
2278
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(b""), ("", 0))
|
|
2279
|
+
|
|
2280
|
+
def test_raw_encode(self):
|
|
2281
|
+
encode = codecs.raw_unicode_escape_encode
|
|
2282
|
+
for b in range(256):
|
|
2283
|
+
self.assertEqual(encode(chr(b)), (bytes([b]), 1))
|
|
2284
|
+
|
|
2285
|
+
def test_raw_decode(self):
|
|
2286
|
+
decode = codecs.raw_unicode_escape_decode
|
|
2287
|
+
for b in range(256):
|
|
2288
|
+
self.assertEqual(decode(bytes([b]) + b'0'), (chr(b) + '0', 2))
|
|
2289
|
+
|
|
2290
|
+
def test_escape_encode(self):
|
|
2291
|
+
encode = codecs.raw_unicode_escape_encode
|
|
2292
|
+
check = coding_checker(self, encode)
|
|
2293
|
+
for b in range(256):
|
|
2294
|
+
if b not in b'uU':
|
|
2295
|
+
check('\\' + chr(b), b'\\' + bytes([b]))
|
|
2296
|
+
check('\u20ac', br'\u20ac')
|
|
2297
|
+
check('\U0001d120', br'\U0001d120')
|
|
2298
|
+
|
|
2299
|
+
def test_escape_decode(self):
|
|
2300
|
+
decode = codecs.raw_unicode_escape_decode
|
|
2301
|
+
check = coding_checker(self, decode)
|
|
2302
|
+
for b in range(256):
|
|
2303
|
+
if b not in b'uU':
|
|
2304
|
+
check(b'\\' + bytes([b]), '\\' + chr(b))
|
|
2305
|
+
check(br"\u20ac", "\u20ac")
|
|
2306
|
+
check(br"\U0001d120", "\U0001d120")
|
|
2307
|
+
|
|
2308
|
+
def test_decode_errors(self):
|
|
2309
|
+
decode = codecs.raw_unicode_escape_decode
|
|
2310
|
+
for c, d in (b'u', 4), (b'U', 4):
|
|
2311
|
+
for i in range(d):
|
|
2312
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2313
|
+
b"\\" + c + b"0"*i)
|
|
2314
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2315
|
+
b"[\\" + c + b"0"*i + b"]")
|
|
2316
|
+
data = b"[\\" + c + b"0"*i + b"]\\" + c + b"0"*i
|
|
2317
|
+
self.assertEqual(decode(data, "ignore"), ("[]", len(data)))
|
|
2318
|
+
self.assertEqual(decode(data, "replace"),
|
|
2319
|
+
("[\ufffd]\ufffd", len(data)))
|
|
2320
|
+
self.assertRaises(UnicodeDecodeError, decode, br"\U00110000")
|
|
2321
|
+
self.assertEqual(decode(br"\U00110000", "ignore"), ("", 10))
|
|
2322
|
+
self.assertEqual(decode(br"\U00110000", "replace"), ("\ufffd", 10))
|
|
2323
|
+
|
|
2324
|
+
|
|
2325
|
+
class SurrogateEscapeTest(unittest.TestCase):
|
|
2326
|
+
|
|
2327
|
+
def test_utf8(self):
|
|
2328
|
+
# Bad byte
|
|
2329
|
+
self.assertEqual(b"foo\x80bar".decode("utf-8", "surrogateescape"),
|
|
2330
|
+
"foo\udc80bar")
|
|
2331
|
+
self.assertEqual("foo\udc80bar".encode("utf-8", "surrogateescape"),
|
|
2332
|
+
b"foo\x80bar")
|
|
2333
|
+
# bad-utf-8 encoded surrogate
|
|
2334
|
+
self.assertEqual(b"\xed\xb0\x80".decode("utf-8", "surrogateescape"),
|
|
2335
|
+
"\udced\udcb0\udc80")
|
|
2336
|
+
self.assertEqual("\udced\udcb0\udc80".encode("utf-8", "surrogateescape"),
|
|
2337
|
+
b"\xed\xb0\x80")
|
|
2338
|
+
|
|
2339
|
+
def test_ascii(self):
|
|
2340
|
+
# bad byte
|
|
2341
|
+
self.assertEqual(b"foo\x80bar".decode("ascii", "surrogateescape"),
|
|
2342
|
+
"foo\udc80bar")
|
|
2343
|
+
self.assertEqual("foo\udc80bar".encode("ascii", "surrogateescape"),
|
|
2344
|
+
b"foo\x80bar")
|
|
2345
|
+
|
|
2346
|
+
def test_charmap(self):
|
|
2347
|
+
# bad byte: \xa5 is unmapped in iso-8859-3
|
|
2348
|
+
self.assertEqual(b"foo\xa5bar".decode("iso-8859-3", "surrogateescape"),
|
|
2349
|
+
"foo\udca5bar")
|
|
2350
|
+
self.assertEqual("foo\udca5bar".encode("iso-8859-3", "surrogateescape"),
|
|
2351
|
+
b"foo\xa5bar")
|
|
2352
|
+
|
|
2353
|
+
def test_latin1(self):
|
|
2354
|
+
# Issue6373
|
|
2355
|
+
self.assertEqual("\udce4\udceb\udcef\udcf6\udcfc".encode("latin-1", "surrogateescape"),
|
|
2356
|
+
b"\xe4\xeb\xef\xf6\xfc")
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
class BomTest(unittest.TestCase):
|
|
2360
|
+
def test_seek0(self):
|
|
2361
|
+
data = "1234567890"
|
|
2362
|
+
tests = ("utf-16",
|
|
2363
|
+
"utf-16-le",
|
|
2364
|
+
"utf-16-be",
|
|
2365
|
+
"utf-32",
|
|
2366
|
+
"utf-32-le",
|
|
2367
|
+
"utf-32-be")
|
|
2368
|
+
self.addCleanup(support.unlink, support.TESTFN)
|
|
2369
|
+
for encoding in tests:
|
|
2370
|
+
# Check if the BOM is written only once
|
|
2371
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2372
|
+
f.write(data)
|
|
2373
|
+
f.write(data)
|
|
2374
|
+
f.seek(0)
|
|
2375
|
+
self.assertEqual(f.read(), data * 2)
|
|
2376
|
+
f.seek(0)
|
|
2377
|
+
self.assertEqual(f.read(), data * 2)
|
|
2378
|
+
|
|
2379
|
+
# Check that the BOM is written after a seek(0)
|
|
2380
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2381
|
+
f.write(data[0])
|
|
2382
|
+
self.assertNotEqual(f.tell(), 0)
|
|
2383
|
+
f.seek(0)
|
|
2384
|
+
f.write(data)
|
|
2385
|
+
f.seek(0)
|
|
2386
|
+
self.assertEqual(f.read(), data)
|
|
2387
|
+
|
|
2388
|
+
# (StreamWriter) Check that the BOM is written after a seek(0)
|
|
2389
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2390
|
+
f.writer.write(data[0])
|
|
2391
|
+
self.assertNotEqual(f.writer.tell(), 0)
|
|
2392
|
+
f.writer.seek(0)
|
|
2393
|
+
f.writer.write(data)
|
|
2394
|
+
f.seek(0)
|
|
2395
|
+
self.assertEqual(f.read(), data)
|
|
2396
|
+
|
|
2397
|
+
# Check that the BOM is not written after a seek() at a position
|
|
2398
|
+
# different than the start
|
|
2399
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2400
|
+
f.write(data)
|
|
2401
|
+
f.seek(f.tell())
|
|
2402
|
+
f.write(data)
|
|
2403
|
+
f.seek(0)
|
|
2404
|
+
self.assertEqual(f.read(), data * 2)
|
|
2405
|
+
|
|
2406
|
+
# (StreamWriter) Check that the BOM is not written after a seek()
|
|
2407
|
+
# at a position different than the start
|
|
2408
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2409
|
+
f.writer.write(data)
|
|
2410
|
+
f.writer.seek(f.writer.tell())
|
|
2411
|
+
f.writer.write(data)
|
|
2412
|
+
f.seek(0)
|
|
2413
|
+
self.assertEqual(f.read(), data * 2)
|
|
2414
|
+
|
|
2415
|
+
|
|
2416
|
+
bytes_transform_encodings = [
|
|
2417
|
+
"base64_codec",
|
|
2418
|
+
"uu_codec",
|
|
2419
|
+
"quopri_codec",
|
|
2420
|
+
"hex_codec",
|
|
2421
|
+
]
|
|
2422
|
+
|
|
2423
|
+
transform_aliases = {
|
|
2424
|
+
"base64_codec": ["base64", "base_64"],
|
|
2425
|
+
"uu_codec": ["uu"],
|
|
2426
|
+
"quopri_codec": ["quopri", "quoted_printable", "quotedprintable"],
|
|
2427
|
+
"hex_codec": ["hex"],
|
|
2428
|
+
"rot_13": ["rot13"],
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
try:
|
|
2432
|
+
import zlib
|
|
2433
|
+
except ImportError:
|
|
2434
|
+
zlib = None
|
|
2435
|
+
else:
|
|
2436
|
+
bytes_transform_encodings.append("zlib_codec")
|
|
2437
|
+
transform_aliases["zlib_codec"] = ["zip", "zlib"]
|
|
2438
|
+
try:
|
|
2439
|
+
import bz2
|
|
2440
|
+
except ImportError:
|
|
2441
|
+
pass
|
|
2442
|
+
else:
|
|
2443
|
+
bytes_transform_encodings.append("bz2_codec")
|
|
2444
|
+
transform_aliases["bz2_codec"] = ["bz2"]
|
|
2445
|
+
|
|
2446
|
+
class TransformCodecTest(unittest.TestCase):
|
|
2447
|
+
|
|
2448
|
+
def test_basics(self):
|
|
2449
|
+
binput = bytes(range(256))
|
|
2450
|
+
for encoding in bytes_transform_encodings:
|
|
2451
|
+
with self.subTest(encoding=encoding):
|
|
2452
|
+
# generic codecs interface
|
|
2453
|
+
(o, size) = codecs.getencoder(encoding)(binput)
|
|
2454
|
+
self.assertEqual(size, len(binput))
|
|
2455
|
+
(i, size) = codecs.getdecoder(encoding)(o)
|
|
2456
|
+
self.assertEqual(size, len(o))
|
|
2457
|
+
self.assertEqual(i, binput)
|
|
2458
|
+
|
|
2459
|
+
def test_read(self):
|
|
2460
|
+
for encoding in bytes_transform_encodings:
|
|
2461
|
+
with self.subTest(encoding=encoding):
|
|
2462
|
+
sin = codecs.encode(b"\x80", encoding)
|
|
2463
|
+
reader = codecs.getreader(encoding)(io.BytesIO(sin))
|
|
2464
|
+
sout = reader.read()
|
|
2465
|
+
self.assertEqual(sout, b"\x80")
|
|
2466
|
+
|
|
2467
|
+
def test_readline(self):
|
|
2468
|
+
for encoding in bytes_transform_encodings:
|
|
2469
|
+
with self.subTest(encoding=encoding):
|
|
2470
|
+
sin = codecs.encode(b"\x80", encoding)
|
|
2471
|
+
reader = codecs.getreader(encoding)(io.BytesIO(sin))
|
|
2472
|
+
sout = reader.readline()
|
|
2473
|
+
self.assertEqual(sout, b"\x80")
|
|
2474
|
+
|
|
2475
|
+
def test_buffer_api_usage(self):
|
|
2476
|
+
# We check all the transform codecs accept memoryview input
|
|
2477
|
+
# for encoding and decoding
|
|
2478
|
+
# and also that they roundtrip correctly
|
|
2479
|
+
original = b"12345\x80"
|
|
2480
|
+
for encoding in bytes_transform_encodings:
|
|
2481
|
+
with self.subTest(encoding=encoding):
|
|
2482
|
+
data = original
|
|
2483
|
+
view = memoryview(data)
|
|
2484
|
+
data = codecs.encode(data, encoding)
|
|
2485
|
+
view_encoded = codecs.encode(view, encoding)
|
|
2486
|
+
self.assertEqual(view_encoded, data)
|
|
2487
|
+
view = memoryview(data)
|
|
2488
|
+
data = codecs.decode(data, encoding)
|
|
2489
|
+
self.assertEqual(data, original)
|
|
2490
|
+
view_decoded = codecs.decode(view, encoding)
|
|
2491
|
+
self.assertEqual(view_decoded, data)
|
|
2492
|
+
|
|
2493
|
+
def test_text_to_binary_blacklists_binary_transforms(self):
|
|
2494
|
+
# Check binary -> binary codecs give a good error for str input
|
|
2495
|
+
bad_input = "bad input type"
|
|
2496
|
+
for encoding in bytes_transform_encodings:
|
|
2497
|
+
with self.subTest(encoding=encoding):
|
|
2498
|
+
fmt = ( "{!r} is not a text encoding; "
|
|
2499
|
+
"use codecs.encode\(\) to handle arbitrary codecs")
|
|
2500
|
+
msg = fmt.format(encoding)
|
|
2501
|
+
with self.assertRaisesRegex(LookupError, msg) as failure:
|
|
2502
|
+
bad_input.encode(encoding)
|
|
2503
|
+
self.assertIsNone(failure.exception.__cause__)
|
|
2504
|
+
|
|
2505
|
+
def test_text_to_binary_blacklists_text_transforms(self):
|
|
2506
|
+
# Check str.encode gives a good error message for str -> str codecs
|
|
2507
|
+
msg = (r"^'rot_13' is not a text encoding; "
|
|
2508
|
+
"use codecs.encode\(\) to handle arbitrary codecs")
|
|
2509
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2510
|
+
"just an example message".encode("rot_13")
|
|
2511
|
+
|
|
2512
|
+
def test_binary_to_text_blacklists_binary_transforms(self):
|
|
2513
|
+
# Check bytes.decode and bytearray.decode give a good error
|
|
2514
|
+
# message for binary -> binary codecs
|
|
2515
|
+
data = b"encode first to ensure we meet any format restrictions"
|
|
2516
|
+
for encoding in bytes_transform_encodings:
|
|
2517
|
+
with self.subTest(encoding=encoding):
|
|
2518
|
+
encoded_data = codecs.encode(data, encoding)
|
|
2519
|
+
fmt = (r"{!r} is not a text encoding; "
|
|
2520
|
+
"use codecs.decode\(\) to handle arbitrary codecs")
|
|
2521
|
+
msg = fmt.format(encoding)
|
|
2522
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2523
|
+
encoded_data.decode(encoding)
|
|
2524
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2525
|
+
bytearray(encoded_data).decode(encoding)
|
|
2526
|
+
|
|
2527
|
+
def test_binary_to_text_blacklists_text_transforms(self):
|
|
2528
|
+
# Check str -> str codec gives a good error for binary input
|
|
2529
|
+
for bad_input in (b"immutable", bytearray(b"mutable")):
|
|
2530
|
+
with self.subTest(bad_input=bad_input):
|
|
2531
|
+
msg = (r"^'rot_13' is not a text encoding; "
|
|
2532
|
+
"use codecs.decode\(\) to handle arbitrary codecs")
|
|
2533
|
+
with self.assertRaisesRegex(LookupError, msg) as failure:
|
|
2534
|
+
bad_input.decode("rot_13")
|
|
2535
|
+
self.assertIsNone(failure.exception.__cause__)
|
|
2536
|
+
|
|
2537
|
+
@unittest.skipUnless(zlib, "Requires zlib support")
|
|
2538
|
+
def test_custom_zlib_error_is_wrapped(self):
|
|
2539
|
+
# Check zlib codec gives a good error for malformed input
|
|
2540
|
+
msg = "^decoding with 'zlib_codec' codec failed"
|
|
2541
|
+
with self.assertRaisesRegex(Exception, msg) as failure:
|
|
2542
|
+
codecs.decode(b"hello", "zlib_codec")
|
|
2543
|
+
self.assertIsInstance(failure.exception.__cause__,
|
|
2544
|
+
type(failure.exception))
|
|
2545
|
+
|
|
2546
|
+
def test_custom_hex_error_is_wrapped(self):
|
|
2547
|
+
# Check hex codec gives a good error for malformed input
|
|
2548
|
+
msg = "^decoding with 'hex_codec' codec failed"
|
|
2549
|
+
with self.assertRaisesRegex(Exception, msg) as failure:
|
|
2550
|
+
codecs.decode(b"hello", "hex_codec")
|
|
2551
|
+
self.assertIsInstance(failure.exception.__cause__,
|
|
2552
|
+
type(failure.exception))
|
|
2553
|
+
|
|
2554
|
+
# Unfortunately, the bz2 module throws OSError, which the codec
|
|
2555
|
+
# machinery currently can't wrap :(
|
|
2556
|
+
|
|
2557
|
+
# Ensure codec aliases from http://bugs.python.org/issue7475 work
|
|
2558
|
+
def test_aliases(self):
|
|
2559
|
+
for codec_name, aliases in transform_aliases.items():
|
|
2560
|
+
expected_name = codecs.lookup(codec_name).name
|
|
2561
|
+
for alias in aliases:
|
|
2562
|
+
with self.subTest(alias=alias):
|
|
2563
|
+
info = codecs.lookup(alias)
|
|
2564
|
+
self.assertEqual(info.name, expected_name)
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
# The codec system tries to wrap exceptions in order to ensure the error
|
|
2568
|
+
# mentions the operation being performed and the codec involved. We
|
|
2569
|
+
# currently *only* want this to happen for relatively stateless
|
|
2570
|
+
# exceptions, where the only significant information they contain is their
|
|
2571
|
+
# type and a single str argument.
|
|
2572
|
+
|
|
2573
|
+
# Use a local codec registry to avoid appearing to leak objects when
|
|
2574
|
+
# registering multiple seach functions
|
|
2575
|
+
_TEST_CODECS = {}
|
|
2576
|
+
|
|
2577
|
+
def _get_test_codec(codec_name):
|
|
2578
|
+
return _TEST_CODECS.get(codec_name)
|
|
2579
|
+
codecs.register(_get_test_codec) # Returns None, not usable as a decorator
|
|
2580
|
+
|
|
2581
|
+
try:
|
|
2582
|
+
# Issue #22166: Also need to clear the internal cache in CPython
|
|
2583
|
+
from _codecs import _forget_codec
|
|
2584
|
+
except ImportError:
|
|
2585
|
+
def _forget_codec(codec_name):
|
|
2586
|
+
pass
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
class ExceptionChainingTest(unittest.TestCase):
|
|
2590
|
+
|
|
2591
|
+
def setUp(self):
|
|
2592
|
+
# There's no way to unregister a codec search function, so we just
|
|
2593
|
+
# ensure we render this one fairly harmless after the test
|
|
2594
|
+
# case finishes by using the test case repr as the codec name
|
|
2595
|
+
# The codecs module normalizes codec names, although this doesn't
|
|
2596
|
+
# appear to be formally documented...
|
|
2597
|
+
# We also make sure we use a truly unique id for the custom codec
|
|
2598
|
+
# to avoid issues with the codec cache when running these tests
|
|
2599
|
+
# multiple times (e.g. when hunting for refleaks)
|
|
2600
|
+
unique_id = repr(self) + str(id(self))
|
|
2601
|
+
self.codec_name = encodings.normalize_encoding(unique_id).lower()
|
|
2602
|
+
|
|
2603
|
+
# We store the object to raise on the instance because of a bad
|
|
2604
|
+
# interaction between the codec caching (which means we can't
|
|
2605
|
+
# recreate the codec entry) and regrtest refleak hunting (which
|
|
2606
|
+
# runs the same test instance multiple times). This means we
|
|
2607
|
+
# need to ensure the codecs call back in to the instance to find
|
|
2608
|
+
# out which exception to raise rather than binding them in a
|
|
2609
|
+
# closure to an object that may change on the next run
|
|
2610
|
+
self.obj_to_raise = RuntimeError
|
|
2611
|
+
|
|
2612
|
+
def tearDown(self):
|
|
2613
|
+
_TEST_CODECS.pop(self.codec_name, None)
|
|
2614
|
+
# Issue #22166: Also pop from caches to avoid appearance of ref leaks
|
|
2615
|
+
encodings._cache.pop(self.codec_name, None)
|
|
2616
|
+
try:
|
|
2617
|
+
_forget_codec(self.codec_name)
|
|
2618
|
+
except KeyError:
|
|
2619
|
+
pass
|
|
2620
|
+
|
|
2621
|
+
def set_codec(self, encode, decode):
|
|
2622
|
+
codec_info = codecs.CodecInfo(encode, decode,
|
|
2623
|
+
name=self.codec_name)
|
|
2624
|
+
_TEST_CODECS[self.codec_name] = codec_info
|
|
2625
|
+
|
|
2626
|
+
@contextlib.contextmanager
|
|
2627
|
+
def assertWrapped(self, operation, exc_type, msg):
|
|
2628
|
+
full_msg = r"{} with {!r} codec failed \({}: {}\)".format(
|
|
2629
|
+
operation, self.codec_name, exc_type.__name__, msg)
|
|
2630
|
+
with self.assertRaisesRegex(exc_type, full_msg) as caught:
|
|
2631
|
+
yield caught
|
|
2632
|
+
self.assertIsInstance(caught.exception.__cause__, exc_type)
|
|
2633
|
+
self.assertIsNotNone(caught.exception.__cause__.__traceback__)
|
|
2634
|
+
|
|
2635
|
+
def raise_obj(self, *args, **kwds):
|
|
2636
|
+
# Helper to dynamically change the object raised by a test codec
|
|
2637
|
+
raise self.obj_to_raise
|
|
2638
|
+
|
|
2639
|
+
def check_wrapped(self, obj_to_raise, msg, exc_type=RuntimeError):
|
|
2640
|
+
self.obj_to_raise = obj_to_raise
|
|
2641
|
+
self.set_codec(self.raise_obj, self.raise_obj)
|
|
2642
|
+
with self.assertWrapped("encoding", exc_type, msg):
|
|
2643
|
+
"str_input".encode(self.codec_name)
|
|
2644
|
+
with self.assertWrapped("encoding", exc_type, msg):
|
|
2645
|
+
codecs.encode("str_input", self.codec_name)
|
|
2646
|
+
with self.assertWrapped("decoding", exc_type, msg):
|
|
2647
|
+
b"bytes input".decode(self.codec_name)
|
|
2648
|
+
with self.assertWrapped("decoding", exc_type, msg):
|
|
2649
|
+
codecs.decode(b"bytes input", self.codec_name)
|
|
2650
|
+
|
|
2651
|
+
def test_raise_by_type(self):
|
|
2652
|
+
self.check_wrapped(RuntimeError, "")
|
|
2653
|
+
|
|
2654
|
+
def test_raise_by_value(self):
|
|
2655
|
+
msg = "This should be wrapped"
|
|
2656
|
+
self.check_wrapped(RuntimeError(msg), msg)
|
|
2657
|
+
|
|
2658
|
+
def test_raise_grandchild_subclass_exact_size(self):
|
|
2659
|
+
msg = "This should be wrapped"
|
|
2660
|
+
class MyRuntimeError(RuntimeError):
|
|
2661
|
+
__slots__ = ()
|
|
2662
|
+
self.check_wrapped(MyRuntimeError(msg), msg, MyRuntimeError)
|
|
2663
|
+
|
|
2664
|
+
def test_raise_subclass_with_weakref_support(self):
|
|
2665
|
+
msg = "This should be wrapped"
|
|
2666
|
+
class MyRuntimeError(RuntimeError):
|
|
2667
|
+
pass
|
|
2668
|
+
self.check_wrapped(MyRuntimeError(msg), msg, MyRuntimeError)
|
|
2669
|
+
|
|
2670
|
+
def check_not_wrapped(self, obj_to_raise, msg):
|
|
2671
|
+
def raise_obj(*args, **kwds):
|
|
2672
|
+
raise obj_to_raise
|
|
2673
|
+
self.set_codec(raise_obj, raise_obj)
|
|
2674
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2675
|
+
"str input".encode(self.codec_name)
|
|
2676
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2677
|
+
codecs.encode("str input", self.codec_name)
|
|
2678
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2679
|
+
b"bytes input".decode(self.codec_name)
|
|
2680
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2681
|
+
codecs.decode(b"bytes input", self.codec_name)
|
|
2682
|
+
|
|
2683
|
+
def test_init_override_is_not_wrapped(self):
|
|
2684
|
+
class CustomInit(RuntimeError):
|
|
2685
|
+
def __init__(self):
|
|
2686
|
+
pass
|
|
2687
|
+
self.check_not_wrapped(CustomInit, "")
|
|
2688
|
+
|
|
2689
|
+
def test_new_override_is_not_wrapped(self):
|
|
2690
|
+
class CustomNew(RuntimeError):
|
|
2691
|
+
def __new__(cls):
|
|
2692
|
+
return super().__new__(cls)
|
|
2693
|
+
self.check_not_wrapped(CustomNew, "")
|
|
2694
|
+
|
|
2695
|
+
def test_instance_attribute_is_not_wrapped(self):
|
|
2696
|
+
msg = "This should NOT be wrapped"
|
|
2697
|
+
exc = RuntimeError(msg)
|
|
2698
|
+
exc.attr = 1
|
|
2699
|
+
self.check_not_wrapped(exc, "^{}$".format(msg))
|
|
2700
|
+
|
|
2701
|
+
def test_non_str_arg_is_not_wrapped(self):
|
|
2702
|
+
self.check_not_wrapped(RuntimeError(1), "1")
|
|
2703
|
+
|
|
2704
|
+
def test_multiple_args_is_not_wrapped(self):
|
|
2705
|
+
msg_re = r"^\('a', 'b', 'c'\)$"
|
|
2706
|
+
self.check_not_wrapped(RuntimeError('a', 'b', 'c'), msg_re)
|
|
2707
|
+
|
|
2708
|
+
# http://bugs.python.org/issue19609
|
|
2709
|
+
def test_codec_lookup_failure_not_wrapped(self):
|
|
2710
|
+
msg = "^unknown encoding: {}$".format(self.codec_name)
|
|
2711
|
+
# The initial codec lookup should not be wrapped
|
|
2712
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2713
|
+
"str input".encode(self.codec_name)
|
|
2714
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2715
|
+
codecs.encode("str input", self.codec_name)
|
|
2716
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2717
|
+
b"bytes input".decode(self.codec_name)
|
|
2718
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2719
|
+
codecs.decode(b"bytes input", self.codec_name)
|
|
2720
|
+
|
|
2721
|
+
def test_unflagged_non_text_codec_handling(self):
|
|
2722
|
+
# The stdlib non-text codecs are now marked so they're
|
|
2723
|
+
# pre-emptively skipped by the text model related methods
|
|
2724
|
+
# However, third party codecs won't be flagged, so we still make
|
|
2725
|
+
# sure the case where an inappropriate output type is produced is
|
|
2726
|
+
# handled appropriately
|
|
2727
|
+
def encode_to_str(*args, **kwds):
|
|
2728
|
+
return "not bytes!", 0
|
|
2729
|
+
def decode_to_bytes(*args, **kwds):
|
|
2730
|
+
return b"not str!", 0
|
|
2731
|
+
self.set_codec(encode_to_str, decode_to_bytes)
|
|
2732
|
+
# No input or output type checks on the codecs module functions
|
|
2733
|
+
encoded = codecs.encode(None, self.codec_name)
|
|
2734
|
+
self.assertEqual(encoded, "not bytes!")
|
|
2735
|
+
decoded = codecs.decode(None, self.codec_name)
|
|
2736
|
+
self.assertEqual(decoded, b"not str!")
|
|
2737
|
+
# Text model methods should complain
|
|
2738
|
+
fmt = (r"^{!r} encoder returned 'str' instead of 'bytes'; "
|
|
2739
|
+
"use codecs.encode\(\) to encode to arbitrary types$")
|
|
2740
|
+
msg = fmt.format(self.codec_name)
|
|
2741
|
+
with self.assertRaisesRegex(TypeError, msg):
|
|
2742
|
+
"str_input".encode(self.codec_name)
|
|
2743
|
+
fmt = (r"^{!r} decoder returned 'bytes' instead of 'str'; "
|
|
2744
|
+
"use codecs.decode\(\) to decode to arbitrary types$")
|
|
2745
|
+
msg = fmt.format(self.codec_name)
|
|
2746
|
+
with self.assertRaisesRegex(TypeError, msg):
|
|
2747
|
+
b"bytes input".decode(self.codec_name)
|
|
2748
|
+
|
|
2749
|
+
|
|
2750
|
+
|
|
2751
|
+
@unittest.skipUnless(sys.platform == 'win32',
|
|
2752
|
+
'code pages are specific to Windows')
|
|
2753
|
+
class CodePageTest(unittest.TestCase):
|
|
2754
|
+
# CP_UTF8 is already tested by CP65001Test
|
|
2755
|
+
CP_UTF8 = 65001
|
|
2756
|
+
|
|
2757
|
+
def test_invalid_code_page(self):
|
|
2758
|
+
self.assertRaises(ValueError, codecs.code_page_encode, -1, 'a')
|
|
2759
|
+
self.assertRaises(ValueError, codecs.code_page_decode, -1, b'a')
|
|
2760
|
+
self.assertRaises(OSError, codecs.code_page_encode, 123, 'a')
|
|
2761
|
+
self.assertRaises(OSError, codecs.code_page_decode, 123, b'a')
|
|
2762
|
+
|
|
2763
|
+
def test_code_page_name(self):
|
|
2764
|
+
self.assertRaisesRegex(UnicodeEncodeError, 'cp932',
|
|
2765
|
+
codecs.code_page_encode, 932, '\xff')
|
|
2766
|
+
self.assertRaisesRegex(UnicodeDecodeError, 'cp932',
|
|
2767
|
+
codecs.code_page_decode, 932, b'\x81\x00')
|
|
2768
|
+
self.assertRaisesRegex(UnicodeDecodeError, 'CP_UTF8',
|
|
2769
|
+
codecs.code_page_decode, self.CP_UTF8, b'\xff')
|
|
2770
|
+
|
|
2771
|
+
def check_decode(self, cp, tests):
|
|
2772
|
+
for raw, errors, expected in tests:
|
|
2773
|
+
if expected is not None:
|
|
2774
|
+
try:
|
|
2775
|
+
decoded = codecs.code_page_decode(cp, raw, errors)
|
|
2776
|
+
except UnicodeDecodeError as err:
|
|
2777
|
+
self.fail('Unable to decode %a from "cp%s" with '
|
|
2778
|
+
'errors=%r: %s' % (raw, cp, errors, err))
|
|
2779
|
+
self.assertEqual(decoded[0], expected,
|
|
2780
|
+
'%a.decode("cp%s", %r)=%a != %a'
|
|
2781
|
+
% (raw, cp, errors, decoded[0], expected))
|
|
2782
|
+
# assert 0 <= decoded[1] <= len(raw)
|
|
2783
|
+
self.assertGreaterEqual(decoded[1], 0)
|
|
2784
|
+
self.assertLessEqual(decoded[1], len(raw))
|
|
2785
|
+
else:
|
|
2786
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2787
|
+
codecs.code_page_decode, cp, raw, errors)
|
|
2788
|
+
|
|
2789
|
+
def check_encode(self, cp, tests):
|
|
2790
|
+
for text, errors, expected in tests:
|
|
2791
|
+
if expected is not None:
|
|
2792
|
+
try:
|
|
2793
|
+
encoded = codecs.code_page_encode(cp, text, errors)
|
|
2794
|
+
except UnicodeEncodeError as err:
|
|
2795
|
+
self.fail('Unable to encode %a to "cp%s" with '
|
|
2796
|
+
'errors=%r: %s' % (text, cp, errors, err))
|
|
2797
|
+
self.assertEqual(encoded[0], expected,
|
|
2798
|
+
'%a.encode("cp%s", %r)=%a != %a'
|
|
2799
|
+
% (text, cp, errors, encoded[0], expected))
|
|
2800
|
+
self.assertEqual(encoded[1], len(text))
|
|
2801
|
+
else:
|
|
2802
|
+
self.assertRaises(UnicodeEncodeError,
|
|
2803
|
+
codecs.code_page_encode, cp, text, errors)
|
|
2804
|
+
|
|
2805
|
+
def test_cp932(self):
|
|
2806
|
+
self.check_encode(932, (
|
|
2807
|
+
('abc', 'strict', b'abc'),
|
|
2808
|
+
('\uff44\u9a3e', 'strict', b'\x82\x84\xe9\x80'),
|
|
2809
|
+
# test error handlers
|
|
2810
|
+
('\xff', 'strict', None),
|
|
2811
|
+
('[\xff]', 'ignore', b'[]'),
|
|
2812
|
+
('[\xff]', 'replace', b'[y]'),
|
|
2813
|
+
('[\u20ac]', 'replace', b'[?]'),
|
|
2814
|
+
('[\xff]', 'backslashreplace', b'[\\xff]'),
|
|
2815
|
+
('[\xff]', 'xmlcharrefreplace', b'[ÿ]'),
|
|
2816
|
+
))
|
|
2817
|
+
self.check_decode(932, (
|
|
2818
|
+
(b'abc', 'strict', 'abc'),
|
|
2819
|
+
(b'\x82\x84\xe9\x80', 'strict', '\uff44\u9a3e'),
|
|
2820
|
+
# invalid bytes
|
|
2821
|
+
(b'[\xff]', 'strict', None),
|
|
2822
|
+
(b'[\xff]', 'ignore', '[]'),
|
|
2823
|
+
(b'[\xff]', 'replace', '[\ufffd]'),
|
|
2824
|
+
(b'[\xff]', 'surrogateescape', '[\udcff]'),
|
|
2825
|
+
(b'\x81\x00abc', 'strict', None),
|
|
2826
|
+
(b'\x81\x00abc', 'ignore', '\x00abc'),
|
|
2827
|
+
(b'\x81\x00abc', 'replace', '\ufffd\x00abc'),
|
|
2828
|
+
))
|
|
2829
|
+
|
|
2830
|
+
def test_cp1252(self):
|
|
2831
|
+
self.check_encode(1252, (
|
|
2832
|
+
('abc', 'strict', b'abc'),
|
|
2833
|
+
('\xe9\u20ac', 'strict', b'\xe9\x80'),
|
|
2834
|
+
('\xff', 'strict', b'\xff'),
|
|
2835
|
+
('\u0141', 'strict', None),
|
|
2836
|
+
('\u0141', 'ignore', b''),
|
|
2837
|
+
('\u0141', 'replace', b'L'),
|
|
2838
|
+
))
|
|
2839
|
+
self.check_decode(1252, (
|
|
2840
|
+
(b'abc', 'strict', 'abc'),
|
|
2841
|
+
(b'\xe9\x80', 'strict', '\xe9\u20ac'),
|
|
2842
|
+
(b'\xff', 'strict', '\xff'),
|
|
2843
|
+
))
|
|
2844
|
+
|
|
2845
|
+
def test_cp_utf7(self):
|
|
2846
|
+
cp = 65000
|
|
2847
|
+
self.check_encode(cp, (
|
|
2848
|
+
('abc', 'strict', b'abc'),
|
|
2849
|
+
('\xe9\u20ac', 'strict', b'+AOkgrA-'),
|
|
2850
|
+
('\U0010ffff', 'strict', b'+2//f/w-'),
|
|
2851
|
+
('\udc80', 'strict', b'+3IA-'),
|
|
2852
|
+
('\ufffd', 'strict', b'+//0-'),
|
|
2853
|
+
))
|
|
2854
|
+
self.check_decode(cp, (
|
|
2855
|
+
(b'abc', 'strict', 'abc'),
|
|
2856
|
+
(b'+AOkgrA-', 'strict', '\xe9\u20ac'),
|
|
2857
|
+
(b'+2//f/w-', 'strict', '\U0010ffff'),
|
|
2858
|
+
(b'+3IA-', 'strict', '\udc80'),
|
|
2859
|
+
(b'+//0-', 'strict', '\ufffd'),
|
|
2860
|
+
# invalid bytes
|
|
2861
|
+
(b'[+/]', 'strict', '[]'),
|
|
2862
|
+
(b'[\xff]', 'strict', '[\xff]'),
|
|
2863
|
+
))
|
|
2864
|
+
|
|
2865
|
+
def test_multibyte_encoding(self):
|
|
2866
|
+
self.check_decode(932, (
|
|
2867
|
+
(b'\x84\xe9\x80', 'ignore', '\u9a3e'),
|
|
2868
|
+
(b'\x84\xe9\x80', 'replace', '\ufffd\u9a3e'),
|
|
2869
|
+
))
|
|
2870
|
+
self.check_decode(self.CP_UTF8, (
|
|
2871
|
+
(b'\xff\xf4\x8f\xbf\xbf', 'ignore', '\U0010ffff'),
|
|
2872
|
+
(b'\xff\xf4\x8f\xbf\xbf', 'replace', '\ufffd\U0010ffff'),
|
|
2873
|
+
))
|
|
2874
|
+
if VISTA_OR_LATER:
|
|
2875
|
+
self.check_encode(self.CP_UTF8, (
|
|
2876
|
+
('[\U0010ffff\uDC80]', 'ignore', b'[\xf4\x8f\xbf\xbf]'),
|
|
2877
|
+
('[\U0010ffff\uDC80]', 'replace', b'[\xf4\x8f\xbf\xbf?]'),
|
|
2878
|
+
))
|
|
2879
|
+
|
|
2880
|
+
def test_incremental(self):
|
|
2881
|
+
decoded = codecs.code_page_decode(932, b'\x82', 'strict', False)
|
|
2882
|
+
self.assertEqual(decoded, ('', 0))
|
|
2883
|
+
|
|
2884
|
+
decoded = codecs.code_page_decode(932,
|
|
2885
|
+
b'\xe9\x80\xe9', 'strict',
|
|
2886
|
+
False)
|
|
2887
|
+
self.assertEqual(decoded, ('\u9a3e', 2))
|
|
2888
|
+
|
|
2889
|
+
decoded = codecs.code_page_decode(932,
|
|
2890
|
+
b'\xe9\x80\xe9\x80', 'strict',
|
|
2891
|
+
False)
|
|
2892
|
+
self.assertEqual(decoded, ('\u9a3e\u9a3e', 4))
|
|
2893
|
+
|
|
2894
|
+
decoded = codecs.code_page_decode(932,
|
|
2895
|
+
b'abc', 'strict',
|
|
2896
|
+
False)
|
|
2897
|
+
self.assertEqual(decoded, ('abc', 3))
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
if __name__ == "__main__":
|
|
2901
|
+
unittest.main()
|