com.googler.python 1.1.4 → 1.1.5
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 +1 -1
- package/python3.6.2/lib/libcrypto.so.1.0.0 +0 -0
- package/python3.6.2/lib/libformw.so.5 +0 -0
- package/python3.6.2/lib/libformw.so.5.9 +0 -0
- package/python3.6.2/lib/libhistory.so.6 +0 -0
- package/python3.6.2/lib/libhistory.so.6.3 +0 -0
- package/python3.6.2/lib/libmenuw.so.5 +0 -0
- package/python3.6.2/lib/libmenuw.so.5.9 +0 -0
- package/python3.6.2/lib/libncursesw.so.5 +0 -0
- package/python3.6.2/lib/libncursesw.so.5.9 +0 -0
- package/python3.6.2/lib/libpanelw.so.5 +0 -0
- package/python3.6.2/lib/libpanelw.so.5.9 +0 -0
- package/python3.6.2/lib/libpython3.6m.so.1.0 +0 -0
- package/python3.6.2/lib/libpython3.so +0 -0
- package/python3.6.2/lib/libreadline.so.6 +0 -0
- package/python3.6.2/lib/libreadline.so.6.3 +0 -0
- package/python3.6.2/lib/libssl.so.1.0.0 +0 -0
- package/python3.6.2/lib/libtinfow.so.5 +0 -0
- package/python3.6.2/lib/libtinfow.so.5.9 +0 -0
- package/python3.6.2/lib/python3.6/__future__.py +140 -0
- package/python3.6.2/lib/python3.6/__phello__.foo.py +1 -0
- package/python3.6.2/lib/python3.6/_bootlocale.py +34 -0
- package/python3.6.2/lib/python3.6/_collections_abc.py +1008 -0
- package/python3.6.2/lib/python3.6/_compat_pickle.py +251 -0
- package/python3.6.2/lib/python3.6/_compression.py +152 -0
- package/python3.6.2/lib/python3.6/_dummy_thread.py +163 -0
- package/python3.6.2/lib/python3.6/_markupbase.py +395 -0
- package/python3.6.2/lib/python3.6/_osx_support.py +502 -0
- package/python3.6.2/lib/python3.6/_pydecimal.py +6449 -0
- package/python3.6.2/lib/python3.6/_pyio.py +2531 -0
- package/python3.6.2/lib/python3.6/_sitebuiltins.py +103 -0
- package/python3.6.2/lib/python3.6/_strptime.py +576 -0
- package/python3.6.2/lib/python3.6/_threading_local.py +246 -0
- package/python3.6.2/lib/python3.6/_weakrefset.py +196 -0
- package/python3.6.2/lib/python3.6/abc.py +248 -0
- package/python3.6.2/lib/python3.6/aifc.py +943 -0
- package/python3.6.2/lib/python3.6/antigravity.py +17 -0
- package/python3.6.2/lib/python3.6/argparse.py +2389 -0
- package/python3.6.2/lib/python3.6/ast.py +322 -0
- package/python3.6.2/lib/python3.6/asynchat.py +307 -0
- package/python3.6.2/lib/python3.6/asyncio/__init__.py +50 -0
- package/python3.6.2/lib/python3.6/asyncio/base_events.py +1474 -0
- package/python3.6.2/lib/python3.6/asyncio/base_futures.py +71 -0
- package/python3.6.2/lib/python3.6/asyncio/base_subprocess.py +293 -0
- package/python3.6.2/lib/python3.6/asyncio/base_tasks.py +76 -0
- package/python3.6.2/lib/python3.6/asyncio/compat.py +18 -0
- package/python3.6.2/lib/python3.6/asyncio/constants.py +12 -0
- package/python3.6.2/lib/python3.6/asyncio/coroutines.py +346 -0
- package/python3.6.2/lib/python3.6/asyncio/events.py +715 -0
- package/python3.6.2/lib/python3.6/asyncio/futures.py +439 -0
- package/python3.6.2/lib/python3.6/asyncio/locks.py +485 -0
- package/python3.6.2/lib/python3.6/asyncio/log.py +7 -0
- package/python3.6.2/lib/python3.6/asyncio/proactor_events.py +551 -0
- package/python3.6.2/lib/python3.6/asyncio/protocols.py +134 -0
- package/python3.6.2/lib/python3.6/asyncio/queues.py +259 -0
- package/python3.6.2/lib/python3.6/asyncio/selector_events.py +1141 -0
- package/python3.6.2/lib/python3.6/asyncio/sslproto.py +697 -0
- package/python3.6.2/lib/python3.6/asyncio/streams.py +701 -0
- package/python3.6.2/lib/python3.6/asyncio/subprocess.py +226 -0
- package/python3.6.2/lib/python3.6/asyncio/tasks.py +717 -0
- package/python3.6.2/lib/python3.6/asyncio/test_utils.py +519 -0
- package/python3.6.2/lib/python3.6/asyncio/transports.py +306 -0
- package/python3.6.2/lib/python3.6/asyncio/unix_events.py +1074 -0
- package/python3.6.2/lib/python3.6/asyncio/windows_events.py +779 -0
- package/python3.6.2/lib/python3.6/asyncio/windows_utils.py +224 -0
- package/python3.6.2/lib/python3.6/asyncore.py +645 -0
- package/python3.6.2/lib/python3.6/base64.py +602 -0
- package/python3.6.2/lib/python3.6/bdb.py +673 -0
- package/python3.6.2/lib/python3.6/binhex.py +479 -0
- package/python3.6.2/lib/python3.6/bisect.py +92 -0
- package/python3.6.2/lib/python3.6/bz2.py +361 -0
- package/python3.6.2/lib/python3.6/cProfile.py +160 -0
- package/python3.6.2/lib/python3.6/calendar.py +713 -0
- package/python3.6.2/lib/python3.6/cgi.py +1077 -0
- package/python3.6.2/lib/python3.6/cgitb.py +319 -0
- package/python3.6.2/lib/python3.6/chunk.py +169 -0
- package/python3.6.2/lib/python3.6/cmd.py +401 -0
- package/python3.6.2/lib/python3.6/code.py +314 -0
- package/python3.6.2/lib/python3.6/codecs.py +1113 -0
- package/python3.6.2/lib/python3.6/codeop.py +168 -0
- package/python3.6.2/lib/python3.6/collections/__init__.py +1244 -0
- package/python3.6.2/lib/python3.6/collections/abc.py +2 -0
- package/python3.6.2/lib/python3.6/colorsys.py +164 -0
- package/python3.6.2/lib/python3.6/compileall.py +295 -0
- package/python3.6.2/lib/python3.6/concurrent/__init__.py +1 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/__init__.py +18 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/_base.py +612 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/process.py +515 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/thread.py +153 -0
- package/python3.6.2/lib/python3.6/configparser.py +1342 -0
- package/python3.6.2/lib/python3.6/contextlib.py +384 -0
- package/python3.6.2/lib/python3.6/copy.py +313 -0
- package/python3.6.2/lib/python3.6/copyreg.py +206 -0
- package/python3.6.2/lib/python3.6/crypt.py +61 -0
- package/python3.6.2/lib/python3.6/csv.py +449 -0
- package/python3.6.2/lib/python3.6/ctypes/__init__.py +538 -0
- package/python3.6.2/lib/python3.6/ctypes/_endian.py +61 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/__init__.py +9 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/dyld.py +159 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/dylib.py +63 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/framework.py +65 -0
- package/python3.6.2/lib/python3.6/ctypes/test/__init__.py +14 -0
- package/python3.6.2/lib/python3.6/ctypes/test/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_anon.py +73 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_array_in_pointer.py +64 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_arrays.py +185 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_as_parameter.py +226 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_bitfields.py +290 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_buffers.py +64 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_bytes.py +65 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_byteswap.py +315 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_callbacks.py +293 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_cast.py +86 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_cfuncs.py +212 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_checkretval.py +36 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_delattr.py +21 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_errno.py +79 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_find.py +116 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_frombuffer.py +141 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_funcptr.py +132 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_functions.py +402 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_incomplete.py +42 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_init.py +40 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_internals.py +100 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_keeprefs.py +153 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_libc.py +33 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_loading.py +116 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_macholib.py +63 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_memfunctions.py +79 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_numbers.py +290 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_objects.py +67 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_parameters.py +207 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_pep3118.py +233 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_pickling.py +81 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_pointers.py +223 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_prototypes.py +222 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_python_api.py +89 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_random_things.py +74 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_refcounts.py +101 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_repr.py +29 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_returnfuncptrs.py +66 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_simplesubclasses.py +55 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_sizes.py +33 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_slicing.py +167 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_stringptr.py +77 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_strings.py +225 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_struct_fields.py +74 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_structures.py +491 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_unaligned_structures.py +45 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_unicode.py +56 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_values.py +100 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_varsize_struct.py +50 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_win32.py +147 -0
- package/python3.6.2/lib/python3.6/ctypes/test/test_wintypes.py +41 -0
- package/python3.6.2/lib/python3.6/ctypes/util.py +337 -0
- package/python3.6.2/lib/python3.6/ctypes/wintypes.py +202 -0
- package/python3.6.2/lib/python3.6/curses/__init__.py +101 -0
- package/python3.6.2/lib/python3.6/curses/ascii.py +99 -0
- package/python3.6.2/lib/python3.6/curses/has_key.py +192 -0
- package/python3.6.2/lib/python3.6/curses/panel.py +6 -0
- package/python3.6.2/lib/python3.6/curses/textpad.py +201 -0
- package/python3.6.2/lib/python3.6/datetime.py +2280 -0
- package/python3.6.2/lib/python3.6/dbm/__init__.py +188 -0
- package/python3.6.2/lib/python3.6/dbm/dumb.py +324 -0
- package/python3.6.2/lib/python3.6/dbm/gnu.py +3 -0
- package/python3.6.2/lib/python3.6/dbm/ndbm.py +3 -0
- package/python3.6.2/lib/python3.6/decimal.py +11 -0
- package/python3.6.2/lib/python3.6/difflib.py +2093 -0
- package/python3.6.2/lib/python3.6/dis.py +490 -0
- package/python3.6.2/lib/python3.6/distutils/__init__.py +13 -0
- package/python3.6.2/lib/python3.6/distutils/_msvccompiler.py +574 -0
- package/python3.6.2/lib/python3.6/distutils/archive_util.py +248 -0
- package/python3.6.2/lib/python3.6/distutils/bcppcompiler.py +393 -0
- package/python3.6.2/lib/python3.6/distutils/ccompiler.py +1115 -0
- package/python3.6.2/lib/python3.6/distutils/cmd.py +434 -0
- package/python3.6.2/lib/python3.6/distutils/command/__init__.py +31 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist.py +143 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_dumb.py +123 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_msi.py +741 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_rpm.py +582 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_wininst.py +365 -0
- package/python3.6.2/lib/python3.6/distutils/command/build.py +157 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_clib.py +209 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_ext.py +755 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_py.py +416 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_scripts.py +160 -0
- package/python3.6.2/lib/python3.6/distutils/command/check.py +145 -0
- package/python3.6.2/lib/python3.6/distutils/command/clean.py +76 -0
- package/python3.6.2/lib/python3.6/distutils/command/config.py +347 -0
- package/python3.6.2/lib/python3.6/distutils/command/install.py +656 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_data.py +79 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_egg_info.py +77 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_headers.py +47 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_lib.py +217 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_scripts.py +60 -0
- package/python3.6.2/lib/python3.6/distutils/command/register.py +304 -0
- package/python3.6.2/lib/python3.6/distutils/command/sdist.py +456 -0
- package/python3.6.2/lib/python3.6/distutils/command/upload.py +201 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-10.0-amd64.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-10.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-14.0-amd64.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-14.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-6.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-7.1.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-8.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-9.0-amd64.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-9.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/config.py +131 -0
- package/python3.6.2/lib/python3.6/distutils/core.py +234 -0
- package/python3.6.2/lib/python3.6/distutils/cygwinccompiler.py +405 -0
- package/python3.6.2/lib/python3.6/distutils/debug.py +5 -0
- package/python3.6.2/lib/python3.6/distutils/dep_util.py +92 -0
- package/python3.6.2/lib/python3.6/distutils/dir_util.py +210 -0
- package/python3.6.2/lib/python3.6/distutils/dist.py +1236 -0
- package/python3.6.2/lib/python3.6/distutils/errors.py +97 -0
- package/python3.6.2/lib/python3.6/distutils/extension.py +240 -0
- package/python3.6.2/lib/python3.6/distutils/fancy_getopt.py +457 -0
- package/python3.6.2/lib/python3.6/distutils/file_util.py +238 -0
- package/python3.6.2/lib/python3.6/distutils/filelist.py +327 -0
- package/python3.6.2/lib/python3.6/distutils/log.py +75 -0
- package/python3.6.2/lib/python3.6/distutils/msvc9compiler.py +791 -0
- package/python3.6.2/lib/python3.6/distutils/msvccompiler.py +643 -0
- package/python3.6.2/lib/python3.6/distutils/spawn.py +192 -0
- package/python3.6.2/lib/python3.6/distutils/sysconfig.py +532 -0
- package/python3.6.2/lib/python3.6/distutils/tests/Setup.sample +67 -0
- package/python3.6.2/lib/python3.6/distutils/tests/__init__.py +36 -0
- package/python3.6.2/lib/python3.6/distutils/tests/support.py +210 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_archive_util.py +395 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist.py +50 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_dumb.py +97 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_msi.py +25 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_rpm.py +135 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_wininst.py +31 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_build.py +56 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_clib.py +135 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_ext.py +521 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_py.py +179 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_scripts.py +112 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_check.py +149 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_clean.py +49 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_cmd.py +126 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_config.py +140 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_config_cmd.py +92 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_core.py +140 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_cygwinccompiler.py +154 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_dep_util.py +80 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_dir_util.py +139 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_dist.py +456 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_extension.py +69 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_file_util.py +114 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_filelist.py +340 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_install.py +248 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_data.py +75 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_headers.py +39 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_lib.py +115 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_scripts.py +82 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_log.py +38 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_msvc9compiler.py +184 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_msvccompiler.py +132 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_register.py +323 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_sdist.py +484 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_spawn.py +58 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_sysconfig.py +198 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_text_file.py +107 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_unixccompiler.py +149 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_upload.py +181 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_util.py +300 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_version.py +71 -0
- package/python3.6.2/lib/python3.6/distutils/tests/test_versionpredicate.py +13 -0
- package/python3.6.2/lib/python3.6/distutils/text_file.py +286 -0
- package/python3.6.2/lib/python3.6/distutils/unixccompiler.py +322 -0
- package/python3.6.2/lib/python3.6/distutils/util.py +557 -0
- package/python3.6.2/lib/python3.6/distutils/version.py +343 -0
- package/python3.6.2/lib/python3.6/distutils/versionpredicate.py +166 -0
- package/python3.6.2/lib/python3.6/doctest.py +2787 -0
- package/python3.6.2/lib/python3.6/dummy_threading.py +78 -0
- package/python3.6.2/lib/python3.6/email/__init__.py +62 -0
- package/python3.6.2/lib/python3.6/email/_encoded_words.py +221 -0
- package/python3.6.2/lib/python3.6/email/_header_value_parser.py +2811 -0
- package/python3.6.2/lib/python3.6/email/_parseaddr.py +540 -0
- package/python3.6.2/lib/python3.6/email/_policybase.py +374 -0
- package/python3.6.2/lib/python3.6/email/base64mime.py +119 -0
- package/python3.6.2/lib/python3.6/email/charset.py +406 -0
- package/python3.6.2/lib/python3.6/email/contentmanager.py +250 -0
- package/python3.6.2/lib/python3.6/email/encoders.py +69 -0
- package/python3.6.2/lib/python3.6/email/errors.py +107 -0
- package/python3.6.2/lib/python3.6/email/feedparser.py +536 -0
- package/python3.6.2/lib/python3.6/email/generator.py +508 -0
- package/python3.6.2/lib/python3.6/email/header.py +578 -0
- package/python3.6.2/lib/python3.6/email/headerregistry.py +589 -0
- package/python3.6.2/lib/python3.6/email/iterators.py +71 -0
- package/python3.6.2/lib/python3.6/email/message.py +1164 -0
- package/python3.6.2/lib/python3.6/email/mime/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/email/mime/application.py +37 -0
- package/python3.6.2/lib/python3.6/email/mime/audio.py +74 -0
- package/python3.6.2/lib/python3.6/email/mime/base.py +30 -0
- package/python3.6.2/lib/python3.6/email/mime/image.py +47 -0
- package/python3.6.2/lib/python3.6/email/mime/message.py +34 -0
- package/python3.6.2/lib/python3.6/email/mime/multipart.py +48 -0
- package/python3.6.2/lib/python3.6/email/mime/nonmultipart.py +22 -0
- package/python3.6.2/lib/python3.6/email/mime/text.py +42 -0
- package/python3.6.2/lib/python3.6/email/parser.py +132 -0
- package/python3.6.2/lib/python3.6/email/policy.py +223 -0
- package/python3.6.2/lib/python3.6/email/quoprimime.py +299 -0
- package/python3.6.2/lib/python3.6/email/utils.py +388 -0
- package/python3.6.2/lib/python3.6/encodings/__init__.py +169 -0
- package/python3.6.2/lib/python3.6/encodings/aliases.py +550 -0
- package/python3.6.2/lib/python3.6/encodings/ascii.py +50 -0
- package/python3.6.2/lib/python3.6/encodings/base64_codec.py +55 -0
- package/python3.6.2/lib/python3.6/encodings/big5.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/big5hkscs.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/bz2_codec.py +78 -0
- package/python3.6.2/lib/python3.6/encodings/charmap.py +69 -0
- package/python3.6.2/lib/python3.6/encodings/cp037.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1006.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1026.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1125.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp1140.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1250.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1251.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1252.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1253.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1254.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1255.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1256.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1257.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp1258.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp273.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp424.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp437.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp500.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp65001.py +43 -0
- package/python3.6.2/lib/python3.6/encodings/cp720.py +309 -0
- package/python3.6.2/lib/python3.6/encodings/cp737.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp775.py +697 -0
- package/python3.6.2/lib/python3.6/encodings/cp850.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp852.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp855.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp856.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp857.py +694 -0
- package/python3.6.2/lib/python3.6/encodings/cp858.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp860.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp861.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp862.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp863.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp864.py +690 -0
- package/python3.6.2/lib/python3.6/encodings/cp865.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp866.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/cp869.py +689 -0
- package/python3.6.2/lib/python3.6/encodings/cp874.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp875.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/cp932.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/cp949.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/cp950.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jis_2004.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jisx0213.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jp.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/euc_kr.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/gb18030.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/gb2312.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/gbk.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/hex_codec.py +55 -0
- package/python3.6.2/lib/python3.6/encodings/hp_roman8.py +314 -0
- package/python3.6.2/lib/python3.6/encodings/hz.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/idna.py +309 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_1.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2004.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_3.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_ext.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_kr.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_1.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_10.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_11.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_13.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_14.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_15.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_16.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_2.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_3.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_4.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_5.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_6.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_7.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_8.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_9.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/johab.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_r.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_t.py +308 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_u.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/kz1048.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/latin_1.py +50 -0
- package/python3.6.2/lib/python3.6/encodings/mac_arabic.py +698 -0
- package/python3.6.2/lib/python3.6/encodings/mac_centeuro.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_croatian.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_cyrillic.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_farsi.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_greek.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_iceland.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_latin2.py +312 -0
- package/python3.6.2/lib/python3.6/encodings/mac_roman.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_romanian.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mac_turkish.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/mbcs.py +47 -0
- package/python3.6.2/lib/python3.6/encodings/oem.py +41 -0
- package/python3.6.2/lib/python3.6/encodings/palmos.py +308 -0
- package/python3.6.2/lib/python3.6/encodings/ptcp154.py +312 -0
- package/python3.6.2/lib/python3.6/encodings/punycode.py +237 -0
- package/python3.6.2/lib/python3.6/encodings/quopri_codec.py +56 -0
- package/python3.6.2/lib/python3.6/encodings/raw_unicode_escape.py +45 -0
- package/python3.6.2/lib/python3.6/encodings/rot_13.py +113 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jis.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jis_2004.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jisx0213.py +39 -0
- package/python3.6.2/lib/python3.6/encodings/tis_620.py +307 -0
- package/python3.6.2/lib/python3.6/encodings/undefined.py +49 -0
- package/python3.6.2/lib/python3.6/encodings/unicode_escape.py +45 -0
- package/python3.6.2/lib/python3.6/encodings/unicode_internal.py +45 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16.py +155 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16_be.py +42 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16_le.py +42 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32.py +150 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32_be.py +37 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32_le.py +37 -0
- package/python3.6.2/lib/python3.6/encodings/utf_7.py +38 -0
- package/python3.6.2/lib/python3.6/encodings/utf_8.py +42 -0
- package/python3.6.2/lib/python3.6/encodings/utf_8_sig.py +130 -0
- package/python3.6.2/lib/python3.6/encodings/uu_codec.py +99 -0
- package/python3.6.2/lib/python3.6/encodings/zlib_codec.py +77 -0
- package/python3.6.2/lib/python3.6/ensurepip/__init__.py +205 -0
- package/python3.6.2/lib/python3.6/ensurepip/__main__.py +5 -0
- package/python3.6.2/lib/python3.6/ensurepip/_uninstall.py +31 -0
- package/python3.6.2/lib/python3.6/enum.py +875 -0
- package/python3.6.2/lib/python3.6/filecmp.py +305 -0
- package/python3.6.2/lib/python3.6/fileinput.py +425 -0
- package/python3.6.2/lib/python3.6/fnmatch.py +109 -0
- package/python3.6.2/lib/python3.6/formatter.py +452 -0
- package/python3.6.2/lib/python3.6/fractions.py +643 -0
- package/python3.6.2/lib/python3.6/ftplib.py +989 -0
- package/python3.6.2/lib/python3.6/functools.py +811 -0
- package/python3.6.2/lib/python3.6/genericpath.py +151 -0
- package/python3.6.2/lib/python3.6/getopt.py +215 -0
- package/python3.6.2/lib/python3.6/getpass.py +185 -0
- package/python3.6.2/lib/python3.6/gettext.py +637 -0
- package/python3.6.2/lib/python3.6/glob.py +171 -0
- package/python3.6.2/lib/python3.6/gzip.py +574 -0
- package/python3.6.2/lib/python3.6/hashlib.py +251 -0
- package/python3.6.2/lib/python3.6/heapq.py +607 -0
- package/python3.6.2/lib/python3.6/hmac.py +144 -0
- package/python3.6.2/lib/python3.6/html/__init__.py +132 -0
- package/python3.6.2/lib/python3.6/html/entities.py +2509 -0
- package/python3.6.2/lib/python3.6/html/parser.py +470 -0
- package/python3.6.2/lib/python3.6/http/__init__.py +134 -0
- package/python3.6.2/lib/python3.6/http/client.py +1478 -0
- package/python3.6.2/lib/python3.6/http/cookiejar.py +2098 -0
- package/python3.6.2/lib/python3.6/http/cookies.py +635 -0
- package/python3.6.2/lib/python3.6/http/server.py +1211 -0
- package/python3.6.2/lib/python3.6/idlelib/CREDITS.txt +37 -0
- package/python3.6.2/lib/python3.6/idlelib/ChangeLog +1591 -0
- package/python3.6.2/lib/python3.6/idlelib/HISTORY.txt +296 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/folder.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle.icns +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle.ico +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_16.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_16.png +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_32.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_32.png +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_48.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_48.png +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/minusnode.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/openfolder.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/plusnode.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/python.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/tk.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/NEWS.txt +749 -0
- package/python3.6.2/lib/python3.6/idlelib/NEWS2x.txt +660 -0
- package/python3.6.2/lib/python3.6/idlelib/README.txt +251 -0
- package/python3.6.2/lib/python3.6/idlelib/TODO.txt +210 -0
- package/python3.6.2/lib/python3.6/idlelib/__init__.py +10 -0
- package/python3.6.2/lib/python3.6/idlelib/__main__.py +8 -0
- package/python3.6.2/lib/python3.6/idlelib/_pyclbr.py +402 -0
- package/python3.6.2/lib/python3.6/idlelib/autocomplete.py +232 -0
- package/python3.6.2/lib/python3.6/idlelib/autocomplete_w.py +460 -0
- package/python3.6.2/lib/python3.6/idlelib/autoexpand.py +96 -0
- package/python3.6.2/lib/python3.6/idlelib/browser.py +248 -0
- package/python3.6.2/lib/python3.6/idlelib/calltip_w.py +164 -0
- package/python3.6.2/lib/python3.6/idlelib/calltips.py +178 -0
- package/python3.6.2/lib/python3.6/idlelib/codecontext.py +185 -0
- package/python3.6.2/lib/python3.6/idlelib/colorizer.py +289 -0
- package/python3.6.2/lib/python3.6/idlelib/config-extensions.def +65 -0
- package/python3.6.2/lib/python3.6/idlelib/config-highlight.def +93 -0
- package/python3.6.2/lib/python3.6/idlelib/config-keys.def +304 -0
- package/python3.6.2/lib/python3.6/idlelib/config-main.def +88 -0
- package/python3.6.2/lib/python3.6/idlelib/config.py +929 -0
- package/python3.6.2/lib/python3.6/idlelib/config_key.py +298 -0
- package/python3.6.2/lib/python3.6/idlelib/configdialog.py +2254 -0
- package/python3.6.2/lib/python3.6/idlelib/debugger.py +544 -0
- package/python3.6.2/lib/python3.6/idlelib/debugger_r.py +388 -0
- package/python3.6.2/lib/python3.6/idlelib/debugobj.py +139 -0
- package/python3.6.2/lib/python3.6/idlelib/debugobj_r.py +36 -0
- package/python3.6.2/lib/python3.6/idlelib/delegator.py +33 -0
- package/python3.6.2/lib/python3.6/idlelib/dynoption.py +58 -0
- package/python3.6.2/lib/python3.6/idlelib/editor.py +1688 -0
- package/python3.6.2/lib/python3.6/idlelib/extend.txt +83 -0
- package/python3.6.2/lib/python3.6/idlelib/filelist.py +132 -0
- package/python3.6.2/lib/python3.6/idlelib/grep.py +200 -0
- package/python3.6.2/lib/python3.6/idlelib/help.html +791 -0
- package/python3.6.2/lib/python3.6/idlelib/help.py +275 -0
- package/python3.6.2/lib/python3.6/idlelib/help_about.py +205 -0
- package/python3.6.2/lib/python3.6/idlelib/history.py +106 -0
- package/python3.6.2/lib/python3.6/idlelib/hyperparser.py +312 -0
- package/python3.6.2/lib/python3.6/idlelib/idle.bat +4 -0
- package/python3.6.2/lib/python3.6/idlelib/idle.py +14 -0
- package/python3.6.2/lib/python3.6/idlelib/idle.pyw +17 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/README.txt +226 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/__init__.py +17 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/htest.py +421 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/mock_idle.py +60 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/mock_tk.py +303 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_autocomplete.py +149 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_autoexpand.py +143 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_browser.py +253 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_calltips.py +203 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_colorizer.py +56 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_config.py +824 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_config_key.py +102 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_configdialog.py +1415 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_debugger.py +29 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_delegator.py +40 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_editmenu.py +74 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_editor.py +14 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_grep.py +80 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_help.py +34 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_help_about.py +177 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_history.py +168 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_hyperparser.py +274 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_iomenu.py +234 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_macosx.py +106 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_outwin.py +172 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_paragraph.py +376 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_parenmatch.py +112 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_pathbrowser.py +88 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_percolator.py +118 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_query.py +354 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_redirector.py +124 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_replace.py +293 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_rstrip.py +49 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_run.py +35 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_scrolledlist.py +29 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_search.py +82 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_searchbase.py +156 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_searchengine.py +329 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_text.py +236 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_textview.py +179 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_tree.py +35 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_undo.py +135 -0
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_warning.py +73 -0
- package/python3.6.2/lib/python3.6/idlelib/iomenu.py +574 -0
- package/python3.6.2/lib/python3.6/idlelib/macosx.py +252 -0
- package/python3.6.2/lib/python3.6/idlelib/mainmenu.py +108 -0
- package/python3.6.2/lib/python3.6/idlelib/multicall.py +445 -0
- package/python3.6.2/lib/python3.6/idlelib/outwin.py +188 -0
- package/python3.6.2/lib/python3.6/idlelib/paragraph.py +195 -0
- package/python3.6.2/lib/python3.6/idlelib/parenmatch.py +183 -0
- package/python3.6.2/lib/python3.6/idlelib/pathbrowser.py +111 -0
- package/python3.6.2/lib/python3.6/idlelib/percolator.py +104 -0
- package/python3.6.2/lib/python3.6/idlelib/pyparse.py +617 -0
- package/python3.6.2/lib/python3.6/idlelib/pyshell.py +1542 -0
- package/python3.6.2/lib/python3.6/idlelib/query.py +308 -0
- package/python3.6.2/lib/python3.6/idlelib/redirector.py +175 -0
- package/python3.6.2/lib/python3.6/idlelib/replace.py +243 -0
- package/python3.6.2/lib/python3.6/idlelib/rpc.py +627 -0
- package/python3.6.2/lib/python3.6/idlelib/rstrip.py +29 -0
- package/python3.6.2/lib/python3.6/idlelib/run.py +525 -0
- package/python3.6.2/lib/python3.6/idlelib/runscript.py +195 -0
- package/python3.6.2/lib/python3.6/idlelib/scrolledlist.py +147 -0
- package/python3.6.2/lib/python3.6/idlelib/search.py +102 -0
- package/python3.6.2/lib/python3.6/idlelib/searchbase.py +200 -0
- package/python3.6.2/lib/python3.6/idlelib/searchengine.py +236 -0
- package/python3.6.2/lib/python3.6/idlelib/stackviewer.py +152 -0
- package/python3.6.2/lib/python3.6/idlelib/statusbar.py +46 -0
- package/python3.6.2/lib/python3.6/idlelib/textview.py +136 -0
- package/python3.6.2/lib/python3.6/idlelib/tooltip.py +96 -0
- package/python3.6.2/lib/python3.6/idlelib/tree.py +467 -0
- package/python3.6.2/lib/python3.6/idlelib/undo.py +366 -0
- package/python3.6.2/lib/python3.6/idlelib/windows.py +92 -0
- package/python3.6.2/lib/python3.6/idlelib/zoomheight.py +48 -0
- package/python3.6.2/lib/python3.6/idlelib/zzdummy.py +42 -0
- package/python3.6.2/lib/python3.6/imaplib.py +1609 -0
- package/python3.6.2/lib/python3.6/imghdr.py +168 -0
- package/python3.6.2/lib/python3.6/imp.py +346 -0
- package/python3.6.2/lib/python3.6/importlib/__init__.py +173 -0
- package/python3.6.2/lib/python3.6/importlib/_bootstrap.py +1161 -0
- package/python3.6.2/lib/python3.6/importlib/_bootstrap_external.py +1443 -0
- package/python3.6.2/lib/python3.6/importlib/abc.py +329 -0
- package/python3.6.2/lib/python3.6/importlib/machinery.py +21 -0
- package/python3.6.2/lib/python3.6/importlib/util.py +288 -0
- package/python3.6.2/lib/python3.6/inspect.py +3098 -0
- package/python3.6.2/lib/python3.6/io.py +99 -0
- package/python3.6.2/lib/python3.6/ipaddress.py +2299 -0
- package/python3.6.2/lib/python3.6/json/__init__.py +367 -0
- package/python3.6.2/lib/python3.6/json/decoder.py +358 -0
- package/python3.6.2/lib/python3.6/json/encoder.py +441 -0
- package/python3.6.2/lib/python3.6/json/scanner.py +73 -0
- package/python3.6.2/lib/python3.6/json/tool.py +50 -0
- package/python3.6.2/lib/python3.6/keyword.py +94 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_asyncio.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_bisect.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_blake2.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_bz2.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_cn.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_hk.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_iso2022.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_jp.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_kr.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_tw.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_crypt.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_csv.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_ctypes.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_ctypes_test.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_curses.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_curses_panel.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_datetime.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_elementtree.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_hashlib.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_heapq.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_json.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_lsprof.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_md5.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_multibytecodec.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_multiprocessing.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_opcode.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_pickle.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_random.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha1.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha256.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha3.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha512.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_socket.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sqlite3.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_ssl.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_struct.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sysconfigdata_m_linux_arm-linux-androideabi.py +743 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_testbuffer.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_testcapi.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_testimportmultiple.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_testmultiphase.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/array.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/audioop.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/binascii.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/cmath.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/fcntl.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/grp.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/math.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/mmap.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/ossaudiodev.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/parser.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/pyexpat.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/readline.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/resource.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/select.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/syslog.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/termios.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/unicodedata.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/xxlimited.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/zlib.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/__init__.py +1 -0
- package/python3.6.2/lib/python3.6/lib2to3/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/lib2to3/btm_matcher.py +168 -0
- package/python3.6.2/lib/python3.6/lib2to3/btm_utils.py +281 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixer_base.py +186 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixer_util.py +453 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/__init__.py +1 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_apply.py +70 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_asserts.py +34 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_basestring.py +14 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_buffer.py +22 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_dict.py +106 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_except.py +93 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exec.py +39 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_execfile.py +52 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exitfunc.py +72 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_filter.py +90 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_funcattrs.py +21 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_future.py +22 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_getcwdu.py +19 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_has_key.py +109 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_idioms.py +152 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_import.py +99 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports.py +145 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports2.py +16 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_input.py +26 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_intern.py +41 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_isinstance.py +52 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools.py +43 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools_imports.py +57 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_long.py +19 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_map.py +110 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_metaclass.py +228 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_methodattrs.py +24 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ne.py +23 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_next.py +103 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_nonzero.py +21 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_numliterals.py +28 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_operator.py +98 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_paren.py +44 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_print.py +87 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raise.py +90 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raw_input.py +17 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reduce.py +35 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reload.py +38 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_renames.py +70 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_repr.py +23 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_set_literal.py +53 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_standarderror.py +18 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_sys_exc.py +30 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_throw.py +56 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_tuple_params.py +175 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_types.py +61 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_unicode.py +42 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_urllib.py +196 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ws_comma.py +39 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xrange.py +73 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xreadlines.py +25 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_zip.py +46 -0
- package/python3.6.2/lib/python3.6/lib2to3/main.py +268 -0
- package/python3.6.2/lib/python3.6/lib2to3/patcomp.py +205 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/__init__.py +4 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/conv.py +257 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/driver.py +160 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/grammar.py +207 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/literals.py +60 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/parse.py +201 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/pgen.py +386 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/token.py +85 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/tokenize.py +590 -0
- package/python3.6.2/lib/python3.6/lib2to3/pygram.py +40 -0
- package/python3.6.2/lib/python3.6/lib2to3/pytree.py +854 -0
- package/python3.6.2/lib/python3.6/lib2to3/refactor.py +744 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/__init__.py +9 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/README +6 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/bom.py +2 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/crlf.py +3 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/different_encoding.py +6 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/false_encoding.py +2 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/bad_order.py +5 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_explicit.py +6 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_first.py +6 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_last.py +7 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_parrot.py +13 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_preorder.py +6 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/no_fixer_cls.py +1 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/parrot_example.py +2 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/infinite_recursion.py +2669 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/py2_test_grammar.py +974 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/py3_test_grammar.py +945 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/pytree_idempotency.py +94 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/support.py +52 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_all_fixers.py +27 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_fixers.py +4640 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_main.py +139 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_parser.py +472 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_pytree.py +472 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_refactor.py +316 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_util.py +591 -0
- package/python3.6.2/lib/python3.6/linecache.py +177 -0
- package/python3.6.2/lib/python3.6/locale.py +1684 -0
- package/python3.6.2/lib/python3.6/logging/__init__.py +2019 -0
- package/python3.6.2/lib/python3.6/logging/config.py +933 -0
- package/python3.6.2/lib/python3.6/logging/handlers.py +1505 -0
- package/python3.6.2/lib/python3.6/lzma.py +347 -0
- package/python3.6.2/lib/python3.6/macpath.py +211 -0
- package/python3.6.2/lib/python3.6/macurl2path.py +77 -0
- package/python3.6.2/lib/python3.6/mailbox.py +2146 -0
- package/python3.6.2/lib/python3.6/mailcap.py +275 -0
- package/python3.6.2/lib/python3.6/mimetypes.py +598 -0
- package/python3.6.2/lib/python3.6/modulefinder.py +633 -0
- package/python3.6.2/lib/python3.6/msilib/__init__.py +483 -0
- package/python3.6.2/lib/python3.6/msilib/schema.py +1007 -0
- package/python3.6.2/lib/python3.6/msilib/sequence.py +126 -0
- package/python3.6.2/lib/python3.6/msilib/text.py +129 -0
- package/python3.6.2/lib/python3.6/multiprocessing/__init__.py +38 -0
- package/python3.6.2/lib/python3.6/multiprocessing/connection.py +953 -0
- package/python3.6.2/lib/python3.6/multiprocessing/context.py +357 -0
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/__init__.py +119 -0
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/connection.py +73 -0
- package/python3.6.2/lib/python3.6/multiprocessing/forkserver.py +266 -0
- package/python3.6.2/lib/python3.6/multiprocessing/heap.py +254 -0
- package/python3.6.2/lib/python3.6/multiprocessing/managers.py +1160 -0
- package/python3.6.2/lib/python3.6/multiprocessing/pool.py +803 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_fork.py +86 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_forkserver.py +68 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_posix.py +68 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_win32.py +98 -0
- package/python3.6.2/lib/python3.6/multiprocessing/process.py +336 -0
- package/python3.6.2/lib/python3.6/multiprocessing/queues.py +347 -0
- package/python3.6.2/lib/python3.6/multiprocessing/reduction.py +274 -0
- package/python3.6.2/lib/python3.6/multiprocessing/resource_sharer.py +158 -0
- package/python3.6.2/lib/python3.6/multiprocessing/semaphore_tracker.py +157 -0
- package/python3.6.2/lib/python3.6/multiprocessing/sharedctypes.py +239 -0
- package/python3.6.2/lib/python3.6/multiprocessing/spawn.py +286 -0
- package/python3.6.2/lib/python3.6/multiprocessing/synchronize.py +406 -0
- package/python3.6.2/lib/python3.6/multiprocessing/util.py +406 -0
- package/python3.6.2/lib/python3.6/netrc.py +142 -0
- package/python3.6.2/lib/python3.6/nntplib.py +1147 -0
- package/python3.6.2/lib/python3.6/ntpath.py +692 -0
- package/python3.6.2/lib/python3.6/nturl2path.py +68 -0
- package/python3.6.2/lib/python3.6/numbers.py +389 -0
- package/python3.6.2/lib/python3.6/opcode.py +215 -0
- package/python3.6.2/lib/python3.6/operator.py +464 -0
- package/python3.6.2/lib/python3.6/optparse.py +1681 -0
- package/python3.6.2/lib/python3.6/os.py +1069 -0
- package/python3.6.2/lib/python3.6/pathlib.py +1434 -0
- package/python3.6.2/lib/python3.6/pdb.py +1694 -0
- package/python3.6.2/lib/python3.6/pickle.py +1605 -0
- package/python3.6.2/lib/python3.6/pickletools.py +2840 -0
- package/python3.6.2/lib/python3.6/pipes.py +247 -0
- package/python3.6.2/lib/python3.6/pkgutil.py +634 -0
- package/python3.6.2/lib/python3.6/platform.py +1400 -0
- package/python3.6.2/lib/python3.6/plistlib.py +1043 -0
- package/python3.6.2/lib/python3.6/poplib.py +478 -0
- package/python3.6.2/lib/python3.6/posixpath.py +520 -0
- package/python3.6.2/lib/python3.6/pprint.py +597 -0
- package/python3.6.2/lib/python3.6/profile.py +589 -0
- package/python3.6.2/lib/python3.6/pstats.py +697 -0
- package/python3.6.2/lib/python3.6/pty.py +170 -0
- package/python3.6.2/lib/python3.6/py_compile.py +186 -0
- package/python3.6.2/lib/python3.6/pyclbr.py +352 -0
- package/python3.6.2/lib/python3.6/pydoc.py +2663 -0
- package/python3.6.2/lib/python3.6/pydoc_data/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/pydoc_data/topics.py +12951 -0
- package/python3.6.2/lib/python3.6/queue.py +246 -0
- package/python3.6.2/lib/python3.6/quopri.py +242 -0
- package/python3.6.2/lib/python3.6/random.py +768 -0
- package/python3.6.2/lib/python3.6/re.py +381 -0
- package/python3.6.2/lib/python3.6/reprlib.py +164 -0
- package/python3.6.2/lib/python3.6/rlcompleter.py +205 -0
- package/python3.6.2/lib/python3.6/runpy.py +294 -0
- package/python3.6.2/lib/python3.6/sched.py +170 -0
- package/python3.6.2/lib/python3.6/secrets.py +73 -0
- package/python3.6.2/lib/python3.6/selectors.py +611 -0
- package/python3.6.2/lib/python3.6/shelve.py +243 -0
- package/python3.6.2/lib/python3.6/shlex.py +335 -0
- package/python3.6.2/lib/python3.6/shutil.py +1153 -0
- package/python3.6.2/lib/python3.6/signal.py +79 -0
- package/python3.6.2/lib/python3.6/site.py +598 -0
- package/python3.6.2/lib/python3.6/smtpd.py +965 -0
- package/python3.6.2/lib/python3.6/smtplib.py +1115 -0
- package/python3.6.2/lib/python3.6/sndhdr.py +257 -0
- package/python3.6.2/lib/python3.6/socket.py +750 -0
- package/python3.6.2/lib/python3.6/socketserver.py +793 -0
- package/python3.6.2/lib/python3.6/sqlite3/__init__.py +23 -0
- package/python3.6.2/lib/python3.6/sqlite3/dbapi2.py +89 -0
- package/python3.6.2/lib/python3.6/sqlite3/dump.py +70 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/dbapi.py +938 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/dump.py +81 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/factory.py +293 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/hooks.py +264 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/regression.py +410 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/transactions.py +214 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/types.py +421 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/userfunctions.py +473 -0
- package/python3.6.2/lib/python3.6/sre_compile.py +580 -0
- package/python3.6.2/lib/python3.6/sre_constants.py +233 -0
- package/python3.6.2/lib/python3.6/sre_parse.py +973 -0
- package/python3.6.2/lib/python3.6/ssl.py +1228 -0
- package/python3.6.2/lib/python3.6/stat.py +178 -0
- package/python3.6.2/lib/python3.6/statistics.py +670 -0
- package/python3.6.2/lib/python3.6/string.py +309 -0
- package/python3.6.2/lib/python3.6/stringprep.py +272 -0
- package/python3.6.2/lib/python3.6/struct.py +15 -0
- package/python3.6.2/lib/python3.6/subprocess.py +1590 -0
- package/python3.6.2/lib/python3.6/sunau.py +525 -0
- package/python3.6.2/lib/python3.6/symbol.py +115 -0
- package/python3.6.2/lib/python3.6/symtable.py +238 -0
- package/python3.6.2/lib/python3.6/sysconfig.py +721 -0
- package/python3.6.2/lib/python3.6/tabnanny.py +332 -0
- package/python3.6.2/lib/python3.6/tarfile.py +2547 -0
- package/python3.6.2/lib/python3.6/telnetlib.py +675 -0
- package/python3.6.2/lib/python3.6/tempfile.py +811 -0
- package/python3.6.2/lib/python3.6/test/Sine-1000Hz-300ms.aif +0 -0
- package/python3.6.2/lib/python3.6/test/__init__.py +1 -0
- package/python3.6.2/lib/python3.6/test/__main__.py +2 -0
- package/python3.6.2/lib/python3.6/test/_test_multiprocessing.py +4458 -0
- package/python3.6.2/lib/python3.6/test/allsans.pem +37 -0
- package/python3.6.2/lib/python3.6/test/ann_module.py +53 -0
- package/python3.6.2/lib/python3.6/test/ann_module2.py +36 -0
- package/python3.6.2/lib/python3.6/test/ann_module3.py +18 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-alaw.aifc +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm16.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm16.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm16.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm24.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm24.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm24.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm32.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm32.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm32.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm8.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm8.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm8.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-ulaw.aifc +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-ulaw.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiotest.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiotests.py +329 -0
- package/python3.6.2/lib/python3.6/test/autotest.py +5 -0
- package/python3.6.2/lib/python3.6/test/bad_coding.py +1 -0
- package/python3.6.2/lib/python3.6/test/bad_coding2.py +2 -0
- package/python3.6.2/lib/python3.6/test/badcert.pem +36 -0
- package/python3.6.2/lib/python3.6/test/badkey.pem +40 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_3131.py +2 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future10.py +3 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future3.py +10 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future4.py +10 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future5.py +12 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future6.py +10 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future7.py +11 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future8.py +10 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_future9.py +10 -0
- package/python3.6.2/lib/python3.6/test/badsyntax_pep3120.py +1 -0
- package/python3.6.2/lib/python3.6/test/bisect.py +167 -0
- package/python3.6.2/lib/python3.6/test/bytecode_helper.py +41 -0
- package/python3.6.2/lib/python3.6/test/capath/4e1295a3.0 +14 -0
- package/python3.6.2/lib/python3.6/test/capath/5ed36f99.0 +41 -0
- package/python3.6.2/lib/python3.6/test/capath/6e88d7b8.0 +14 -0
- package/python3.6.2/lib/python3.6/test/capath/99d0fa06.0 +41 -0
- package/python3.6.2/lib/python3.6/test/capath/b1930218.0 +21 -0
- package/python3.6.2/lib/python3.6/test/capath/ceff1710.0 +21 -0
- package/python3.6.2/lib/python3.6/test/cfgparser.1 +3 -0
- package/python3.6.2/lib/python3.6/test/cfgparser.2 +537 -0
- package/python3.6.2/lib/python3.6/test/cfgparser.3 +69 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5-utf8.txt +9 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5.txt +9 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5hkscs-utf8.txt +2 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5hkscs.txt +2 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/cp949-utf8.txt +9 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/cp949.txt +9 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jisx0213-utf8.txt +8 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jisx0213.txt +8 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jp-utf8.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jp.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_kr-utf8.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_kr.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb18030-utf8.txt +15 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb18030.txt +15 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb2312-utf8.txt +6 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb2312.txt +6 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/gbk-utf8.txt +14 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/gbk.txt +14 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/hz-utf8.txt +2 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/hz.txt +2 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_jp-utf8.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_jp.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_kr-utf8.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_kr.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/johab-utf8.txt +9 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/johab.txt +9 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jis-utf8.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jis.txt +7 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jisx0213-utf8.txt +8 -0
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jisx0213.txt +8 -0
- package/python3.6.2/lib/python3.6/test/cmath_testcases.txt +2511 -0
- package/python3.6.2/lib/python3.6/test/coding20731.py +4 -0
- package/python3.6.2/lib/python3.6/test/crashers/README +20 -0
- package/python3.6.2/lib/python3.6/test/crashers/bogus_code_obj.py +19 -0
- package/python3.6.2/lib/python3.6/test/crashers/gc_inspection.py +32 -0
- package/python3.6.2/lib/python3.6/test/crashers/infinite_loop_re.py +16 -0
- package/python3.6.2/lib/python3.6/test/crashers/mutation_inside_cyclegc.py +31 -0
- package/python3.6.2/lib/python3.6/test/crashers/recursive_call.py +15 -0
- package/python3.6.2/lib/python3.6/test/crashers/trace_at_recursion_limit.py +27 -0
- package/python3.6.2/lib/python3.6/test/crashers/underlying_dict.py +20 -0
- package/python3.6.2/lib/python3.6/test/curses_tests.py +46 -0
- package/python3.6.2/lib/python3.6/test/data/README +2 -0
- package/python3.6.2/lib/python3.6/test/datetimetester.py +4929 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/abs.decTest +161 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/add.decTest +2716 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/and.decTest +338 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/base.decTest +1411 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/clamp.decTest +211 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/class.decTest +131 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/compare.decTest +758 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/comparetotal.decTest +798 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/comparetotmag.decTest +790 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copy.decTest +86 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copyabs.decTest +86 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copynegate.decTest +86 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copysign.decTest +177 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddAbs.decTest +126 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddAdd.decTest +1328 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddAnd.decTest +347 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddBase.decTest +1104 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCanonical.decTest +357 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddClass.decTest +76 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompare.decTest +744 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompareSig.decTest +647 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompareTotal.decTest +706 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompareTotalMag.decTest +706 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopy.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopyAbs.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopyNegate.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopySign.decTest +175 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddDivide.decTest +863 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddDivideInt.decTest +449 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddEncode.decTest +495 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddFMA.decTest +1698 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddInvert.decTest +202 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddLogB.decTest +159 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMax.decTest +322 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMaxMag.decTest +304 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMin.decTest +309 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMinMag.decTest +293 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMinus.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMultiply.decTest +553 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddNextMinus.decTest +126 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddNextPlus.decTest +124 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddNextToward.decTest +374 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddOr.decTest +292 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddPlus.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddQuantize.decTest +833 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddReduce.decTest +182 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddRemainder.decTest +600 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddRemainderNear.decTest +629 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddRotate.decTest +262 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddSameQuantum.decTest +389 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddScaleB.decTest +243 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddShift.decTest +262 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddSubtract.decTest +629 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddToIntegral.decTest +257 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddXor.decTest +337 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/decDouble.decTest +65 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/decQuad.decTest +65 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/decSingle.decTest +25 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/divide.decTest +854 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/divideint.decTest +486 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqAbs.decTest +126 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqAdd.decTest +1215 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqAnd.decTest +420 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqBase.decTest +1081 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCanonical.decTest +372 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqClass.decTest +77 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompare.decTest +753 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompareSig.decTest +647 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompareTotal.decTest +706 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompareTotalMag.decTest +706 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopy.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopyAbs.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopyNegate.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopySign.decTest +175 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqDivide.decTest +808 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqDivideInt.decTest +453 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqEncode.decTest +477 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqFMA.decTest +1786 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqInvert.decTest +245 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqLogB.decTest +160 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMax.decTest +322 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMaxMag.decTest +304 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMin.decTest +309 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMinMag.decTest +293 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMinus.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMultiply.decTest +589 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqNextMinus.decTest +126 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqNextPlus.decTest +124 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqNextToward.decTest +375 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqOr.decTest +401 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqPlus.decTest +88 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqQuantize.decTest +836 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqReduce.decTest +183 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqRemainder.decTest +597 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqRemainderNear.decTest +631 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqRotate.decTest +298 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqSameQuantum.decTest +389 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqScaleB.decTest +260 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqShift.decTest +298 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqSubtract.decTest +635 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqToIntegral.decTest +257 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqXor.decTest +410 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dsBase.decTest +1062 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dsEncode.decTest +372 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/exp.decTest +674 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/extra.decTest +2830 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/fma.decTest +3426 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/inexact.decTest +215 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/invert.decTest +176 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ln.decTest +611 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/log10.decTest +551 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/logb.decTest +188 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/max.decTest +424 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/maxmag.decTest +404 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/min.decTest +407 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/minmag.decTest +390 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/minus.decTest +182 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/multiply.decTest +731 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/nextminus.decTest +148 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/nextplus.decTest +150 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/nexttoward.decTest +426 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/or.decTest +334 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/plus.decTest +195 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/power.decTest +1624 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/powersqrt.decTest +2970 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/quantize.decTest +948 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/randomBound32.decTest +2443 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/randoms.decTest +4030 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/reduce.decTest +234 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/remainder.decTest +640 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/remainderNear.decTest +572 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/rescale.decTest +764 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/rotate.decTest +247 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/rounding.decTest +1303 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/samequantum.decTest +389 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/scaleb.decTest +209 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/shift.decTest +250 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/squareroot.decTest +3834 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/subtract.decTest +873 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/testall.decTest +87 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/tointegral.decTest +241 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/tointegralx.decTest +255 -0
- package/python3.6.2/lib/python3.6/test/decimaltestdata/xor.decTest +335 -0
- package/python3.6.2/lib/python3.6/test/dh1024.pem +7 -0
- package/python3.6.2/lib/python3.6/test/dis_module.py +5 -0
- package/python3.6.2/lib/python3.6/test/doctest_aliases.py +13 -0
- package/python3.6.2/lib/python3.6/test/double_const.py +30 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/assert_usable.d +5 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/assert_usable.stp +5 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.d +31 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.d.expected +18 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.py +30 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.stp +41 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.stp.expected +14 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.d +18 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.d.expected +8 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.py +13 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.stp +26 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.stp.expected +8 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/instance.py +24 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/line.d +7 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/line.d.expected +20 -0
- package/python3.6.2/lib/python3.6/test/dtracedata/line.py +17 -0
- package/python3.6.2/lib/python3.6/test/eintrdata/eintr_tester.py +493 -0
- package/python3.6.2/lib/python3.6/test/empty.vbs +1 -0
- package/python3.6.2/lib/python3.6/test/encoded_modules/__init__.py +23 -0
- package/python3.6.2/lib/python3.6/test/encoded_modules/module_iso_8859_1.py +5 -0
- package/python3.6.2/lib/python3.6/test/encoded_modules/module_koi8_r.py +3 -0
- package/python3.6.2/lib/python3.6/test/exception_hierarchy.txt +64 -0
- package/python3.6.2/lib/python3.6/test/final_a.py +19 -0
- package/python3.6.2/lib/python3.6/test/final_b.py +19 -0
- package/python3.6.2/lib/python3.6/test/floating_points.txt +1028 -0
- package/python3.6.2/lib/python3.6/test/fork_wait.py +91 -0
- package/python3.6.2/lib/python3.6/test/formatfloat_testcases.txt +355 -0
- package/python3.6.2/lib/python3.6/test/future_test1.py +11 -0
- package/python3.6.2/lib/python3.6/test/future_test2.py +10 -0
- package/python3.6.2/lib/python3.6/test/gdb_sample.py +12 -0
- package/python3.6.2/lib/python3.6/test/ieee754.txt +185 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.bmp +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.exr +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.gif +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.jpg +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.pbm +3 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.pgm +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.png +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.ppm +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.ras +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.sgi +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.tiff +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.webp +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.xbm +6 -0
- package/python3.6.2/lib/python3.6/test/imp_dummy.py +3 -0
- package/python3.6.2/lib/python3.6/test/inspect_fodder.py +76 -0
- package/python3.6.2/lib/python3.6/test/inspect_fodder2.py +139 -0
- package/python3.6.2/lib/python3.6/test/keycert.passwd.pem +33 -0
- package/python3.6.2/lib/python3.6/test/keycert.pem +31 -0
- package/python3.6.2/lib/python3.6/test/keycert2.pem +31 -0
- package/python3.6.2/lib/python3.6/test/keycert3.pem +73 -0
- package/python3.6.2/lib/python3.6/test/keycert4.pem +73 -0
- package/python3.6.2/lib/python3.6/test/leakers/README.txt +32 -0
- package/python3.6.2/lib/python3.6/test/leakers/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/test/leakers/test_ctypes.py +15 -0
- package/python3.6.2/lib/python3.6/test/leakers/test_selftype.py +13 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/__init__.py +5 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/cmdline.py +387 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/main.py +584 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/refleak.py +294 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/runtest.py +254 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/runtest_mp.py +244 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/save_env.py +284 -0
- package/python3.6.2/lib/python3.6/test/libregrtest/setup.py +140 -0
- package/python3.6.2/lib/python3.6/test/list_tests.py +618 -0
- package/python3.6.2/lib/python3.6/test/lock_tests.py +936 -0
- package/python3.6.2/lib/python3.6/test/mailcap.txt +39 -0
- package/python3.6.2/lib/python3.6/test/make_ssl_certs.py +216 -0
- package/python3.6.2/lib/python3.6/test/mapping_tests.py +657 -0
- package/python3.6.2/lib/python3.6/test/math_testcases.txt +633 -0
- package/python3.6.2/lib/python3.6/test/memory_watchdog.py +28 -0
- package/python3.6.2/lib/python3.6/test/mime.types +1445 -0
- package/python3.6.2/lib/python3.6/test/mock_socket.py +159 -0
- package/python3.6.2/lib/python3.6/test/mod_generics_cache.py +53 -0
- package/python3.6.2/lib/python3.6/test/mp_fork_bomb.py +18 -0
- package/python3.6.2/lib/python3.6/test/mp_preload.py +18 -0
- package/python3.6.2/lib/python3.6/test/multibytecodec_support.py +384 -0
- package/python3.6.2/lib/python3.6/test/nokia.pem +31 -0
- package/python3.6.2/lib/python3.6/test/nullbytecert.pem +90 -0
- package/python3.6.2/lib/python3.6/test/nullcert.pem +0 -0
- package/python3.6.2/lib/python3.6/test/outstanding_bugs.py +18 -0
- package/python3.6.2/lib/python3.6/test/pickletester.py +2922 -0
- package/python3.6.2/lib/python3.6/test/profilee.py +115 -0
- package/python3.6.2/lib/python3.6/test/pstats.pck +0 -0
- package/python3.6.2/lib/python3.6/test/pycacert.pem +78 -0
- package/python3.6.2/lib/python3.6/test/pycakey.pem +28 -0
- package/python3.6.2/lib/python3.6/test/pyclbr_input.py +33 -0
- package/python3.6.2/lib/python3.6/test/pydoc_mod.py +37 -0
- package/python3.6.2/lib/python3.6/test/pydocfodder.py +216 -0
- package/python3.6.2/lib/python3.6/test/pystone.py +277 -0
- package/python3.6.2/lib/python3.6/test/pythoninfo.py +486 -0
- package/python3.6.2/lib/python3.6/test/randv2_32.pck +633 -0
- package/python3.6.2/lib/python3.6/test/randv2_64.pck +633 -0
- package/python3.6.2/lib/python3.6/test/randv3.pck +633 -0
- package/python3.6.2/lib/python3.6/test/re_tests.py +670 -0
- package/python3.6.2/lib/python3.6/test/regrtest.py +50 -0
- package/python3.6.2/lib/python3.6/test/relimport.py +1 -0
- package/python3.6.2/lib/python3.6/test/reperf.py +23 -0
- package/python3.6.2/lib/python3.6/test/revocation.crl +11 -0
- package/python3.6.2/lib/python3.6/test/sample_doctest.py +76 -0
- package/python3.6.2/lib/python3.6/test/sample_doctest_no_docstrings.py +12 -0
- package/python3.6.2/lib/python3.6/test/sample_doctest_no_doctests.py +15 -0
- package/python3.6.2/lib/python3.6/test/selfsigned_pythontestdotnet.pem +16 -0
- package/python3.6.2/lib/python3.6/test/seq_tests.py +414 -0
- package/python3.6.2/lib/python3.6/test/sgml_input.html +212 -0
- package/python3.6.2/lib/python3.6/test/signalinterproctester.py +84 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/README +5 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.8svx +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.aifc +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.au +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.hcom +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.sndt +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.voc +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.wav +0 -0
- package/python3.6.2/lib/python3.6/test/sortperf.py +169 -0
- package/python3.6.2/lib/python3.6/test/ssl_cert.pem +15 -0
- package/python3.6.2/lib/python3.6/test/ssl_key.passwd.pem +18 -0
- package/python3.6.2/lib/python3.6/test/ssl_key.pem +16 -0
- package/python3.6.2/lib/python3.6/test/ssl_servers.py +209 -0
- package/python3.6.2/lib/python3.6/test/ssltests.py +37 -0
- package/python3.6.2/lib/python3.6/test/string_tests.py +1383 -0
- package/python3.6.2/lib/python3.6/test/subprocessdata/fd_status.py +34 -0
- package/python3.6.2/lib/python3.6/test/subprocessdata/input_reader.py +7 -0
- package/python3.6.2/lib/python3.6/test/subprocessdata/qcat.py +7 -0
- package/python3.6.2/lib/python3.6/test/subprocessdata/qgrep.py +10 -0
- package/python3.6.2/lib/python3.6/test/subprocessdata/sigchild_ignore.py +15 -0
- package/python3.6.2/lib/python3.6/test/support/__init__.py +2706 -0
- package/python3.6.2/lib/python3.6/test/support/script_helper.py +259 -0
- package/python3.6.2/lib/python3.6/test/test___all__.py +109 -0
- package/python3.6.2/lib/python3.6/test/test___future__.py +61 -0
- package/python3.6.2/lib/python3.6/test/test__locale.py +193 -0
- package/python3.6.2/lib/python3.6/test/test__opcode.py +20 -0
- package/python3.6.2/lib/python3.6/test/test__osx_support.py +276 -0
- package/python3.6.2/lib/python3.6/test/test_abc.py +420 -0
- package/python3.6.2/lib/python3.6/test/test_abstract_numbers.py +44 -0
- package/python3.6.2/lib/python3.6/test/test_aifc.py +399 -0
- package/python3.6.2/lib/python3.6/test/test_argparse.py +5006 -0
- package/python3.6.2/lib/python3.6/test/test_array.py +1388 -0
- package/python3.6.2/lib/python3.6/test/test_asdl_parser.py +122 -0
- package/python3.6.2/lib/python3.6/test/test_ast.py +1170 -0
- package/python3.6.2/lib/python3.6/test/test_asyncgen.py +1044 -0
- package/python3.6.2/lib/python3.6/test/test_asynchat.py +308 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/__init__.py +10 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/echo.py +8 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/echo2.py +6 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/echo3.py +11 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/keycert3.pem +73 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/pycacert.pem +78 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/ssl_cert.pem +15 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/ssl_key.pem +16 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_base_events.py +1761 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_events.py +2791 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_futures.py +692 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_locks.py +943 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_pep492.py +232 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_proactor_events.py +593 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_queues.py +643 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_selector_events.py +1833 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_sslproto.py +134 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_streams.py +868 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_subprocess.py +532 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_tasks.py +2598 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_transports.py +91 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_unix_events.py +1621 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_windows_events.py +164 -0
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_windows_utils.py +182 -0
- package/python3.6.2/lib/python3.6/test/test_asyncore.py +847 -0
- package/python3.6.2/lib/python3.6/test/test_atexit.py +192 -0
- package/python3.6.2/lib/python3.6/test/test_audioop.py +565 -0
- package/python3.6.2/lib/python3.6/test/test_augassign.py +326 -0
- package/python3.6.2/lib/python3.6/test/test_base64.py +681 -0
- package/python3.6.2/lib/python3.6/test/test_baseexception.py +183 -0
- package/python3.6.2/lib/python3.6/test/test_bigaddrspace.py +101 -0
- package/python3.6.2/lib/python3.6/test/test_bigmem.py +1256 -0
- package/python3.6.2/lib/python3.6/test/test_binascii.py +373 -0
- package/python3.6.2/lib/python3.6/test/test_binhex.py +55 -0
- package/python3.6.2/lib/python3.6/test/test_binop.py +441 -0
- package/python3.6.2/lib/python3.6/test/test_bisect.py +328 -0
- package/python3.6.2/lib/python3.6/test/test_bool.py +368 -0
- package/python3.6.2/lib/python3.6/test/test_buffer.py +4396 -0
- package/python3.6.2/lib/python3.6/test/test_bufio.py +73 -0
- package/python3.6.2/lib/python3.6/test/test_builtin.py +1851 -0
- package/python3.6.2/lib/python3.6/test/test_bytes.py +1759 -0
- package/python3.6.2/lib/python3.6/test/test_bz2.py +1002 -0
- package/python3.6.2/lib/python3.6/test/test_calendar.py +848 -0
- package/python3.6.2/lib/python3.6/test/test_call.py +302 -0
- package/python3.6.2/lib/python3.6/test/test_capi.py +753 -0
- package/python3.6.2/lib/python3.6/test/test_cgi.py +539 -0
- package/python3.6.2/lib/python3.6/test/test_cgitb.py +67 -0
- package/python3.6.2/lib/python3.6/test/test_charmapcodec.py +53 -0
- package/python3.6.2/lib/python3.6/test/test_class.py +599 -0
- package/python3.6.2/lib/python3.6/test/test_cmath.py +643 -0
- package/python3.6.2/lib/python3.6/test/test_cmd.py +243 -0
- package/python3.6.2/lib/python3.6/test/test_cmd_line.py +494 -0
- package/python3.6.2/lib/python3.6/test/test_cmd_line_script.py +648 -0
- package/python3.6.2/lib/python3.6/test/test_code.py +367 -0
- package/python3.6.2/lib/python3.6/test/test_code_module.py +154 -0
- package/python3.6.2/lib/python3.6/test/test_codeccallbacks.py +1074 -0
- package/python3.6.2/lib/python3.6/test/test_codecencodings_cn.py +96 -0
- package/python3.6.2/lib/python3.6/test/test_codecencodings_hk.py +22 -0
- package/python3.6.2/lib/python3.6/test/test_codecencodings_iso2022.py +41 -0
- package/python3.6.2/lib/python3.6/test/test_codecencodings_jp.py +126 -0
- package/python3.6.2/lib/python3.6/test/test_codecencodings_kr.py +69 -0
- package/python3.6.2/lib/python3.6/test/test_codecencodings_tw.py +22 -0
- package/python3.6.2/lib/python3.6/test/test_codecmaps_cn.py +26 -0
- package/python3.6.2/lib/python3.6/test/test_codecmaps_hk.py +15 -0
- package/python3.6.2/lib/python3.6/test/test_codecmaps_jp.py +60 -0
- package/python3.6.2/lib/python3.6/test/test_codecmaps_kr.py +37 -0
- package/python3.6.2/lib/python3.6/test/test_codecmaps_tw.py +27 -0
- package/python3.6.2/lib/python3.6/test/test_codecs.py +3272 -0
- package/python3.6.2/lib/python3.6/test/test_codeop.py +299 -0
- package/python3.6.2/lib/python3.6/test/test_collections.py +1926 -0
- package/python3.6.2/lib/python3.6/test/test_colorsys.py +100 -0
- package/python3.6.2/lib/python3.6/test/test_compare.py +124 -0
- package/python3.6.2/lib/python3.6/test/test_compile.py +720 -0
- package/python3.6.2/lib/python3.6/test/test_compileall.py +547 -0
- package/python3.6.2/lib/python3.6/test/test_complex.py +688 -0
- package/python3.6.2/lib/python3.6/test/test_concurrent_futures.py +836 -0
- package/python3.6.2/lib/python3.6/test/test_configparser.py +2096 -0
- package/python3.6.2/lib/python3.6/test/test_contains.py +114 -0
- package/python3.6.2/lib/python3.6/test/test_contextlib.py +990 -0
- package/python3.6.2/lib/python3.6/test/test_copy.py +888 -0
- package/python3.6.2/lib/python3.6/test/test_copyreg.py +126 -0
- package/python3.6.2/lib/python3.6/test/test_coroutines.py +2151 -0
- package/python3.6.2/lib/python3.6/test/test_cprofile.py +98 -0
- package/python3.6.2/lib/python3.6/test/test_crashers.py +37 -0
- package/python3.6.2/lib/python3.6/test/test_crypt.py +45 -0
- package/python3.6.2/lib/python3.6/test/test_csv.py +1175 -0
- package/python3.6.2/lib/python3.6/test/test_ctypes.py +9 -0
- package/python3.6.2/lib/python3.6/test/test_curses.py +549 -0
- package/python3.6.2/lib/python3.6/test/test_datetime.py +57 -0
- package/python3.6.2/lib/python3.6/test/test_dbm.py +192 -0
- package/python3.6.2/lib/python3.6/test/test_dbm_dumb.py +286 -0
- package/python3.6.2/lib/python3.6/test/test_dbm_gnu.py +97 -0
- package/python3.6.2/lib/python3.6/test/test_dbm_ndbm.py +52 -0
- package/python3.6.2/lib/python3.6/test/test_decimal.py +5707 -0
- package/python3.6.2/lib/python3.6/test/test_decorators.py +304 -0
- package/python3.6.2/lib/python3.6/test/test_defaultdict.py +187 -0
- package/python3.6.2/lib/python3.6/test/test_deque.py +1059 -0
- package/python3.6.2/lib/python3.6/test/test_descr.py +5452 -0
- package/python3.6.2/lib/python3.6/test/test_descrtut.py +486 -0
- package/python3.6.2/lib/python3.6/test/test_devpoll.py +145 -0
- package/python3.6.2/lib/python3.6/test/test_dict.py +1217 -0
- package/python3.6.2/lib/python3.6/test/test_dict_version.py +186 -0
- package/python3.6.2/lib/python3.6/test/test_dictcomps.py +86 -0
- package/python3.6.2/lib/python3.6/test/test_dictviews.py +272 -0
- package/python3.6.2/lib/python3.6/test/test_difflib.py +478 -0
- package/python3.6.2/lib/python3.6/test/test_difflib_expect.html +526 -0
- package/python3.6.2/lib/python3.6/test/test_dis.py +960 -0
- package/python3.6.2/lib/python3.6/test/test_distutils.py +18 -0
- package/python3.6.2/lib/python3.6/test/test_doctest.py +2962 -0
- package/python3.6.2/lib/python3.6/test/test_doctest.txt +17 -0
- package/python3.6.2/lib/python3.6/test/test_doctest2.py +123 -0
- package/python3.6.2/lib/python3.6/test/test_doctest2.txt +14 -0
- package/python3.6.2/lib/python3.6/test/test_doctest3.txt +5 -0
- package/python3.6.2/lib/python3.6/test/test_doctest4.txt +11 -0
- package/python3.6.2/lib/python3.6/test/test_docxmlrpc.py +198 -0
- package/python3.6.2/lib/python3.6/test/test_dtrace.py +178 -0
- package/python3.6.2/lib/python3.6/test/test_dummy_thread.py +256 -0
- package/python3.6.2/lib/python3.6/test/test_dummy_threading.py +60 -0
- package/python3.6.2/lib/python3.6/test/test_dynamic.py +138 -0
- package/python3.6.2/lib/python3.6/test/test_dynamicclassattribute.py +300 -0
- package/python3.6.2/lib/python3.6/test/test_eintr.py +22 -0
- package/python3.6.2/lib/python3.6/test/test_email/__init__.py +166 -0
- package/python3.6.2/lib/python3.6/test/test_email/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/PyBanner048.gif +0 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/audiotest.au +0 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_01.txt +19 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_02.txt +136 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_03.txt +16 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_04.txt +37 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_05.txt +28 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_06.txt +33 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_07.txt +83 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_08.txt +24 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_09.txt +24 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_10.txt +39 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_11.txt +7 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_12.txt +36 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_12a.txt +38 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_13.txt +94 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_14.txt +23 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_15.txt +52 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_16.txt +123 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_17.txt +12 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_18.txt +6 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_19.txt +43 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_20.txt +22 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_21.txt +20 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_22.txt +46 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_23.txt +8 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_24.txt +10 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_25.txt +117 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_26.txt +46 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_27.txt +15 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_28.txt +25 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_29.txt +22 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_30.txt +23 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_31.txt +15 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_32.txt +14 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_33.txt +29 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_34.txt +19 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_35.txt +4 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_36.txt +40 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_37.txt +22 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_38.txt +101 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_39.txt +83 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_40.txt +10 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_41.txt +8 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_42.txt +20 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_43.txt +217 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_44.txt +33 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_45.txt +33 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_46.txt +23 -0
- package/python3.6.2/lib/python3.6/test/test_email/test__encoded_words.py +192 -0
- package/python3.6.2/lib/python3.6/test/test_email/test__header_value_parser.py +2723 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_asian_codecs.py +81 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_contentmanager.py +796 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_defect_handling.py +320 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_email.py +5402 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_generator.py +296 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_headerregistry.py +1653 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_inversion.py +70 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_message.py +803 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_parser.py +110 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_pickleable.py +76 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_policy.py +346 -0
- package/python3.6.2/lib/python3.6/test/test_email/test_utils.py +163 -0
- package/python3.6.2/lib/python3.6/test/test_email/torture_test.py +133 -0
- package/python3.6.2/lib/python3.6/test/test_ensurepip.py +310 -0
- package/python3.6.2/lib/python3.6/test/test_enum.py +2618 -0
- package/python3.6.2/lib/python3.6/test/test_enumerate.py +269 -0
- package/python3.6.2/lib/python3.6/test/test_eof.py +28 -0
- package/python3.6.2/lib/python3.6/test/test_epoll.py +255 -0
- package/python3.6.2/lib/python3.6/test/test_errno.py +35 -0
- package/python3.6.2/lib/python3.6/test/test_exception_hierarchy.py +204 -0
- package/python3.6.2/lib/python3.6/test/test_exception_variations.py +176 -0
- package/python3.6.2/lib/python3.6/test/test_exceptions.py +1288 -0
- package/python3.6.2/lib/python3.6/test/test_extcall.py +465 -0
- package/python3.6.2/lib/python3.6/test/test_faulthandler.py +817 -0
- package/python3.6.2/lib/python3.6/test/test_fcntl.py +152 -0
- package/python3.6.2/lib/python3.6/test/test_file.py +329 -0
- package/python3.6.2/lib/python3.6/test/test_file_eintr.py +252 -0
- package/python3.6.2/lib/python3.6/test/test_filecmp.py +217 -0
- package/python3.6.2/lib/python3.6/test/test_fileinput.py +1015 -0
- package/python3.6.2/lib/python3.6/test/test_fileio.py +595 -0
- package/python3.6.2/lib/python3.6/test/test_finalization.py +519 -0
- package/python3.6.2/lib/python3.6/test/test_float.py +1422 -0
- package/python3.6.2/lib/python3.6/test/test_flufl.py +22 -0
- package/python3.6.2/lib/python3.6/test/test_fnmatch.py +128 -0
- package/python3.6.2/lib/python3.6/test/test_fork1.py +112 -0
- package/python3.6.2/lib/python3.6/test/test_format.py +494 -0
- package/python3.6.2/lib/python3.6/test/test_fractions.py +635 -0
- package/python3.6.2/lib/python3.6/test/test_frame.py +165 -0
- package/python3.6.2/lib/python3.6/test/test_fstring.py +1038 -0
- package/python3.6.2/lib/python3.6/test/test_ftplib.py +1091 -0
- package/python3.6.2/lib/python3.6/test/test_funcattrs.py +377 -0
- package/python3.6.2/lib/python3.6/test/test_functools.py +2083 -0
- package/python3.6.2/lib/python3.6/test/test_future.py +108 -0
- package/python3.6.2/lib/python3.6/test/test_future3.py +26 -0
- package/python3.6.2/lib/python3.6/test/test_future4.py +6 -0
- package/python3.6.2/lib/python3.6/test/test_future5.py +21 -0
- package/python3.6.2/lib/python3.6/test/test_gc.py +1031 -0
- package/python3.6.2/lib/python3.6/test/test_gdb.py +936 -0
- package/python3.6.2/lib/python3.6/test/test_generator_stop.py +34 -0
- package/python3.6.2/lib/python3.6/test/test_generators.py +2232 -0
- package/python3.6.2/lib/python3.6/test/test_genericpath.py +537 -0
- package/python3.6.2/lib/python3.6/test/test_genexps.py +285 -0
- package/python3.6.2/lib/python3.6/test/test_getargs2.py +958 -0
- package/python3.6.2/lib/python3.6/test/test_getopt.py +184 -0
- package/python3.6.2/lib/python3.6/test/test_getpass.py +163 -0
- package/python3.6.2/lib/python3.6/test/test_gettext.py +770 -0
- package/python3.6.2/lib/python3.6/test/test_glob.py +317 -0
- package/python3.6.2/lib/python3.6/test/test_global.py +61 -0
- package/python3.6.2/lib/python3.6/test/test_grammar.py +1417 -0
- package/python3.6.2/lib/python3.6/test/test_grp.py +108 -0
- package/python3.6.2/lib/python3.6/test/test_gzip.py +672 -0
- package/python3.6.2/lib/python3.6/test/test_hash.py +346 -0
- package/python3.6.2/lib/python3.6/test/test_hashlib.py +954 -0
- package/python3.6.2/lib/python3.6/test/test_heapq.py +427 -0
- package/python3.6.2/lib/python3.6/test/test_hmac.py +496 -0
- package/python3.6.2/lib/python3.6/test/test_html.py +103 -0
- package/python3.6.2/lib/python3.6/test/test_htmlparser.py +778 -0
- package/python3.6.2/lib/python3.6/test/test_http_cookiejar.py +1772 -0
- package/python3.6.2/lib/python3.6/test/test_http_cookies.py +472 -0
- package/python3.6.2/lib/python3.6/test/test_httplib.py +1903 -0
- package/python3.6.2/lib/python3.6/test/test_httpservers.py +1060 -0
- package/python3.6.2/lib/python3.6/test/test_idle.py +23 -0
- package/python3.6.2/lib/python3.6/test/test_imaplib.py +998 -0
- package/python3.6.2/lib/python3.6/test/test_imghdr.py +140 -0
- package/python3.6.2/lib/python3.6/test/test_imp.py +416 -0
- package/python3.6.2/lib/python3.6/test/test_import/__init__.py +1199 -0
- package/python3.6.2/lib/python3.6/test/test_import/__main__.py +3 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/basic.py +2 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/basic2.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/indirect.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/rebinding.py +3 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/rebinding2.py +3 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/subpackage.py +2 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/subpkg/subpackage2.py +2 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/subpkg/util.py +2 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/util.py +2 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/package/__init__.py +2 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/package/submodule.py +0 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/package2/submodule1.py +3 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/package2/submodule2.py +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/__init__.py +5 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/abc.py +94 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/__init__.py +5 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/test_finder.py +90 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/test_loader.py +108 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/__init__.py +5 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_case_sensitivity.py +46 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_finder.py +44 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_loader.py +277 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_path_hook.py +31 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/__init__.py +5 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/test_finder.py +84 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/test_loader.py +225 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/__init__.py +5 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test___loader__.py +75 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test___package__.py +163 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_api.py +119 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_caching.py +93 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_fromlist.py +175 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_meta_path.py +125 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_packages.py +110 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_path.py +257 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_relative_imports.py +232 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/both_portions/foo/one.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/both_portions/foo/two.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/missing_directory.zip +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/nested_portion1.zip +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/one.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/portion1/foo/one.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/portion2/foo/two.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/project1/parent/child/one.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/project2/parent/child/two.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/project3/parent/child/three.py +1 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/top_level_portion1.zip +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/__init__.py +5 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_case_sensitivity.py +85 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_file_loader.py +602 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_finder.py +236 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_path_hook.py +41 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_source_encoding.py +175 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_abc.py +953 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_api.py +449 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_lazy.py +145 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_locks.py +175 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_namespace_pkgs.py +321 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_spec.py +819 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_util.py +805 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/test_windows.py +109 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/util.py +388 -0
- package/python3.6.2/lib/python3.6/test/test_index.py +275 -0
- package/python3.6.2/lib/python3.6/test/test_inspect.py +3725 -0
- package/python3.6.2/lib/python3.6/test/test_int.py +518 -0
- package/python3.6.2/lib/python3.6/test/test_int_literal.py +143 -0
- package/python3.6.2/lib/python3.6/test/test_io.py +4054 -0
- package/python3.6.2/lib/python3.6/test/test_ioctl.py +91 -0
- package/python3.6.2/lib/python3.6/test/test_ipaddress.py +1972 -0
- package/python3.6.2/lib/python3.6/test/test_isinstance.py +280 -0
- package/python3.6.2/lib/python3.6/test/test_iter.py +1016 -0
- package/python3.6.2/lib/python3.6/test/test_iterlen.py +228 -0
- package/python3.6.2/lib/python3.6/test/test_itertools.py +2340 -0
- package/python3.6.2/lib/python3.6/test/test_json/__init__.py +56 -0
- package/python3.6.2/lib/python3.6/test/test_json/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_decode.py +97 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_default.py +12 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_dump.py +68 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_encode_basestring_ascii.py +48 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_enum.py +120 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_fail.py +216 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_float.py +33 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_indent.py +67 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_pass1.py +75 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_pass2.py +18 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_pass3.py +24 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_recursion.py +100 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_scanstring.py +141 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_separators.py +50 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_speedups.py +71 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_tool.py +107 -0
- package/python3.6.2/lib/python3.6/test/test_json/test_unicode.py +98 -0
- package/python3.6.2/lib/python3.6/test/test_keyword.py +138 -0
- package/python3.6.2/lib/python3.6/test/test_keywordonlyarg.py +189 -0
- package/python3.6.2/lib/python3.6/test/test_kqueue.py +263 -0
- package/python3.6.2/lib/python3.6/test/test_largefile.py +180 -0
- package/python3.6.2/lib/python3.6/test/test_lib2to3.py +5 -0
- package/python3.6.2/lib/python3.6/test/test_linecache.py +242 -0
- package/python3.6.2/lib/python3.6/test/test_list.py +155 -0
- package/python3.6.2/lib/python3.6/test/test_listcomps.py +148 -0
- package/python3.6.2/lib/python3.6/test/test_locale.py +587 -0
- package/python3.6.2/lib/python3.6/test/test_logging.py +4442 -0
- package/python3.6.2/lib/python3.6/test/test_long.py +1322 -0
- package/python3.6.2/lib/python3.6/test/test_longexp.py +10 -0
- package/python3.6.2/lib/python3.6/test/test_lzma.py +1764 -0
- package/python3.6.2/lib/python3.6/test/test_macpath.py +149 -0
- package/python3.6.2/lib/python3.6/test/test_macurl2path.py +31 -0
- package/python3.6.2/lib/python3.6/test/test_mailbox.py +2288 -0
- package/python3.6.2/lib/python3.6/test/test_mailcap.py +239 -0
- package/python3.6.2/lib/python3.6/test/test_marshal.py +556 -0
- package/python3.6.2/lib/python3.6/test/test_math.py +1422 -0
- package/python3.6.2/lib/python3.6/test/test_memoryio.py +842 -0
- package/python3.6.2/lib/python3.6/test/test_memoryview.py +537 -0
- package/python3.6.2/lib/python3.6/test/test_metaclass.py +265 -0
- package/python3.6.2/lib/python3.6/test/test_mimetypes.py +111 -0
- package/python3.6.2/lib/python3.6/test/test_minidom.py +1574 -0
- package/python3.6.2/lib/python3.6/test/test_mmap.py +803 -0
- package/python3.6.2/lib/python3.6/test/test_module.py +244 -0
- package/python3.6.2/lib/python3.6/test/test_modulefinder.py +337 -0
- package/python3.6.2/lib/python3.6/test/test_msilib.py +99 -0
- package/python3.6.2/lib/python3.6/test/test_multibytecodec.py +270 -0
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_fork.py +13 -0
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_forkserver.py +12 -0
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_main_handling.py +290 -0
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_spawn.py +12 -0
- package/python3.6.2/lib/python3.6/test/test_netrc.py +133 -0
- package/python3.6.2/lib/python3.6/test/test_nis.py +39 -0
- package/python3.6.2/lib/python3.6/test/test_nntplib.py +1581 -0
- package/python3.6.2/lib/python3.6/test/test_normalization.py +108 -0
- package/python3.6.2/lib/python3.6/test/test_ntpath.py +539 -0
- package/python3.6.2/lib/python3.6/test/test_numeric_tower.py +202 -0
- package/python3.6.2/lib/python3.6/test/test_opcodes.py +135 -0
- package/python3.6.2/lib/python3.6/test/test_openpty.py +21 -0
- package/python3.6.2/lib/python3.6/test/test_operator.py +609 -0
- package/python3.6.2/lib/python3.6/test/test_optparse.py +1664 -0
- package/python3.6.2/lib/python3.6/test/test_ordered_dict.py +787 -0
- package/python3.6.2/lib/python3.6/test/test_os.py +3548 -0
- package/python3.6.2/lib/python3.6/test/test_ossaudiodev.py +202 -0
- package/python3.6.2/lib/python3.6/test/test_osx_env.py +34 -0
- package/python3.6.2/lib/python3.6/test/test_parser.py +905 -0
- package/python3.6.2/lib/python3.6/test/test_pathlib.py +2252 -0
- package/python3.6.2/lib/python3.6/test/test_pdb.py +1124 -0
- package/python3.6.2/lib/python3.6/test/test_peepholer.py +325 -0
- package/python3.6.2/lib/python3.6/test/test_pickle.py +514 -0
- package/python3.6.2/lib/python3.6/test/test_pickletools.py +99 -0
- package/python3.6.2/lib/python3.6/test/test_pipes.py +203 -0
- package/python3.6.2/lib/python3.6/test/test_pkg.py +295 -0
- package/python3.6.2/lib/python3.6/test/test_pkgimport.py +80 -0
- package/python3.6.2/lib/python3.6/test/test_pkgutil.py +491 -0
- package/python3.6.2/lib/python3.6/test/test_platform.py +370 -0
- package/python3.6.2/lib/python3.6/test/test_plistlib.py +662 -0
- package/python3.6.2/lib/python3.6/test/test_poll.py +238 -0
- package/python3.6.2/lib/python3.6/test/test_popen.py +65 -0
- package/python3.6.2/lib/python3.6/test/test_poplib.py +520 -0
- package/python3.6.2/lib/python3.6/test/test_posix.py +1298 -0
- package/python3.6.2/lib/python3.6/test/test_posixpath.py +680 -0
- package/python3.6.2/lib/python3.6/test/test_pow.py +123 -0
- package/python3.6.2/lib/python3.6/test/test_pprint.py +1012 -0
- package/python3.6.2/lib/python3.6/test/test_print.py +193 -0
- package/python3.6.2/lib/python3.6/test/test_profile.py +187 -0
- package/python3.6.2/lib/python3.6/test/test_property.py +272 -0
- package/python3.6.2/lib/python3.6/test/test_pstats.py +38 -0
- package/python3.6.2/lib/python3.6/test/test_pty.py +316 -0
- package/python3.6.2/lib/python3.6/test/test_pulldom.py +342 -0
- package/python3.6.2/lib/python3.6/test/test_pwd.py +125 -0
- package/python3.6.2/lib/python3.6/test/test_py_compile.py +127 -0
- package/python3.6.2/lib/python3.6/test/test_pyclbr.py +176 -0
- package/python3.6.2/lib/python3.6/test/test_pydoc.py +1107 -0
- package/python3.6.2/lib/python3.6/test/test_pyexpat.py +733 -0
- package/python3.6.2/lib/python3.6/test/test_queue.py +362 -0
- package/python3.6.2/lib/python3.6/test/test_quopri.py +210 -0
- package/python3.6.2/lib/python3.6/test/test_raise.py +419 -0
- package/python3.6.2/lib/python3.6/test/test_random.py +939 -0
- package/python3.6.2/lib/python3.6/test/test_range.py +693 -0
- package/python3.6.2/lib/python3.6/test/test_re.py +2087 -0
- package/python3.6.2/lib/python3.6/test/test_readline.py +309 -0
- package/python3.6.2/lib/python3.6/test/test_regrtest.py +967 -0
- package/python3.6.2/lib/python3.6/test/test_repl.py +62 -0
- package/python3.6.2/lib/python3.6/test/test_reprlib.py +405 -0
- package/python3.6.2/lib/python3.6/test/test_resource.py +180 -0
- package/python3.6.2/lib/python3.6/test/test_richcmp.py +355 -0
- package/python3.6.2/lib/python3.6/test/test_rlcompleter.py +141 -0
- package/python3.6.2/lib/python3.6/test/test_robotparser.py +335 -0
- package/python3.6.2/lib/python3.6/test/test_runpy.py +749 -0
- package/python3.6.2/lib/python3.6/test/test_sax.py +1273 -0
- package/python3.6.2/lib/python3.6/test/test_sched.py +204 -0
- package/python3.6.2/lib/python3.6/test/test_scope.py +761 -0
- package/python3.6.2/lib/python3.6/test/test_script_helper.py +110 -0
- package/python3.6.2/lib/python3.6/test/test_secrets.py +124 -0
- package/python3.6.2/lib/python3.6/test/test_select.py +82 -0
- package/python3.6.2/lib/python3.6/test/test_selectors.py +526 -0
- package/python3.6.2/lib/python3.6/test/test_set.py +1903 -0
- package/python3.6.2/lib/python3.6/test/test_setcomps.py +151 -0
- package/python3.6.2/lib/python3.6/test/test_shelve.py +228 -0
- package/python3.6.2/lib/python3.6/test/test_shlex.py +318 -0
- package/python3.6.2/lib/python3.6/test/test_shutil.py +1925 -0
- package/python3.6.2/lib/python3.6/test/test_signal.py +1093 -0
- package/python3.6.2/lib/python3.6/test/test_site.py +595 -0
- package/python3.6.2/lib/python3.6/test/test_slice.py +255 -0
- package/python3.6.2/lib/python3.6/test/test_smtpd.py +1013 -0
- package/python3.6.2/lib/python3.6/test/test_smtplib.py +1292 -0
- package/python3.6.2/lib/python3.6/test/test_smtpnet.py +83 -0
- package/python3.6.2/lib/python3.6/test/test_sndhdr.py +37 -0
- package/python3.6.2/lib/python3.6/test/test_socket.py +5648 -0
- package/python3.6.2/lib/python3.6/test/test_socketserver.py +505 -0
- package/python3.6.2/lib/python3.6/test/test_sort.py +265 -0
- package/python3.6.2/lib/python3.6/test/test_source_encoding.py +225 -0
- package/python3.6.2/lib/python3.6/test/test_spwd.py +75 -0
- package/python3.6.2/lib/python3.6/test/test_sqlite.py +24 -0
- package/python3.6.2/lib/python3.6/test/test_ssl.py +3663 -0
- package/python3.6.2/lib/python3.6/test/test_startfile.py +34 -0
- package/python3.6.2/lib/python3.6/test/test_stat.py +234 -0
- package/python3.6.2/lib/python3.6/test/test_statistics.py +1992 -0
- package/python3.6.2/lib/python3.6/test/test_strftime.py +206 -0
- package/python3.6.2/lib/python3.6/test/test_string.py +439 -0
- package/python3.6.2/lib/python3.6/test/test_string_literals.py +249 -0
- package/python3.6.2/lib/python3.6/test/test_stringprep.py +92 -0
- package/python3.6.2/lib/python3.6/test/test_strptime.py +673 -0
- package/python3.6.2/lib/python3.6/test/test_strtod.py +433 -0
- package/python3.6.2/lib/python3.6/test/test_struct.py +756 -0
- package/python3.6.2/lib/python3.6/test/test_structmembers.py +144 -0
- package/python3.6.2/lib/python3.6/test/test_structseq.py +126 -0
- package/python3.6.2/lib/python3.6/test/test_subclassinit.py +284 -0
- package/python3.6.2/lib/python3.6/test/test_subprocess.py +3005 -0
- package/python3.6.2/lib/python3.6/test/test_sunau.py +121 -0
- package/python3.6.2/lib/python3.6/test/test_sundry.py +57 -0
- package/python3.6.2/lib/python3.6/test/test_super.py +347 -0
- package/python3.6.2/lib/python3.6/test/test_support.py +459 -0
- package/python3.6.2/lib/python3.6/test/test_symbol.py +54 -0
- package/python3.6.2/lib/python3.6/test/test_symtable.py +193 -0
- package/python3.6.2/lib/python3.6/test/test_syntax.py +618 -0
- package/python3.6.2/lib/python3.6/test/test_sys.py +1270 -0
- package/python3.6.2/lib/python3.6/test/test_sys_setprofile.py +376 -0
- package/python3.6.2/lib/python3.6/test/test_sys_settrace.py +854 -0
- package/python3.6.2/lib/python3.6/test/test_sysconfig.py +445 -0
- package/python3.6.2/lib/python3.6/test/test_syslog.py +40 -0
- package/python3.6.2/lib/python3.6/test/test_tarfile.py +2635 -0
- package/python3.6.2/lib/python3.6/test/test_tcl.py +715 -0
- package/python3.6.2/lib/python3.6/test/test_telnetlib.py +401 -0
- package/python3.6.2/lib/python3.6/test/test_tempfile.py +1458 -0
- package/python3.6.2/lib/python3.6/test/test_textwrap.py +981 -0
- package/python3.6.2/lib/python3.6/test/test_thread.py +269 -0
- package/python3.6.2/lib/python3.6/test/test_threaded_import.py +254 -0
- package/python3.6.2/lib/python3.6/test/test_threadedtempfile.py +62 -0
- package/python3.6.2/lib/python3.6/test/test_threading.py +1170 -0
- package/python3.6.2/lib/python3.6/test/test_threading_local.py +220 -0
- package/python3.6.2/lib/python3.6/test/test_threadsignals.py +227 -0
- package/python3.6.2/lib/python3.6/test/test_time.py +1000 -0
- package/python3.6.2/lib/python3.6/test/test_timeit.py +381 -0
- package/python3.6.2/lib/python3.6/test/test_timeout.py +303 -0
- package/python3.6.2/lib/python3.6/test/test_tix.py +32 -0
- package/python3.6.2/lib/python3.6/test/test_tk.py +15 -0
- package/python3.6.2/lib/python3.6/test/test_tokenize.py +1590 -0
- package/python3.6.2/lib/python3.6/test/test_tools/__init__.py +24 -0
- package/python3.6.2/lib/python3.6/test/test_tools/__main__.py +4 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_fixcid.py +92 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_gprof2html.py +35 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_i18n.py +72 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_md5sum.py +76 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_pdeps.py +32 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_pindent.py +339 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_reindent.py +35 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_sundry.py +53 -0
- package/python3.6.2/lib/python3.6/test/test_tools/test_unparse.py +313 -0
- package/python3.6.2/lib/python3.6/test/test_trace.py +391 -0
- package/python3.6.2/lib/python3.6/test/test_traceback.py +1111 -0
- package/python3.6.2/lib/python3.6/test/test_tracemalloc.py +994 -0
- package/python3.6.2/lib/python3.6/test/test_ttk_guionly.py +34 -0
- package/python3.6.2/lib/python3.6/test/test_ttk_textonly.py +13 -0
- package/python3.6.2/lib/python3.6/test/test_tuple.py +221 -0
- package/python3.6.2/lib/python3.6/test/test_turtle.py +436 -0
- package/python3.6.2/lib/python3.6/test/test_typechecks.py +71 -0
- package/python3.6.2/lib/python3.6/test/test_types.py +1550 -0
- package/python3.6.2/lib/python3.6/test/test_typing.py +2577 -0
- package/python3.6.2/lib/python3.6/test/test_ucn.py +237 -0
- package/python3.6.2/lib/python3.6/test/test_unary.py +53 -0
- package/python3.6.2/lib/python3.6/test/test_unicode.py +2894 -0
- package/python3.6.2/lib/python3.6/test/test_unicode_file.py +140 -0
- package/python3.6.2/lib/python3.6/test/test_unicode_file_functions.py +195 -0
- package/python3.6.2/lib/python3.6/test/test_unicode_identifiers.py +31 -0
- package/python3.6.2/lib/python3.6/test/test_unicodedata.py +316 -0
- package/python3.6.2/lib/python3.6/test/test_unittest.py +16 -0
- package/python3.6.2/lib/python3.6/test/test_univnewlines.py +123 -0
- package/python3.6.2/lib/python3.6/test/test_unpack.py +151 -0
- package/python3.6.2/lib/python3.6/test/test_unpack_ex.py +365 -0
- package/python3.6.2/lib/python3.6/test/test_urllib.py +1572 -0
- package/python3.6.2/lib/python3.6/test/test_urllib2.py +1930 -0
- package/python3.6.2/lib/python3.6/test/test_urllib2_localnet.py +679 -0
- package/python3.6.2/lib/python3.6/test/test_urllib2net.py +329 -0
- package/python3.6.2/lib/python3.6/test/test_urllib_response.py +59 -0
- package/python3.6.2/lib/python3.6/test/test_urllibnet.py +218 -0
- package/python3.6.2/lib/python3.6/test/test_urlparse.py +1122 -0
- package/python3.6.2/lib/python3.6/test/test_userdict.py +220 -0
- package/python3.6.2/lib/python3.6/test/test_userlist.py +63 -0
- package/python3.6.2/lib/python3.6/test/test_userstring.py +44 -0
- package/python3.6.2/lib/python3.6/test/test_utf8source.py +43 -0
- package/python3.6.2/lib/python3.6/test/test_uu.py +260 -0
- package/python3.6.2/lib/python3.6/test/test_uuid.py +511 -0
- package/python3.6.2/lib/python3.6/test/test_venv.py +433 -0
- package/python3.6.2/lib/python3.6/test/test_wait3.py +38 -0
- package/python3.6.2/lib/python3.6/test/test_wait4.py +39 -0
- package/python3.6.2/lib/python3.6/test/test_warnings/__init__.py +1216 -0
- package/python3.6.2/lib/python3.6/test/test_warnings/__main__.py +3 -0
- package/python3.6.2/lib/python3.6/test/test_warnings/data/import_warning.py +3 -0
- package/python3.6.2/lib/python3.6/test/test_warnings/data/stacklevel.py +9 -0
- package/python3.6.2/lib/python3.6/test/test_wave.py +113 -0
- package/python3.6.2/lib/python3.6/test/test_weakref.py +1952 -0
- package/python3.6.2/lib/python3.6/test/test_weakset.py +439 -0
- package/python3.6.2/lib/python3.6/test/test_webbrowser.py +217 -0
- package/python3.6.2/lib/python3.6/test/test_winconsoleio.py +191 -0
- package/python3.6.2/lib/python3.6/test/test_winreg.py +498 -0
- package/python3.6.2/lib/python3.6/test/test_winsound.py +150 -0
- package/python3.6.2/lib/python3.6/test/test_with.py +746 -0
- package/python3.6.2/lib/python3.6/test/test_wsgiref.py +785 -0
- package/python3.6.2/lib/python3.6/test/test_xdrlib.py +77 -0
- package/python3.6.2/lib/python3.6/test/test_xml_dom_minicompat.py +138 -0
- package/python3.6.2/lib/python3.6/test/test_xml_etree.py +3166 -0
- package/python3.6.2/lib/python3.6/test/test_xml_etree_c.py +188 -0
- package/python3.6.2/lib/python3.6/test/test_xmlrpc.py +1415 -0
- package/python3.6.2/lib/python3.6/test/test_xmlrpc_net.py +32 -0
- package/python3.6.2/lib/python3.6/test/test_yield_from.py +1052 -0
- package/python3.6.2/lib/python3.6/test/test_zipapp.py +349 -0
- package/python3.6.2/lib/python3.6/test/test_zipfile.py +2241 -0
- package/python3.6.2/lib/python3.6/test/test_zipfile64.py +155 -0
- package/python3.6.2/lib/python3.6/test/test_zipimport.py +759 -0
- package/python3.6.2/lib/python3.6/test/test_zipimport_support.py +244 -0
- package/python3.6.2/lib/python3.6/test/test_zlib.py +898 -0
- package/python3.6.2/lib/python3.6/test/testcodec.py +48 -0
- package/python3.6.2/lib/python3.6/test/testtar.tar +0 -0
- package/python3.6.2/lib/python3.6/test/tf_inherit_check.py +27 -0
- package/python3.6.2/lib/python3.6/test/threaded_import_hangers.py +45 -0
- package/python3.6.2/lib/python3.6/test/time_hashlib.py +88 -0
- package/python3.6.2/lib/python3.6/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt +13 -0
- package/python3.6.2/lib/python3.6/test/tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt +11 -0
- package/python3.6.2/lib/python3.6/test/tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt +13 -0
- package/python3.6.2/lib/python3.6/test/tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt +12 -0
- package/python3.6.2/lib/python3.6/test/tokenize_tests.txt +189 -0
- package/python3.6.2/lib/python3.6/test/tracedmodules/__init__.py +4 -0
- package/python3.6.2/lib/python3.6/test/tracedmodules/testmod.py +9 -0
- package/python3.6.2/lib/python3.6/test/win_console_handler.py +49 -0
- package/python3.6.2/lib/python3.6/test/wrongcert.pem +32 -0
- package/python3.6.2/lib/python3.6/test/xmltestdata/expat224_utf8_bug.xml +2 -0
- package/python3.6.2/lib/python3.6/test/xmltestdata/simple-ns.xml +7 -0
- package/python3.6.2/lib/python3.6/test/xmltestdata/simple.xml +6 -0
- package/python3.6.2/lib/python3.6/test/xmltestdata/test.xml +115 -0
- package/python3.6.2/lib/python3.6/test/xmltestdata/test.xml.out +115 -0
- package/python3.6.2/lib/python3.6/test/xmltests.py +21 -0
- package/python3.6.2/lib/python3.6/test/zip_cp437_header.zip +0 -0
- package/python3.6.2/lib/python3.6/test/zipdir.zip +0 -0
- package/python3.6.2/lib/python3.6/textwrap.py +488 -0
- package/python3.6.2/lib/python3.6/this.py +28 -0
- package/python3.6.2/lib/python3.6/threading.py +1357 -0
- package/python3.6.2/lib/python3.6/timeit.py +362 -0
- package/python3.6.2/lib/python3.6/tkinter/__init__.py +4002 -0
- package/python3.6.2/lib/python3.6/tkinter/__main__.py +7 -0
- package/python3.6.2/lib/python3.6/tkinter/colorchooser.py +72 -0
- package/python3.6.2/lib/python3.6/tkinter/commondialog.py +55 -0
- package/python3.6.2/lib/python3.6/tkinter/constants.py +110 -0
- package/python3.6.2/lib/python3.6/tkinter/dialog.py +46 -0
- package/python3.6.2/lib/python3.6/tkinter/dnd.py +321 -0
- package/python3.6.2/lib/python3.6/tkinter/filedialog.py +479 -0
- package/python3.6.2/lib/python3.6/tkinter/font.py +232 -0
- package/python3.6.2/lib/python3.6/tkinter/messagebox.py +134 -0
- package/python3.6.2/lib/python3.6/tkinter/scrolledtext.py +54 -0
- package/python3.6.2/lib/python3.6/tkinter/simpledialog.py +423 -0
- package/python3.6.2/lib/python3.6/tkinter/test/README +14 -0
- package/python3.6.2/lib/python3.6/tkinter/test/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/tkinter/test/runtktests.py +69 -0
- package/python3.6.2/lib/python3.6/tkinter/test/support.py +105 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_font.py +96 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_geometry_managers.py +906 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_images.py +327 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_loadtk.py +46 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_misc.py +55 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_text.py +47 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_variables.py +310 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_widgets.py +1204 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_extensions.py +323 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_functions.py +461 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_style.py +92 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_widgets.py +1707 -0
- package/python3.6.2/lib/python3.6/tkinter/test/widget_tests.py +548 -0
- package/python3.6.2/lib/python3.6/tkinter/tix.py +1946 -0
- package/python3.6.2/lib/python3.6/tkinter/ttk.py +1655 -0
- package/python3.6.2/lib/python3.6/token.py +143 -0
- package/python3.6.2/lib/python3.6/tokenize.py +793 -0
- package/python3.6.2/lib/python3.6/trace.py +742 -0
- package/python3.6.2/lib/python3.6/traceback.py +600 -0
- package/python3.6.2/lib/python3.6/tracemalloc.py +524 -0
- package/python3.6.2/lib/python3.6/tty.py +36 -0
- package/python3.6.2/lib/python3.6/turtle.py +4139 -0
- package/python3.6.2/lib/python3.6/turtledemo/__init__.py +14 -0
- package/python3.6.2/lib/python3.6/turtledemo/__main__.py +386 -0
- package/python3.6.2/lib/python3.6/turtledemo/bytedesign.py +161 -0
- package/python3.6.2/lib/python3.6/turtledemo/chaos.py +59 -0
- package/python3.6.2/lib/python3.6/turtledemo/clock.py +132 -0
- package/python3.6.2/lib/python3.6/turtledemo/colormixer.py +58 -0
- package/python3.6.2/lib/python3.6/turtledemo/forest.py +108 -0
- package/python3.6.2/lib/python3.6/turtledemo/fractalcurves.py +138 -0
- package/python3.6.2/lib/python3.6/turtledemo/lindenmayer.py +119 -0
- package/python3.6.2/lib/python3.6/turtledemo/minimal_hanoi.py +79 -0
- package/python3.6.2/lib/python3.6/turtledemo/nim.py +226 -0
- package/python3.6.2/lib/python3.6/turtledemo/paint.py +54 -0
- package/python3.6.2/lib/python3.6/turtledemo/peace.py +61 -0
- package/python3.6.2/lib/python3.6/turtledemo/penrose.py +181 -0
- package/python3.6.2/lib/python3.6/turtledemo/planet_and_moon.py +111 -0
- package/python3.6.2/lib/python3.6/turtledemo/round_dance.py +86 -0
- package/python3.6.2/lib/python3.6/turtledemo/sorting_animate.py +204 -0
- package/python3.6.2/lib/python3.6/turtledemo/tree.py +63 -0
- package/python3.6.2/lib/python3.6/turtledemo/turtle.cfg +10 -0
- package/python3.6.2/lib/python3.6/turtledemo/two_canvases.py +54 -0
- package/python3.6.2/lib/python3.6/turtledemo/wikipedia.py +65 -0
- package/python3.6.2/lib/python3.6/turtledemo/yinyang.py +49 -0
- package/python3.6.2/lib/python3.6/types.py +266 -0
- package/python3.6.2/lib/python3.6/typing.py +2403 -0
- package/python3.6.2/lib/python3.6/unittest/__init__.py +78 -0
- package/python3.6.2/lib/python3.6/unittest/__main__.py +18 -0
- package/python3.6.2/lib/python3.6/unittest/case.py +1429 -0
- package/python3.6.2/lib/python3.6/unittest/loader.py +508 -0
- package/python3.6.2/lib/python3.6/unittest/main.py +260 -0
- package/python3.6.2/lib/python3.6/unittest/mock.py +2407 -0
- package/python3.6.2/lib/python3.6/unittest/result.py +216 -0
- package/python3.6.2/lib/python3.6/unittest/runner.py +221 -0
- package/python3.6.2/lib/python3.6/unittest/signals.py +71 -0
- package/python3.6.2/lib/python3.6/unittest/suite.py +321 -0
- package/python3.6.2/lib/python3.6/unittest/test/__init__.py +22 -0
- package/python3.6.2/lib/python3.6/unittest/test/__main__.py +18 -0
- package/python3.6.2/lib/python3.6/unittest/test/_test_warnings.py +73 -0
- package/python3.6.2/lib/python3.6/unittest/test/dummy.py +1 -0
- package/python3.6.2/lib/python3.6/unittest/test/support.py +138 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_assertions.py +411 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_break.py +291 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_case.py +1833 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_discovery.py +872 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_functiontestcase.py +148 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_loader.py +1529 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_program.py +414 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_result.py +695 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_runner.py +353 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_setups.py +507 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_skipping.py +260 -0
- package/python3.6.2/lib/python3.6/unittest/test/test_suite.py +447 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/__init__.py +17 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/__main__.py +18 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/support.py +21 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testcallable.py +151 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testhelpers.py +946 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testmagicmethods.py +468 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testmock.py +1569 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testpatch.py +1853 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testsentinel.py +28 -0
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testwith.py +301 -0
- package/python3.6.2/lib/python3.6/unittest/util.py +177 -0
- package/python3.6.2/lib/python3.6/urllib/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/urllib/error.py +77 -0
- package/python3.6.2/lib/python3.6/urllib/parse.py +1021 -0
- package/python3.6.2/lib/python3.6/urllib/request.py +2739 -0
- package/python3.6.2/lib/python3.6/urllib/response.py +80 -0
- package/python3.6.2/lib/python3.6/urllib/robotparser.py +250 -0
- package/python3.6.2/lib/python3.6/uu.py +199 -0
- package/python3.6.2/lib/python3.6/uuid.py +629 -0
- package/python3.6.2/lib/python3.6/venv/__init__.py +425 -0
- package/python3.6.2/lib/python3.6/venv/__main__.py +10 -0
- package/python3.6.2/lib/python3.6/venv/scripts/nt/Activate.ps1 +51 -0
- package/python3.6.2/lib/python3.6/venv/scripts/nt/activate.bat +32 -0
- package/python3.6.2/lib/python3.6/venv/scripts/nt/deactivate.bat +21 -0
- package/python3.6.2/lib/python3.6/warnings.py +526 -0
- package/python3.6.2/lib/python3.6/wave.py +505 -0
- package/python3.6.2/lib/python3.6/weakref.py +632 -0
- package/python3.6.2/lib/python3.6/webbrowser.py +664 -0
- package/python3.6.2/lib/python3.6/wsgiref/__init__.py +23 -0
- package/python3.6.2/lib/python3.6/wsgiref/handlers.py +557 -0
- package/python3.6.2/lib/python3.6/wsgiref/headers.py +184 -0
- package/python3.6.2/lib/python3.6/wsgiref/simple_server.py +164 -0
- package/python3.6.2/lib/python3.6/wsgiref/util.py +165 -0
- package/python3.6.2/lib/python3.6/wsgiref/validate.py +443 -0
- package/python3.6.2/lib/python3.6/xdrlib.py +241 -0
- package/python3.6.2/lib/python3.6/xml/__init__.py +20 -0
- package/python3.6.2/lib/python3.6/xml/dom/NodeFilter.py +27 -0
- package/python3.6.2/lib/python3.6/xml/dom/__init__.py +140 -0
- package/python3.6.2/lib/python3.6/xml/dom/domreg.py +97 -0
- package/python3.6.2/lib/python3.6/xml/dom/expatbuilder.py +965 -0
- package/python3.6.2/lib/python3.6/xml/dom/minicompat.py +109 -0
- package/python3.6.2/lib/python3.6/xml/dom/minidom.py +1981 -0
- package/python3.6.2/lib/python3.6/xml/dom/pulldom.py +342 -0
- package/python3.6.2/lib/python3.6/xml/dom/xmlbuilder.py +410 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementInclude.py +143 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementPath.py +314 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementTree.py +1656 -0
- package/python3.6.2/lib/python3.6/xml/etree/__init__.py +33 -0
- package/python3.6.2/lib/python3.6/xml/etree/cElementTree.py +3 -0
- package/python3.6.2/lib/python3.6/xml/parsers/__init__.py +8 -0
- package/python3.6.2/lib/python3.6/xml/parsers/expat.py +8 -0
- package/python3.6.2/lib/python3.6/xml/sax/__init__.py +107 -0
- package/python3.6.2/lib/python3.6/xml/sax/_exceptions.py +131 -0
- package/python3.6.2/lib/python3.6/xml/sax/expatreader.py +446 -0
- package/python3.6.2/lib/python3.6/xml/sax/handler.py +342 -0
- package/python3.6.2/lib/python3.6/xml/sax/saxutils.py +368 -0
- package/python3.6.2/lib/python3.6/xml/sax/xmlreader.py +380 -0
- package/python3.6.2/lib/python3.6/xmlrpc/__init__.py +1 -0
- package/python3.6.2/lib/python3.6/xmlrpc/client.py +1518 -0
- package/python3.6.2/lib/python3.6/xmlrpc/server.py +1002 -0
- package/python3.6.2/lib/python3.6/zipapp.py +201 -0
- package/python3.6.2/lib/python3.6/zipfile.py +2036 -0
- package/python3.6.2/lib/python3.6/LICENSE.txt +0 -254
- package/python3.6.2/lib/python3.6/__future__.pyc +0 -0
- package/python3.6.2/lib/python3.6/__phello__.foo.pyc +0 -0
- package/python3.6.2/lib/python3.6/_bootlocale.pyc +0 -0
- package/python3.6.2/lib/python3.6/_collections_abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/_compat_pickle.pyc +0 -0
- package/python3.6.2/lib/python3.6/_compression.pyc +0 -0
- package/python3.6.2/lib/python3.6/_dummy_thread.pyc +0 -0
- package/python3.6.2/lib/python3.6/_markupbase.pyc +0 -0
- package/python3.6.2/lib/python3.6/_osx_support.pyc +0 -0
- package/python3.6.2/lib/python3.6/_pydecimal.pyc +0 -0
- package/python3.6.2/lib/python3.6/_pyio.pyc +0 -0
- package/python3.6.2/lib/python3.6/_sitebuiltins.pyc +0 -0
- package/python3.6.2/lib/python3.6/_strptime.pyc +0 -0
- package/python3.6.2/lib/python3.6/_threading_local.pyc +0 -0
- package/python3.6.2/lib/python3.6/_weakrefset.pyc +0 -0
- package/python3.6.2/lib/python3.6/abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/aifc.pyc +0 -0
- package/python3.6.2/lib/python3.6/android.pyc +0 -0
- package/python3.6.2/lib/python3.6/antigravity.pyc +0 -0
- package/python3.6.2/lib/python3.6/argparse.pyc +0 -0
- package/python3.6.2/lib/python3.6/ast.pyc +0 -0
- package/python3.6.2/lib/python3.6/asynchat.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_futures.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_subprocess.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_tasks.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/compat.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/constants.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/coroutines.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/futures.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/locks.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/log.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/proactor_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/protocols.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/queues.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/selector_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/sslproto.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/streams.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/subprocess.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/tasks.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/test_utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/transports.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/unix_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/windows_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/windows_utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncore.pyc +0 -0
- package/python3.6.2/lib/python3.6/base64.pyc +0 -0
- package/python3.6.2/lib/python3.6/bdb.pyc +0 -0
- package/python3.6.2/lib/python3.6/binhex.pyc +0 -0
- package/python3.6.2/lib/python3.6/bisect.pyc +0 -0
- package/python3.6.2/lib/python3.6/bz2.pyc +0 -0
- package/python3.6.2/lib/python3.6/cProfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/calendar.pyc +0 -0
- package/python3.6.2/lib/python3.6/cgi.pyc +0 -0
- package/python3.6.2/lib/python3.6/cgitb.pyc +0 -0
- package/python3.6.2/lib/python3.6/chunk.pyc +0 -0
- package/python3.6.2/lib/python3.6/cmd.pyc +0 -0
- package/python3.6.2/lib/python3.6/code.pyc +0 -0
- package/python3.6.2/lib/python3.6/codecs.pyc +0 -0
- package/python3.6.2/lib/python3.6/codeop.pyc +0 -0
- package/python3.6.2/lib/python3.6/collections/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/collections/abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/colorsys.pyc +0 -0
- package/python3.6.2/lib/python3.6/compileall.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/_base.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/process.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/thread.pyc +0 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Makefile +0 -1808
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Setup +0 -397
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Setup.config +0 -10
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Setup.local +0 -1
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/config.c +0 -114
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/config.c.in +0 -67
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/install-sh +0 -294
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/makesetup +0 -296
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/python-config.pyc +0 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/python.o +0 -0
- package/python3.6.2/lib/python3.6/configparser.pyc +0 -0
- package/python3.6.2/lib/python3.6/contextlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/copy.pyc +0 -0
- package/python3.6.2/lib/python3.6/copyreg.pyc +0 -0
- package/python3.6.2/lib/python3.6/crypt.pyc +0 -0
- package/python3.6.2/lib/python3.6/csv.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/_endian.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/dyld.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/dylib.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/framework.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/wintypes.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/ascii.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/has_key.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/panel.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/textpad.pyc +0 -0
- package/python3.6.2/lib/python3.6/datetime.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/dumb.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/gnu.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/ndbm.pyc +0 -0
- package/python3.6.2/lib/python3.6/decimal.pyc +0 -0
- package/python3.6.2/lib/python3.6/difflib.pyc +0 -0
- package/python3.6.2/lib/python3.6/dis.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/_msvccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/archive_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/bcppcompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/ccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/cmd.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_dumb.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_msi.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_rpm.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_wininst.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_clib.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_ext.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_py.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_scripts.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/check.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/clean.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/config.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_data.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_egg_info.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_headers.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_lib.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_scripts.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/register.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/sdist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/upload.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/config.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/core.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/cygwinccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/debug.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/dep_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/dir_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/dist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/errors.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/extension.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/fancy_getopt.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/file_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/filelist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/log.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/msvc9compiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/msvccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/spawn.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/sysconfig.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/text_file.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/unixccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/version.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/versionpredicate.pyc +0 -0
- package/python3.6.2/lib/python3.6/doctest.pyc +0 -0
- package/python3.6.2/lib/python3.6/dummy_threading.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_encoded_words.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_header_value_parser.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_parseaddr.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_policybase.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/base64mime.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/charset.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/contentmanager.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/encoders.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/errors.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/feedparser.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/generator.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/header.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/headerregistry.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/iterators.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/message.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/application.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/audio.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/base.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/image.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/message.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/multipart.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/nonmultipart.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/text.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/parser.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/policy.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/quoprimime.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/aliases.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/ascii.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/base64_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/big5.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/big5hkscs.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/bz2_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/charmap.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp037.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1006.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1026.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1125.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1140.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1250.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1251.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1252.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1253.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1254.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1255.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1256.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1257.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1258.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp273.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp424.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp437.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp500.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp65001.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp720.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp737.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp775.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp850.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp852.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp855.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp856.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp857.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp858.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp860.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp861.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp862.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp863.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp864.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp865.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp866.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp869.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp874.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp875.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp932.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp949.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp950.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jis_2004.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jisx0213.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jp.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_kr.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/gb18030.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/gb2312.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/gbk.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/hex_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/hp_roman8.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/hz.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/idna.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_1.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2004.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_3.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_ext.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_kr.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_1.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_10.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_11.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_13.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_14.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_15.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_16.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_2.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_3.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_4.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_5.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_6.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_7.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_8.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_9.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/johab.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_r.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_t.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_u.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/kz1048.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/latin_1.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_arabic.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_centeuro.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_croatian.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_cyrillic.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_farsi.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_greek.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_iceland.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_latin2.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_roman.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_romanian.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_turkish.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mbcs.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/oem.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/palmos.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/ptcp154.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/punycode.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/quopri_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/raw_unicode_escape.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/rot_13.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jis.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jis_2004.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jisx0213.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/tis_620.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/undefined.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/unicode_escape.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/unicode_internal.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16_be.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16_le.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32_be.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32_le.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_7.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_8.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_8_sig.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/uu_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/zlib_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/ensurepip/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ensurepip/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ensurepip/_uninstall.pyc +0 -0
- package/python3.6.2/lib/python3.6/enum.pyc +0 -0
- package/python3.6.2/lib/python3.6/filecmp.pyc +0 -0
- package/python3.6.2/lib/python3.6/fileinput.pyc +0 -0
- package/python3.6.2/lib/python3.6/fnmatch.pyc +0 -0
- package/python3.6.2/lib/python3.6/formatter.pyc +0 -0
- package/python3.6.2/lib/python3.6/fractions.pyc +0 -0
- package/python3.6.2/lib/python3.6/ftplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/functools.pyc +0 -0
- package/python3.6.2/lib/python3.6/genericpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/getopt.pyc +0 -0
- package/python3.6.2/lib/python3.6/getpass.pyc +0 -0
- package/python3.6.2/lib/python3.6/gettext.pyc +0 -0
- package/python3.6.2/lib/python3.6/glob.pyc +0 -0
- package/python3.6.2/lib/python3.6/gzip.pyc +0 -0
- package/python3.6.2/lib/python3.6/hashlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/heapq.pyc +0 -0
- package/python3.6.2/lib/python3.6/hmac.pyc +0 -0
- package/python3.6.2/lib/python3.6/html/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/html/entities.pyc +0 -0
- package/python3.6.2/lib/python3.6/html/parser.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/client.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/cookiejar.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/cookies.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/server.pyc +0 -0
- package/python3.6.2/lib/python3.6/imaplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/imghdr.pyc +0 -0
- package/python3.6.2/lib/python3.6/imp.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/_bootstrap.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/_bootstrap_external.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/machinery.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/inspect.pyc +0 -0
- package/python3.6.2/lib/python3.6/io.pyc +0 -0
- package/python3.6.2/lib/python3.6/ipaddress.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/decoder.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/encoder.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/scanner.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/tool.pyc +0 -0
- package/python3.6.2/lib/python3.6/keyword.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/Grammar3.6.3.final.0.pickle +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/PatternGrammar3.6.3.final.0.pickle +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/btm_matcher.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/btm_utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixer_base.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixer_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_apply.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_asserts.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_basestring.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_buffer.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_dict.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_except.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exec.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_execfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exitfunc.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_filter.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_funcattrs.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_future.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_getcwdu.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_has_key.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_idioms.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_import.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports2.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_input.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_intern.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_isinstance.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools_imports.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_long.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_map.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_metaclass.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_methodattrs.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ne.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_next.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_nonzero.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_numliterals.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_operator.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_paren.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_print.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raise.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raw_input.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reduce.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reload.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_renames.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_repr.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_set_literal.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_standarderror.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_sys_exc.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_throw.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_tuple_params.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_types.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_unicode.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_urllib.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ws_comma.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xrange.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xreadlines.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_zip.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/main.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/patcomp.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/conv.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/driver.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/grammar.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/literals.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/parse.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/pgen.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/token.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/tokenize.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pygram.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pytree.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/refactor.pyc +0 -0
- package/python3.6.2/lib/python3.6/linecache.pyc +0 -0
- package/python3.6.2/lib/python3.6/locale.pyc +0 -0
- package/python3.6.2/lib/python3.6/logging/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/logging/config.pyc +0 -0
- package/python3.6.2/lib/python3.6/logging/handlers.pyc +0 -0
- package/python3.6.2/lib/python3.6/lzma.pyc +0 -0
- package/python3.6.2/lib/python3.6/macpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/macurl2path.pyc +0 -0
- package/python3.6.2/lib/python3.6/mailbox.pyc +0 -0
- package/python3.6.2/lib/python3.6/mailcap.pyc +0 -0
- package/python3.6.2/lib/python3.6/mimetypes.pyc +0 -0
- package/python3.6.2/lib/python3.6/modulefinder.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/connection.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/context.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/connection.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/forkserver.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/heap.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/managers.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/pool.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_fork.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_forkserver.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_posix.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_win32.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/process.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/queues.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/reduction.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/resource_sharer.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/semaphore_tracker.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/sharedctypes.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/spawn.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/synchronize.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/netrc.pyc +0 -0
- package/python3.6.2/lib/python3.6/nntplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/ntpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/nturl2path.pyc +0 -0
- package/python3.6.2/lib/python3.6/numbers.pyc +0 -0
- package/python3.6.2/lib/python3.6/opcode.pyc +0 -0
- package/python3.6.2/lib/python3.6/operator.pyc +0 -0
- package/python3.6.2/lib/python3.6/optparse.pyc +0 -0
- package/python3.6.2/lib/python3.6/os.pyc +0 -0
- package/python3.6.2/lib/python3.6/pathlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/pdb.pyc +0 -0
- package/python3.6.2/lib/python3.6/pickle.pyc +0 -0
- package/python3.6.2/lib/python3.6/pickletools.pyc +0 -0
- package/python3.6.2/lib/python3.6/pipes.pyc +0 -0
- package/python3.6.2/lib/python3.6/pkgutil.pyc +0 -0
- package/python3.6.2/lib/python3.6/platform.pyc +0 -0
- package/python3.6.2/lib/python3.6/plistlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/poplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/posixpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/pprint.pyc +0 -0
- package/python3.6.2/lib/python3.6/profile.pyc +0 -0
- package/python3.6.2/lib/python3.6/pstats.pyc +0 -0
- package/python3.6.2/lib/python3.6/pty.pyc +0 -0
- package/python3.6.2/lib/python3.6/py_compile.pyc +0 -0
- package/python3.6.2/lib/python3.6/pyclbr.pyc +0 -0
- package/python3.6.2/lib/python3.6/pydoc.pyc +0 -0
- package/python3.6.2/lib/python3.6/pydoc_data/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/pydoc_data/topics.pyc +0 -0
- package/python3.6.2/lib/python3.6/queue.pyc +0 -0
- package/python3.6.2/lib/python3.6/quopri.pyc +0 -0
- package/python3.6.2/lib/python3.6/random.pyc +0 -0
- package/python3.6.2/lib/python3.6/re.pyc +0 -0
- package/python3.6.2/lib/python3.6/reprlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/rlcompleter.pyc +0 -0
- package/python3.6.2/lib/python3.6/runpy.pyc +0 -0
- package/python3.6.2/lib/python3.6/sched.pyc +0 -0
- package/python3.6.2/lib/python3.6/secrets.pyc +0 -0
- package/python3.6.2/lib/python3.6/selectors.pyc +0 -0
- package/python3.6.2/lib/python3.6/shelve.pyc +0 -0
- package/python3.6.2/lib/python3.6/shlex.pyc +0 -0
- package/python3.6.2/lib/python3.6/shutil.pyc +0 -0
- package/python3.6.2/lib/python3.6/signal.pyc +0 -0
- package/python3.6.2/lib/python3.6/site.pyc +0 -0
- package/python3.6.2/lib/python3.6/smtpd.pyc +0 -0
- package/python3.6.2/lib/python3.6/smtplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/sndhdr.pyc +0 -0
- package/python3.6.2/lib/python3.6/socket.pyc +0 -0
- package/python3.6.2/lib/python3.6/socketserver.pyc +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/dbapi2.pyc +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/dump.pyc +0 -0
- package/python3.6.2/lib/python3.6/sre_compile.pyc +0 -0
- package/python3.6.2/lib/python3.6/sre_constants.pyc +0 -0
- package/python3.6.2/lib/python3.6/sre_parse.pyc +0 -0
- package/python3.6.2/lib/python3.6/ssl.pyc +0 -0
- package/python3.6.2/lib/python3.6/stat.pyc +0 -0
- package/python3.6.2/lib/python3.6/statistics.pyc +0 -0
- package/python3.6.2/lib/python3.6/string.pyc +0 -0
- package/python3.6.2/lib/python3.6/stringprep.pyc +0 -0
- package/python3.6.2/lib/python3.6/struct.pyc +0 -0
- package/python3.6.2/lib/python3.6/subprocess.pyc +0 -0
- package/python3.6.2/lib/python3.6/sunau.pyc +0 -0
- package/python3.6.2/lib/python3.6/symbol.pyc +0 -0
- package/python3.6.2/lib/python3.6/symtable.pyc +0 -0
- package/python3.6.2/lib/python3.6/sysconfig.pyc +0 -0
- package/python3.6.2/lib/python3.6/tabnanny.pyc +0 -0
- package/python3.6.2/lib/python3.6/tarfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/telnetlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/tempfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/textwrap.pyc +0 -0
- package/python3.6.2/lib/python3.6/this.pyc +0 -0
- package/python3.6.2/lib/python3.6/threading.pyc +0 -0
- package/python3.6.2/lib/python3.6/timeit.pyc +0 -0
- package/python3.6.2/lib/python3.6/token.pyc +0 -0
- package/python3.6.2/lib/python3.6/tokenize.pyc +0 -0
- package/python3.6.2/lib/python3.6/trace.pyc +0 -0
- package/python3.6.2/lib/python3.6/traceback.pyc +0 -0
- package/python3.6.2/lib/python3.6/tracemalloc.pyc +0 -0
- package/python3.6.2/lib/python3.6/tty.pyc +0 -0
- package/python3.6.2/lib/python3.6/turtle.pyc +0 -0
- package/python3.6.2/lib/python3.6/types.pyc +0 -0
- package/python3.6.2/lib/python3.6/typing.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/case.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/loader.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/main.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/mock.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/result.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/runner.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/signals.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/suite.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/error.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/parse.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/request.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/response.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/robotparser.pyc +0 -0
- package/python3.6.2/lib/python3.6/uu.pyc +0 -0
- package/python3.6.2/lib/python3.6/uuid.pyc +0 -0
- package/python3.6.2/lib/python3.6/venv/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/venv/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/warnings.pyc +0 -0
- package/python3.6.2/lib/python3.6/wave.pyc +0 -0
- package/python3.6.2/lib/python3.6/weakref.pyc +0 -0
- package/python3.6.2/lib/python3.6/webbrowser.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/handlers.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/headers.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/simple_server.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/validate.pyc +0 -0
- package/python3.6.2/lib/python3.6/xdrlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/NodeFilter.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/domreg.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/expatbuilder.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/minicompat.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/minidom.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/pulldom.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/xmlbuilder.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementInclude.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementPath.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementTree.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/cElementTree.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/parsers/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/parsers/expat.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/_exceptions.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/expatreader.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/handler.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/saxutils.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/xmlreader.pyc +0 -0
- package/python3.6.2/lib/python3.6/xmlrpc/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xmlrpc/client.pyc +0 -0
- package/python3.6.2/lib/python3.6/xmlrpc/server.pyc +0 -0
- package/python3.6.2/lib/python3.6/zipapp.pyc +0 -0
- package/python3.6.2/lib/python3.6/zipfile.pyc +0 -0
|
@@ -0,0 +1,3272 @@
|
|
|
1
|
+
import codecs
|
|
2
|
+
import contextlib
|
|
3
|
+
import io
|
|
4
|
+
import locale
|
|
5
|
+
import sys
|
|
6
|
+
import unittest
|
|
7
|
+
import encodings
|
|
8
|
+
|
|
9
|
+
from test import support
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
import ctypes
|
|
13
|
+
except ImportError:
|
|
14
|
+
ctypes = None
|
|
15
|
+
SIZEOF_WCHAR_T = -1
|
|
16
|
+
else:
|
|
17
|
+
SIZEOF_WCHAR_T = ctypes.sizeof(ctypes.c_wchar)
|
|
18
|
+
|
|
19
|
+
def coding_checker(self, coder):
|
|
20
|
+
def check(input, expect):
|
|
21
|
+
self.assertEqual(coder(input), (expect, len(input)))
|
|
22
|
+
return check
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Queue(object):
|
|
26
|
+
"""
|
|
27
|
+
queue: write bytes at one end, read bytes from the other end
|
|
28
|
+
"""
|
|
29
|
+
def __init__(self, buffer):
|
|
30
|
+
self._buffer = buffer
|
|
31
|
+
|
|
32
|
+
def write(self, chars):
|
|
33
|
+
self._buffer += chars
|
|
34
|
+
|
|
35
|
+
def read(self, size=-1):
|
|
36
|
+
if size<0:
|
|
37
|
+
s = self._buffer
|
|
38
|
+
self._buffer = self._buffer[:0] # make empty
|
|
39
|
+
return s
|
|
40
|
+
else:
|
|
41
|
+
s = self._buffer[:size]
|
|
42
|
+
self._buffer = self._buffer[size:]
|
|
43
|
+
return s
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class MixInCheckStateHandling:
|
|
47
|
+
def check_state_handling_decode(self, encoding, u, s):
|
|
48
|
+
for i in range(len(s)+1):
|
|
49
|
+
d = codecs.getincrementaldecoder(encoding)()
|
|
50
|
+
part1 = d.decode(s[:i])
|
|
51
|
+
state = d.getstate()
|
|
52
|
+
self.assertIsInstance(state[1], int)
|
|
53
|
+
# Check that the condition stated in the documentation for
|
|
54
|
+
# IncrementalDecoder.getstate() holds
|
|
55
|
+
if not state[1]:
|
|
56
|
+
# reset decoder to the default state without anything buffered
|
|
57
|
+
d.setstate((state[0][:0], 0))
|
|
58
|
+
# Feeding the previous input may not produce any output
|
|
59
|
+
self.assertTrue(not d.decode(state[0]))
|
|
60
|
+
# The decoder must return to the same state
|
|
61
|
+
self.assertEqual(state, d.getstate())
|
|
62
|
+
# Create a new decoder and set it to the state
|
|
63
|
+
# we extracted from the old one
|
|
64
|
+
d = codecs.getincrementaldecoder(encoding)()
|
|
65
|
+
d.setstate(state)
|
|
66
|
+
part2 = d.decode(s[i:], True)
|
|
67
|
+
self.assertEqual(u, part1+part2)
|
|
68
|
+
|
|
69
|
+
def check_state_handling_encode(self, encoding, u, s):
|
|
70
|
+
for i in range(len(u)+1):
|
|
71
|
+
d = codecs.getincrementalencoder(encoding)()
|
|
72
|
+
part1 = d.encode(u[:i])
|
|
73
|
+
state = d.getstate()
|
|
74
|
+
d = codecs.getincrementalencoder(encoding)()
|
|
75
|
+
d.setstate(state)
|
|
76
|
+
part2 = d.encode(u[i:], True)
|
|
77
|
+
self.assertEqual(s, part1+part2)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class ReadTest(MixInCheckStateHandling):
|
|
81
|
+
def check_partial(self, input, partialresults):
|
|
82
|
+
# get a StreamReader for the encoding and feed the bytestring version
|
|
83
|
+
# of input to the reader byte by byte. Read everything available from
|
|
84
|
+
# the StreamReader and check that the results equal the appropriate
|
|
85
|
+
# entries from partialresults.
|
|
86
|
+
q = Queue(b"")
|
|
87
|
+
r = codecs.getreader(self.encoding)(q)
|
|
88
|
+
result = ""
|
|
89
|
+
for (c, partialresult) in zip(input.encode(self.encoding), partialresults):
|
|
90
|
+
q.write(bytes([c]))
|
|
91
|
+
result += r.read()
|
|
92
|
+
self.assertEqual(result, partialresult)
|
|
93
|
+
# check that there's nothing left in the buffers
|
|
94
|
+
self.assertEqual(r.read(), "")
|
|
95
|
+
self.assertEqual(r.bytebuffer, b"")
|
|
96
|
+
|
|
97
|
+
# do the check again, this time using an incremental decoder
|
|
98
|
+
d = codecs.getincrementaldecoder(self.encoding)()
|
|
99
|
+
result = ""
|
|
100
|
+
for (c, partialresult) in zip(input.encode(self.encoding), partialresults):
|
|
101
|
+
result += d.decode(bytes([c]))
|
|
102
|
+
self.assertEqual(result, partialresult)
|
|
103
|
+
# check that there's nothing left in the buffers
|
|
104
|
+
self.assertEqual(d.decode(b"", True), "")
|
|
105
|
+
self.assertEqual(d.buffer, b"")
|
|
106
|
+
|
|
107
|
+
# Check whether the reset method works properly
|
|
108
|
+
d.reset()
|
|
109
|
+
result = ""
|
|
110
|
+
for (c, partialresult) in zip(input.encode(self.encoding), partialresults):
|
|
111
|
+
result += d.decode(bytes([c]))
|
|
112
|
+
self.assertEqual(result, partialresult)
|
|
113
|
+
# check that there's nothing left in the buffers
|
|
114
|
+
self.assertEqual(d.decode(b"", True), "")
|
|
115
|
+
self.assertEqual(d.buffer, b"")
|
|
116
|
+
|
|
117
|
+
# check iterdecode()
|
|
118
|
+
encoded = input.encode(self.encoding)
|
|
119
|
+
self.assertEqual(
|
|
120
|
+
input,
|
|
121
|
+
"".join(codecs.iterdecode([bytes([c]) for c in encoded], self.encoding))
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
def test_readline(self):
|
|
125
|
+
def getreader(input):
|
|
126
|
+
stream = io.BytesIO(input.encode(self.encoding))
|
|
127
|
+
return codecs.getreader(self.encoding)(stream)
|
|
128
|
+
|
|
129
|
+
def readalllines(input, keepends=True, size=None):
|
|
130
|
+
reader = getreader(input)
|
|
131
|
+
lines = []
|
|
132
|
+
while True:
|
|
133
|
+
line = reader.readline(size=size, keepends=keepends)
|
|
134
|
+
if not line:
|
|
135
|
+
break
|
|
136
|
+
lines.append(line)
|
|
137
|
+
return "|".join(lines)
|
|
138
|
+
|
|
139
|
+
s = "foo\nbar\r\nbaz\rspam\u2028eggs"
|
|
140
|
+
sexpected = "foo\n|bar\r\n|baz\r|spam\u2028|eggs"
|
|
141
|
+
sexpectednoends = "foo|bar|baz|spam|eggs"
|
|
142
|
+
self.assertEqual(readalllines(s, True), sexpected)
|
|
143
|
+
self.assertEqual(readalllines(s, False), sexpectednoends)
|
|
144
|
+
self.assertEqual(readalllines(s, True, 10), sexpected)
|
|
145
|
+
self.assertEqual(readalllines(s, False, 10), sexpectednoends)
|
|
146
|
+
|
|
147
|
+
lineends = ("\n", "\r\n", "\r", "\u2028")
|
|
148
|
+
# Test long lines (multiple calls to read() in readline())
|
|
149
|
+
vw = []
|
|
150
|
+
vwo = []
|
|
151
|
+
for (i, lineend) in enumerate(lineends):
|
|
152
|
+
vw.append((i*200+200)*"\u3042" + lineend)
|
|
153
|
+
vwo.append((i*200+200)*"\u3042")
|
|
154
|
+
self.assertEqual(readalllines("".join(vw), True), "|".join(vw))
|
|
155
|
+
self.assertEqual(readalllines("".join(vw), False), "|".join(vwo))
|
|
156
|
+
|
|
157
|
+
# Test lines where the first read might end with \r, so the
|
|
158
|
+
# reader has to look ahead whether this is a lone \r or a \r\n
|
|
159
|
+
for size in range(80):
|
|
160
|
+
for lineend in lineends:
|
|
161
|
+
s = 10*(size*"a" + lineend + "xxx\n")
|
|
162
|
+
reader = getreader(s)
|
|
163
|
+
for i in range(10):
|
|
164
|
+
self.assertEqual(
|
|
165
|
+
reader.readline(keepends=True),
|
|
166
|
+
size*"a" + lineend,
|
|
167
|
+
)
|
|
168
|
+
self.assertEqual(
|
|
169
|
+
reader.readline(keepends=True),
|
|
170
|
+
"xxx\n",
|
|
171
|
+
)
|
|
172
|
+
reader = getreader(s)
|
|
173
|
+
for i in range(10):
|
|
174
|
+
self.assertEqual(
|
|
175
|
+
reader.readline(keepends=False),
|
|
176
|
+
size*"a",
|
|
177
|
+
)
|
|
178
|
+
self.assertEqual(
|
|
179
|
+
reader.readline(keepends=False),
|
|
180
|
+
"xxx",
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
def test_mixed_readline_and_read(self):
|
|
184
|
+
lines = ["Humpty Dumpty sat on a wall,\n",
|
|
185
|
+
"Humpty Dumpty had a great fall.\r\n",
|
|
186
|
+
"All the king's horses and all the king's men\r",
|
|
187
|
+
"Couldn't put Humpty together again."]
|
|
188
|
+
data = ''.join(lines)
|
|
189
|
+
def getreader():
|
|
190
|
+
stream = io.BytesIO(data.encode(self.encoding))
|
|
191
|
+
return codecs.getreader(self.encoding)(stream)
|
|
192
|
+
|
|
193
|
+
# Issue #8260: Test readline() followed by read()
|
|
194
|
+
f = getreader()
|
|
195
|
+
self.assertEqual(f.readline(), lines[0])
|
|
196
|
+
self.assertEqual(f.read(), ''.join(lines[1:]))
|
|
197
|
+
self.assertEqual(f.read(), '')
|
|
198
|
+
|
|
199
|
+
# Issue #32110: Test readline() followed by read(n)
|
|
200
|
+
f = getreader()
|
|
201
|
+
self.assertEqual(f.readline(), lines[0])
|
|
202
|
+
self.assertEqual(f.read(1), lines[1][0])
|
|
203
|
+
self.assertEqual(f.read(0), '')
|
|
204
|
+
self.assertEqual(f.read(100), data[len(lines[0]) + 1:][:100])
|
|
205
|
+
|
|
206
|
+
# Issue #16636: Test readline() followed by readlines()
|
|
207
|
+
f = getreader()
|
|
208
|
+
self.assertEqual(f.readline(), lines[0])
|
|
209
|
+
self.assertEqual(f.readlines(), lines[1:])
|
|
210
|
+
self.assertEqual(f.read(), '')
|
|
211
|
+
|
|
212
|
+
# Test read(n) followed by read()
|
|
213
|
+
f = getreader()
|
|
214
|
+
self.assertEqual(f.read(size=40, chars=5), data[:5])
|
|
215
|
+
self.assertEqual(f.read(), data[5:])
|
|
216
|
+
self.assertEqual(f.read(), '')
|
|
217
|
+
|
|
218
|
+
# Issue #32110: Test read(n) followed by read(n)
|
|
219
|
+
f = getreader()
|
|
220
|
+
self.assertEqual(f.read(size=40, chars=5), data[:5])
|
|
221
|
+
self.assertEqual(f.read(1), data[5])
|
|
222
|
+
self.assertEqual(f.read(0), '')
|
|
223
|
+
self.assertEqual(f.read(100), data[6:106])
|
|
224
|
+
|
|
225
|
+
# Issue #12446: Test read(n) followed by readlines()
|
|
226
|
+
f = getreader()
|
|
227
|
+
self.assertEqual(f.read(size=40, chars=5), data[:5])
|
|
228
|
+
self.assertEqual(f.readlines(), [lines[0][5:]] + lines[1:])
|
|
229
|
+
self.assertEqual(f.read(), '')
|
|
230
|
+
|
|
231
|
+
def test_bug1175396(self):
|
|
232
|
+
s = [
|
|
233
|
+
'<%!--===================================================\r\n',
|
|
234
|
+
' BLOG index page: show recent articles,\r\n',
|
|
235
|
+
' today\'s articles, or articles of a specific date.\r\n',
|
|
236
|
+
'========================================================--%>\r\n',
|
|
237
|
+
'<%@inputencoding="ISO-8859-1"%>\r\n',
|
|
238
|
+
'<%@pagetemplate=TEMPLATE.y%>\r\n',
|
|
239
|
+
'<%@import=import frog.util, frog%>\r\n',
|
|
240
|
+
'<%@import=import frog.objects%>\r\n',
|
|
241
|
+
'<%@import=from frog.storageerrors import StorageError%>\r\n',
|
|
242
|
+
'<%\r\n',
|
|
243
|
+
'\r\n',
|
|
244
|
+
'import logging\r\n',
|
|
245
|
+
'log=logging.getLogger("Snakelets.logger")\r\n',
|
|
246
|
+
'\r\n',
|
|
247
|
+
'\r\n',
|
|
248
|
+
'user=self.SessionCtx.user\r\n',
|
|
249
|
+
'storageEngine=self.SessionCtx.storageEngine\r\n',
|
|
250
|
+
'\r\n',
|
|
251
|
+
'\r\n',
|
|
252
|
+
'def readArticlesFromDate(date, count=None):\r\n',
|
|
253
|
+
' entryids=storageEngine.listBlogEntries(date)\r\n',
|
|
254
|
+
' entryids.reverse() # descending\r\n',
|
|
255
|
+
' if count:\r\n',
|
|
256
|
+
' entryids=entryids[:count]\r\n',
|
|
257
|
+
' try:\r\n',
|
|
258
|
+
' return [ frog.objects.BlogEntry.load(storageEngine, date, Id) for Id in entryids ]\r\n',
|
|
259
|
+
' except StorageError,x:\r\n',
|
|
260
|
+
' log.error("Error loading articles: "+str(x))\r\n',
|
|
261
|
+
' self.abort("cannot load articles")\r\n',
|
|
262
|
+
'\r\n',
|
|
263
|
+
'showdate=None\r\n',
|
|
264
|
+
'\r\n',
|
|
265
|
+
'arg=self.Request.getArg()\r\n',
|
|
266
|
+
'if arg=="today":\r\n',
|
|
267
|
+
' #-------------------- TODAY\'S ARTICLES\r\n',
|
|
268
|
+
' self.write("<h2>Today\'s articles</h2>")\r\n',
|
|
269
|
+
' showdate = frog.util.isodatestr() \r\n',
|
|
270
|
+
' entries = readArticlesFromDate(showdate)\r\n',
|
|
271
|
+
'elif arg=="active":\r\n',
|
|
272
|
+
' #-------------------- ACTIVE ARTICLES redirect\r\n',
|
|
273
|
+
' self.Yredirect("active.y")\r\n',
|
|
274
|
+
'elif arg=="login":\r\n',
|
|
275
|
+
' #-------------------- LOGIN PAGE redirect\r\n',
|
|
276
|
+
' self.Yredirect("login.y")\r\n',
|
|
277
|
+
'elif arg=="date":\r\n',
|
|
278
|
+
' #-------------------- ARTICLES OF A SPECIFIC DATE\r\n',
|
|
279
|
+
' showdate = self.Request.getParameter("date")\r\n',
|
|
280
|
+
' self.write("<h2>Articles written on %s</h2>"% frog.util.mediumdatestr(showdate))\r\n',
|
|
281
|
+
' entries = readArticlesFromDate(showdate)\r\n',
|
|
282
|
+
'else:\r\n',
|
|
283
|
+
' #-------------------- RECENT ARTICLES\r\n',
|
|
284
|
+
' self.write("<h2>Recent articles</h2>")\r\n',
|
|
285
|
+
' dates=storageEngine.listBlogEntryDates()\r\n',
|
|
286
|
+
' if dates:\r\n',
|
|
287
|
+
' entries=[]\r\n',
|
|
288
|
+
' SHOWAMOUNT=10\r\n',
|
|
289
|
+
' for showdate in dates:\r\n',
|
|
290
|
+
' entries.extend( readArticlesFromDate(showdate, SHOWAMOUNT-len(entries)) )\r\n',
|
|
291
|
+
' if len(entries)>=SHOWAMOUNT:\r\n',
|
|
292
|
+
' break\r\n',
|
|
293
|
+
' \r\n',
|
|
294
|
+
]
|
|
295
|
+
stream = io.BytesIO("".join(s).encode(self.encoding))
|
|
296
|
+
reader = codecs.getreader(self.encoding)(stream)
|
|
297
|
+
for (i, line) in enumerate(reader):
|
|
298
|
+
self.assertEqual(line, s[i])
|
|
299
|
+
|
|
300
|
+
def test_readlinequeue(self):
|
|
301
|
+
q = Queue(b"")
|
|
302
|
+
writer = codecs.getwriter(self.encoding)(q)
|
|
303
|
+
reader = codecs.getreader(self.encoding)(q)
|
|
304
|
+
|
|
305
|
+
# No lineends
|
|
306
|
+
writer.write("foo\r")
|
|
307
|
+
self.assertEqual(reader.readline(keepends=False), "foo")
|
|
308
|
+
writer.write("\nbar\r")
|
|
309
|
+
self.assertEqual(reader.readline(keepends=False), "")
|
|
310
|
+
self.assertEqual(reader.readline(keepends=False), "bar")
|
|
311
|
+
writer.write("baz")
|
|
312
|
+
self.assertEqual(reader.readline(keepends=False), "baz")
|
|
313
|
+
self.assertEqual(reader.readline(keepends=False), "")
|
|
314
|
+
|
|
315
|
+
# Lineends
|
|
316
|
+
writer.write("foo\r")
|
|
317
|
+
self.assertEqual(reader.readline(keepends=True), "foo\r")
|
|
318
|
+
writer.write("\nbar\r")
|
|
319
|
+
self.assertEqual(reader.readline(keepends=True), "\n")
|
|
320
|
+
self.assertEqual(reader.readline(keepends=True), "bar\r")
|
|
321
|
+
writer.write("baz")
|
|
322
|
+
self.assertEqual(reader.readline(keepends=True), "baz")
|
|
323
|
+
self.assertEqual(reader.readline(keepends=True), "")
|
|
324
|
+
writer.write("foo\r\n")
|
|
325
|
+
self.assertEqual(reader.readline(keepends=True), "foo\r\n")
|
|
326
|
+
|
|
327
|
+
def test_bug1098990_a(self):
|
|
328
|
+
s1 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\r\n"
|
|
329
|
+
s2 = "offending line: ladfj askldfj klasdj fskla dfzaskdj fasklfj laskd fjasklfzzzzaa%whereisthis!!!\r\n"
|
|
330
|
+
s3 = "next line.\r\n"
|
|
331
|
+
|
|
332
|
+
s = (s1+s2+s3).encode(self.encoding)
|
|
333
|
+
stream = io.BytesIO(s)
|
|
334
|
+
reader = codecs.getreader(self.encoding)(stream)
|
|
335
|
+
self.assertEqual(reader.readline(), s1)
|
|
336
|
+
self.assertEqual(reader.readline(), s2)
|
|
337
|
+
self.assertEqual(reader.readline(), s3)
|
|
338
|
+
self.assertEqual(reader.readline(), "")
|
|
339
|
+
|
|
340
|
+
def test_bug1098990_b(self):
|
|
341
|
+
s1 = "aaaaaaaaaaaaaaaaaaaaaaaa\r\n"
|
|
342
|
+
s2 = "bbbbbbbbbbbbbbbbbbbbbbbb\r\n"
|
|
343
|
+
s3 = "stillokay:bbbbxx\r\n"
|
|
344
|
+
s4 = "broken!!!!badbad\r\n"
|
|
345
|
+
s5 = "againokay.\r\n"
|
|
346
|
+
|
|
347
|
+
s = (s1+s2+s3+s4+s5).encode(self.encoding)
|
|
348
|
+
stream = io.BytesIO(s)
|
|
349
|
+
reader = codecs.getreader(self.encoding)(stream)
|
|
350
|
+
self.assertEqual(reader.readline(), s1)
|
|
351
|
+
self.assertEqual(reader.readline(), s2)
|
|
352
|
+
self.assertEqual(reader.readline(), s3)
|
|
353
|
+
self.assertEqual(reader.readline(), s4)
|
|
354
|
+
self.assertEqual(reader.readline(), s5)
|
|
355
|
+
self.assertEqual(reader.readline(), "")
|
|
356
|
+
|
|
357
|
+
ill_formed_sequence_replace = "\ufffd"
|
|
358
|
+
|
|
359
|
+
def test_lone_surrogates(self):
|
|
360
|
+
self.assertRaises(UnicodeEncodeError, "\ud800".encode, self.encoding)
|
|
361
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "backslashreplace"),
|
|
362
|
+
"[\\udc80]".encode(self.encoding))
|
|
363
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "namereplace"),
|
|
364
|
+
"[\\udc80]".encode(self.encoding))
|
|
365
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "xmlcharrefreplace"),
|
|
366
|
+
"[�]".encode(self.encoding))
|
|
367
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "ignore"),
|
|
368
|
+
"[]".encode(self.encoding))
|
|
369
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "replace"),
|
|
370
|
+
"[?]".encode(self.encoding))
|
|
371
|
+
|
|
372
|
+
# sequential surrogate characters
|
|
373
|
+
self.assertEqual("[\uD800\uDC80]".encode(self.encoding, "ignore"),
|
|
374
|
+
"[]".encode(self.encoding))
|
|
375
|
+
self.assertEqual("[\uD800\uDC80]".encode(self.encoding, "replace"),
|
|
376
|
+
"[??]".encode(self.encoding))
|
|
377
|
+
|
|
378
|
+
bom = "".encode(self.encoding)
|
|
379
|
+
for before, after in [("\U00010fff", "A"), ("[", "]"),
|
|
380
|
+
("A", "\U00010fff")]:
|
|
381
|
+
before_sequence = before.encode(self.encoding)[len(bom):]
|
|
382
|
+
after_sequence = after.encode(self.encoding)[len(bom):]
|
|
383
|
+
test_string = before + "\uDC80" + after
|
|
384
|
+
test_sequence = (bom + before_sequence +
|
|
385
|
+
self.ill_formed_sequence + after_sequence)
|
|
386
|
+
self.assertRaises(UnicodeDecodeError, test_sequence.decode,
|
|
387
|
+
self.encoding)
|
|
388
|
+
self.assertEqual(test_string.encode(self.encoding,
|
|
389
|
+
"surrogatepass"),
|
|
390
|
+
test_sequence)
|
|
391
|
+
self.assertEqual(test_sequence.decode(self.encoding,
|
|
392
|
+
"surrogatepass"),
|
|
393
|
+
test_string)
|
|
394
|
+
self.assertEqual(test_sequence.decode(self.encoding, "ignore"),
|
|
395
|
+
before + after)
|
|
396
|
+
self.assertEqual(test_sequence.decode(self.encoding, "replace"),
|
|
397
|
+
before + self.ill_formed_sequence_replace + after)
|
|
398
|
+
backslashreplace = ''.join('\\x%02x' % b
|
|
399
|
+
for b in self.ill_formed_sequence)
|
|
400
|
+
self.assertEqual(test_sequence.decode(self.encoding, "backslashreplace"),
|
|
401
|
+
before + backslashreplace + after)
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
class UTF32Test(ReadTest, unittest.TestCase):
|
|
405
|
+
encoding = "utf-32"
|
|
406
|
+
if sys.byteorder == 'little':
|
|
407
|
+
ill_formed_sequence = b"\x80\xdc\x00\x00"
|
|
408
|
+
else:
|
|
409
|
+
ill_formed_sequence = b"\x00\x00\xdc\x80"
|
|
410
|
+
|
|
411
|
+
spamle = (b'\xff\xfe\x00\x00'
|
|
412
|
+
b's\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m\x00\x00\x00'
|
|
413
|
+
b's\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m\x00\x00\x00')
|
|
414
|
+
spambe = (b'\x00\x00\xfe\xff'
|
|
415
|
+
b'\x00\x00\x00s\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m'
|
|
416
|
+
b'\x00\x00\x00s\x00\x00\x00p\x00\x00\x00a\x00\x00\x00m')
|
|
417
|
+
|
|
418
|
+
def test_only_one_bom(self):
|
|
419
|
+
_,_,reader,writer = codecs.lookup(self.encoding)
|
|
420
|
+
# encode some stream
|
|
421
|
+
s = io.BytesIO()
|
|
422
|
+
f = writer(s)
|
|
423
|
+
f.write("spam")
|
|
424
|
+
f.write("spam")
|
|
425
|
+
d = s.getvalue()
|
|
426
|
+
# check whether there is exactly one BOM in it
|
|
427
|
+
self.assertTrue(d == self.spamle or d == self.spambe)
|
|
428
|
+
# try to read it back
|
|
429
|
+
s = io.BytesIO(d)
|
|
430
|
+
f = reader(s)
|
|
431
|
+
self.assertEqual(f.read(), "spamspam")
|
|
432
|
+
|
|
433
|
+
def test_badbom(self):
|
|
434
|
+
s = io.BytesIO(4*b"\xff")
|
|
435
|
+
f = codecs.getreader(self.encoding)(s)
|
|
436
|
+
self.assertRaises(UnicodeError, f.read)
|
|
437
|
+
|
|
438
|
+
s = io.BytesIO(8*b"\xff")
|
|
439
|
+
f = codecs.getreader(self.encoding)(s)
|
|
440
|
+
self.assertRaises(UnicodeError, f.read)
|
|
441
|
+
|
|
442
|
+
def test_partial(self):
|
|
443
|
+
self.check_partial(
|
|
444
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
445
|
+
[
|
|
446
|
+
"", # first byte of BOM read
|
|
447
|
+
"", # second byte of BOM read
|
|
448
|
+
"", # third byte of BOM read
|
|
449
|
+
"", # fourth byte of BOM read => byteorder known
|
|
450
|
+
"",
|
|
451
|
+
"",
|
|
452
|
+
"",
|
|
453
|
+
"\x00",
|
|
454
|
+
"\x00",
|
|
455
|
+
"\x00",
|
|
456
|
+
"\x00",
|
|
457
|
+
"\x00\xff",
|
|
458
|
+
"\x00\xff",
|
|
459
|
+
"\x00\xff",
|
|
460
|
+
"\x00\xff",
|
|
461
|
+
"\x00\xff\u0100",
|
|
462
|
+
"\x00\xff\u0100",
|
|
463
|
+
"\x00\xff\u0100",
|
|
464
|
+
"\x00\xff\u0100",
|
|
465
|
+
"\x00\xff\u0100\uffff",
|
|
466
|
+
"\x00\xff\u0100\uffff",
|
|
467
|
+
"\x00\xff\u0100\uffff",
|
|
468
|
+
"\x00\xff\u0100\uffff",
|
|
469
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
470
|
+
]
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
def test_handlers(self):
|
|
474
|
+
self.assertEqual(('\ufffd', 1),
|
|
475
|
+
codecs.utf_32_decode(b'\x01', 'replace', True))
|
|
476
|
+
self.assertEqual(('', 1),
|
|
477
|
+
codecs.utf_32_decode(b'\x01', 'ignore', True))
|
|
478
|
+
|
|
479
|
+
def test_errors(self):
|
|
480
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_32_decode,
|
|
481
|
+
b"\xff", "strict", True)
|
|
482
|
+
|
|
483
|
+
def test_decoder_state(self):
|
|
484
|
+
self.check_state_handling_decode(self.encoding,
|
|
485
|
+
"spamspam", self.spamle)
|
|
486
|
+
self.check_state_handling_decode(self.encoding,
|
|
487
|
+
"spamspam", self.spambe)
|
|
488
|
+
|
|
489
|
+
def test_issue8941(self):
|
|
490
|
+
# Issue #8941: insufficient result allocation when decoding into
|
|
491
|
+
# surrogate pairs on UCS-2 builds.
|
|
492
|
+
encoded_le = b'\xff\xfe\x00\x00' + b'\x00\x00\x01\x00' * 1024
|
|
493
|
+
self.assertEqual('\U00010000' * 1024,
|
|
494
|
+
codecs.utf_32_decode(encoded_le)[0])
|
|
495
|
+
encoded_be = b'\x00\x00\xfe\xff' + b'\x00\x01\x00\x00' * 1024
|
|
496
|
+
self.assertEqual('\U00010000' * 1024,
|
|
497
|
+
codecs.utf_32_decode(encoded_be)[0])
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
class UTF32LETest(ReadTest, unittest.TestCase):
|
|
501
|
+
encoding = "utf-32-le"
|
|
502
|
+
ill_formed_sequence = b"\x80\xdc\x00\x00"
|
|
503
|
+
|
|
504
|
+
def test_partial(self):
|
|
505
|
+
self.check_partial(
|
|
506
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
507
|
+
[
|
|
508
|
+
"",
|
|
509
|
+
"",
|
|
510
|
+
"",
|
|
511
|
+
"\x00",
|
|
512
|
+
"\x00",
|
|
513
|
+
"\x00",
|
|
514
|
+
"\x00",
|
|
515
|
+
"\x00\xff",
|
|
516
|
+
"\x00\xff",
|
|
517
|
+
"\x00\xff",
|
|
518
|
+
"\x00\xff",
|
|
519
|
+
"\x00\xff\u0100",
|
|
520
|
+
"\x00\xff\u0100",
|
|
521
|
+
"\x00\xff\u0100",
|
|
522
|
+
"\x00\xff\u0100",
|
|
523
|
+
"\x00\xff\u0100\uffff",
|
|
524
|
+
"\x00\xff\u0100\uffff",
|
|
525
|
+
"\x00\xff\u0100\uffff",
|
|
526
|
+
"\x00\xff\u0100\uffff",
|
|
527
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
528
|
+
]
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
def test_simple(self):
|
|
532
|
+
self.assertEqual("\U00010203".encode(self.encoding), b"\x03\x02\x01\x00")
|
|
533
|
+
|
|
534
|
+
def test_errors(self):
|
|
535
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_32_le_decode,
|
|
536
|
+
b"\xff", "strict", True)
|
|
537
|
+
|
|
538
|
+
def test_issue8941(self):
|
|
539
|
+
# Issue #8941: insufficient result allocation when decoding into
|
|
540
|
+
# surrogate pairs on UCS-2 builds.
|
|
541
|
+
encoded = b'\x00\x00\x01\x00' * 1024
|
|
542
|
+
self.assertEqual('\U00010000' * 1024,
|
|
543
|
+
codecs.utf_32_le_decode(encoded)[0])
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
class UTF32BETest(ReadTest, unittest.TestCase):
|
|
547
|
+
encoding = "utf-32-be"
|
|
548
|
+
ill_formed_sequence = b"\x00\x00\xdc\x80"
|
|
549
|
+
|
|
550
|
+
def test_partial(self):
|
|
551
|
+
self.check_partial(
|
|
552
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
553
|
+
[
|
|
554
|
+
"",
|
|
555
|
+
"",
|
|
556
|
+
"",
|
|
557
|
+
"\x00",
|
|
558
|
+
"\x00",
|
|
559
|
+
"\x00",
|
|
560
|
+
"\x00",
|
|
561
|
+
"\x00\xff",
|
|
562
|
+
"\x00\xff",
|
|
563
|
+
"\x00\xff",
|
|
564
|
+
"\x00\xff",
|
|
565
|
+
"\x00\xff\u0100",
|
|
566
|
+
"\x00\xff\u0100",
|
|
567
|
+
"\x00\xff\u0100",
|
|
568
|
+
"\x00\xff\u0100",
|
|
569
|
+
"\x00\xff\u0100\uffff",
|
|
570
|
+
"\x00\xff\u0100\uffff",
|
|
571
|
+
"\x00\xff\u0100\uffff",
|
|
572
|
+
"\x00\xff\u0100\uffff",
|
|
573
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
574
|
+
]
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
def test_simple(self):
|
|
578
|
+
self.assertEqual("\U00010203".encode(self.encoding), b"\x00\x01\x02\x03")
|
|
579
|
+
|
|
580
|
+
def test_errors(self):
|
|
581
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_32_be_decode,
|
|
582
|
+
b"\xff", "strict", True)
|
|
583
|
+
|
|
584
|
+
def test_issue8941(self):
|
|
585
|
+
# Issue #8941: insufficient result allocation when decoding into
|
|
586
|
+
# surrogate pairs on UCS-2 builds.
|
|
587
|
+
encoded = b'\x00\x01\x00\x00' * 1024
|
|
588
|
+
self.assertEqual('\U00010000' * 1024,
|
|
589
|
+
codecs.utf_32_be_decode(encoded)[0])
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
class UTF16Test(ReadTest, unittest.TestCase):
|
|
593
|
+
encoding = "utf-16"
|
|
594
|
+
if sys.byteorder == 'little':
|
|
595
|
+
ill_formed_sequence = b"\x80\xdc"
|
|
596
|
+
else:
|
|
597
|
+
ill_formed_sequence = b"\xdc\x80"
|
|
598
|
+
|
|
599
|
+
spamle = b'\xff\xfes\x00p\x00a\x00m\x00s\x00p\x00a\x00m\x00'
|
|
600
|
+
spambe = b'\xfe\xff\x00s\x00p\x00a\x00m\x00s\x00p\x00a\x00m'
|
|
601
|
+
|
|
602
|
+
def test_only_one_bom(self):
|
|
603
|
+
_,_,reader,writer = codecs.lookup(self.encoding)
|
|
604
|
+
# encode some stream
|
|
605
|
+
s = io.BytesIO()
|
|
606
|
+
f = writer(s)
|
|
607
|
+
f.write("spam")
|
|
608
|
+
f.write("spam")
|
|
609
|
+
d = s.getvalue()
|
|
610
|
+
# check whether there is exactly one BOM in it
|
|
611
|
+
self.assertTrue(d == self.spamle or d == self.spambe)
|
|
612
|
+
# try to read it back
|
|
613
|
+
s = io.BytesIO(d)
|
|
614
|
+
f = reader(s)
|
|
615
|
+
self.assertEqual(f.read(), "spamspam")
|
|
616
|
+
|
|
617
|
+
def test_badbom(self):
|
|
618
|
+
s = io.BytesIO(b"\xff\xff")
|
|
619
|
+
f = codecs.getreader(self.encoding)(s)
|
|
620
|
+
self.assertRaises(UnicodeError, f.read)
|
|
621
|
+
|
|
622
|
+
s = io.BytesIO(b"\xff\xff\xff\xff")
|
|
623
|
+
f = codecs.getreader(self.encoding)(s)
|
|
624
|
+
self.assertRaises(UnicodeError, f.read)
|
|
625
|
+
|
|
626
|
+
def test_partial(self):
|
|
627
|
+
self.check_partial(
|
|
628
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
629
|
+
[
|
|
630
|
+
"", # first byte of BOM read
|
|
631
|
+
"", # second byte of BOM read => byteorder known
|
|
632
|
+
"",
|
|
633
|
+
"\x00",
|
|
634
|
+
"\x00",
|
|
635
|
+
"\x00\xff",
|
|
636
|
+
"\x00\xff",
|
|
637
|
+
"\x00\xff\u0100",
|
|
638
|
+
"\x00\xff\u0100",
|
|
639
|
+
"\x00\xff\u0100\uffff",
|
|
640
|
+
"\x00\xff\u0100\uffff",
|
|
641
|
+
"\x00\xff\u0100\uffff",
|
|
642
|
+
"\x00\xff\u0100\uffff",
|
|
643
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
644
|
+
]
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
def test_handlers(self):
|
|
648
|
+
self.assertEqual(('\ufffd', 1),
|
|
649
|
+
codecs.utf_16_decode(b'\x01', 'replace', True))
|
|
650
|
+
self.assertEqual(('', 1),
|
|
651
|
+
codecs.utf_16_decode(b'\x01', 'ignore', True))
|
|
652
|
+
|
|
653
|
+
def test_errors(self):
|
|
654
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_decode,
|
|
655
|
+
b"\xff", "strict", True)
|
|
656
|
+
|
|
657
|
+
def test_decoder_state(self):
|
|
658
|
+
self.check_state_handling_decode(self.encoding,
|
|
659
|
+
"spamspam", self.spamle)
|
|
660
|
+
self.check_state_handling_decode(self.encoding,
|
|
661
|
+
"spamspam", self.spambe)
|
|
662
|
+
|
|
663
|
+
def test_bug691291(self):
|
|
664
|
+
# Files are always opened in binary mode, even if no binary mode was
|
|
665
|
+
# specified. This means that no automatic conversion of '\n' is done
|
|
666
|
+
# on reading and writing.
|
|
667
|
+
s1 = 'Hello\r\nworld\r\n'
|
|
668
|
+
|
|
669
|
+
s = s1.encode(self.encoding)
|
|
670
|
+
self.addCleanup(support.unlink, support.TESTFN)
|
|
671
|
+
with open(support.TESTFN, 'wb') as fp:
|
|
672
|
+
fp.write(s)
|
|
673
|
+
with support.check_warnings(('', DeprecationWarning)):
|
|
674
|
+
reader = codecs.open(support.TESTFN, 'U', encoding=self.encoding)
|
|
675
|
+
with reader:
|
|
676
|
+
self.assertEqual(reader.read(), s1)
|
|
677
|
+
|
|
678
|
+
class UTF16LETest(ReadTest, unittest.TestCase):
|
|
679
|
+
encoding = "utf-16-le"
|
|
680
|
+
ill_formed_sequence = b"\x80\xdc"
|
|
681
|
+
|
|
682
|
+
def test_partial(self):
|
|
683
|
+
self.check_partial(
|
|
684
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
685
|
+
[
|
|
686
|
+
"",
|
|
687
|
+
"\x00",
|
|
688
|
+
"\x00",
|
|
689
|
+
"\x00\xff",
|
|
690
|
+
"\x00\xff",
|
|
691
|
+
"\x00\xff\u0100",
|
|
692
|
+
"\x00\xff\u0100",
|
|
693
|
+
"\x00\xff\u0100\uffff",
|
|
694
|
+
"\x00\xff\u0100\uffff",
|
|
695
|
+
"\x00\xff\u0100\uffff",
|
|
696
|
+
"\x00\xff\u0100\uffff",
|
|
697
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
698
|
+
]
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
def test_errors(self):
|
|
702
|
+
tests = [
|
|
703
|
+
(b'\xff', '\ufffd'),
|
|
704
|
+
(b'A\x00Z', 'A\ufffd'),
|
|
705
|
+
(b'A\x00B\x00C\x00D\x00Z', 'ABCD\ufffd'),
|
|
706
|
+
(b'\x00\xd8', '\ufffd'),
|
|
707
|
+
(b'\x00\xd8A', '\ufffd'),
|
|
708
|
+
(b'\x00\xd8A\x00', '\ufffdA'),
|
|
709
|
+
(b'\x00\xdcA\x00', '\ufffdA'),
|
|
710
|
+
]
|
|
711
|
+
for raw, expected in tests:
|
|
712
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_le_decode,
|
|
713
|
+
raw, 'strict', True)
|
|
714
|
+
self.assertEqual(raw.decode('utf-16le', 'replace'), expected)
|
|
715
|
+
|
|
716
|
+
def test_nonbmp(self):
|
|
717
|
+
self.assertEqual("\U00010203".encode(self.encoding),
|
|
718
|
+
b'\x00\xd8\x03\xde')
|
|
719
|
+
self.assertEqual(b'\x00\xd8\x03\xde'.decode(self.encoding),
|
|
720
|
+
"\U00010203")
|
|
721
|
+
|
|
722
|
+
class UTF16BETest(ReadTest, unittest.TestCase):
|
|
723
|
+
encoding = "utf-16-be"
|
|
724
|
+
ill_formed_sequence = b"\xdc\x80"
|
|
725
|
+
|
|
726
|
+
def test_partial(self):
|
|
727
|
+
self.check_partial(
|
|
728
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
729
|
+
[
|
|
730
|
+
"",
|
|
731
|
+
"\x00",
|
|
732
|
+
"\x00",
|
|
733
|
+
"\x00\xff",
|
|
734
|
+
"\x00\xff",
|
|
735
|
+
"\x00\xff\u0100",
|
|
736
|
+
"\x00\xff\u0100",
|
|
737
|
+
"\x00\xff\u0100\uffff",
|
|
738
|
+
"\x00\xff\u0100\uffff",
|
|
739
|
+
"\x00\xff\u0100\uffff",
|
|
740
|
+
"\x00\xff\u0100\uffff",
|
|
741
|
+
"\x00\xff\u0100\uffff\U00010000",
|
|
742
|
+
]
|
|
743
|
+
)
|
|
744
|
+
|
|
745
|
+
def test_errors(self):
|
|
746
|
+
tests = [
|
|
747
|
+
(b'\xff', '\ufffd'),
|
|
748
|
+
(b'\x00A\xff', 'A\ufffd'),
|
|
749
|
+
(b'\x00A\x00B\x00C\x00DZ', 'ABCD\ufffd'),
|
|
750
|
+
(b'\xd8\x00', '\ufffd'),
|
|
751
|
+
(b'\xd8\x00\xdc', '\ufffd'),
|
|
752
|
+
(b'\xd8\x00\x00A', '\ufffdA'),
|
|
753
|
+
(b'\xdc\x00\x00A', '\ufffdA'),
|
|
754
|
+
]
|
|
755
|
+
for raw, expected in tests:
|
|
756
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_be_decode,
|
|
757
|
+
raw, 'strict', True)
|
|
758
|
+
self.assertEqual(raw.decode('utf-16be', 'replace'), expected)
|
|
759
|
+
|
|
760
|
+
def test_nonbmp(self):
|
|
761
|
+
self.assertEqual("\U00010203".encode(self.encoding),
|
|
762
|
+
b'\xd8\x00\xde\x03')
|
|
763
|
+
self.assertEqual(b'\xd8\x00\xde\x03'.decode(self.encoding),
|
|
764
|
+
"\U00010203")
|
|
765
|
+
|
|
766
|
+
class UTF8Test(ReadTest, unittest.TestCase):
|
|
767
|
+
encoding = "utf-8"
|
|
768
|
+
ill_formed_sequence = b"\xed\xb2\x80"
|
|
769
|
+
ill_formed_sequence_replace = "\ufffd" * 3
|
|
770
|
+
BOM = b''
|
|
771
|
+
|
|
772
|
+
def test_partial(self):
|
|
773
|
+
self.check_partial(
|
|
774
|
+
"\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
775
|
+
[
|
|
776
|
+
"\x00",
|
|
777
|
+
"\x00",
|
|
778
|
+
"\x00\xff",
|
|
779
|
+
"\x00\xff",
|
|
780
|
+
"\x00\xff\u07ff",
|
|
781
|
+
"\x00\xff\u07ff",
|
|
782
|
+
"\x00\xff\u07ff",
|
|
783
|
+
"\x00\xff\u07ff\u0800",
|
|
784
|
+
"\x00\xff\u07ff\u0800",
|
|
785
|
+
"\x00\xff\u07ff\u0800",
|
|
786
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
787
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
788
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
789
|
+
"\x00\xff\u07ff\u0800\uffff",
|
|
790
|
+
"\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
791
|
+
]
|
|
792
|
+
)
|
|
793
|
+
|
|
794
|
+
def test_decoder_state(self):
|
|
795
|
+
u = "\x00\x7f\x80\xff\u0100\u07ff\u0800\uffff\U0010ffff"
|
|
796
|
+
self.check_state_handling_decode(self.encoding,
|
|
797
|
+
u, u.encode(self.encoding))
|
|
798
|
+
|
|
799
|
+
def test_decode_error(self):
|
|
800
|
+
for data, error_handler, expected in (
|
|
801
|
+
(b'[\x80\xff]', 'ignore', '[]'),
|
|
802
|
+
(b'[\x80\xff]', 'replace', '[\ufffd\ufffd]'),
|
|
803
|
+
(b'[\x80\xff]', 'surrogateescape', '[\udc80\udcff]'),
|
|
804
|
+
(b'[\x80\xff]', 'backslashreplace', '[\\x80\\xff]'),
|
|
805
|
+
):
|
|
806
|
+
with self.subTest(data=data, error_handler=error_handler,
|
|
807
|
+
expected=expected):
|
|
808
|
+
self.assertEqual(data.decode(self.encoding, error_handler),
|
|
809
|
+
expected)
|
|
810
|
+
|
|
811
|
+
def test_lone_surrogates(self):
|
|
812
|
+
super().test_lone_surrogates()
|
|
813
|
+
# not sure if this is making sense for
|
|
814
|
+
# UTF-16 and UTF-32
|
|
815
|
+
self.assertEqual("[\uDC80]".encode(self.encoding, "surrogateescape"),
|
|
816
|
+
self.BOM + b'[\x80]')
|
|
817
|
+
|
|
818
|
+
with self.assertRaises(UnicodeEncodeError) as cm:
|
|
819
|
+
"[\uDC80\uD800\uDFFF]".encode(self.encoding, "surrogateescape")
|
|
820
|
+
exc = cm.exception
|
|
821
|
+
self.assertEqual(exc.object[exc.start:exc.end], '\uD800\uDFFF')
|
|
822
|
+
|
|
823
|
+
def test_surrogatepass_handler(self):
|
|
824
|
+
self.assertEqual("abc\ud800def".encode(self.encoding, "surrogatepass"),
|
|
825
|
+
self.BOM + b"abc\xed\xa0\x80def")
|
|
826
|
+
self.assertEqual("\U00010fff\uD800".encode(self.encoding, "surrogatepass"),
|
|
827
|
+
self.BOM + b"\xf0\x90\xbf\xbf\xed\xa0\x80")
|
|
828
|
+
self.assertEqual("[\uD800\uDC80]".encode(self.encoding, "surrogatepass"),
|
|
829
|
+
self.BOM + b'[\xed\xa0\x80\xed\xb2\x80]')
|
|
830
|
+
|
|
831
|
+
self.assertEqual(b"abc\xed\xa0\x80def".decode(self.encoding, "surrogatepass"),
|
|
832
|
+
"abc\ud800def")
|
|
833
|
+
self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode(self.encoding, "surrogatepass"),
|
|
834
|
+
"\U00010fff\uD800")
|
|
835
|
+
|
|
836
|
+
self.assertTrue(codecs.lookup_error("surrogatepass"))
|
|
837
|
+
with self.assertRaises(UnicodeDecodeError):
|
|
838
|
+
b"abc\xed\xa0".decode(self.encoding, "surrogatepass")
|
|
839
|
+
with self.assertRaises(UnicodeDecodeError):
|
|
840
|
+
b"abc\xed\xa0z".decode(self.encoding, "surrogatepass")
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
@unittest.skipUnless(sys.platform == 'win32',
|
|
844
|
+
'cp65001 is a Windows-only codec')
|
|
845
|
+
class CP65001Test(ReadTest, unittest.TestCase):
|
|
846
|
+
encoding = "cp65001"
|
|
847
|
+
|
|
848
|
+
def test_encode(self):
|
|
849
|
+
tests = [
|
|
850
|
+
('abc', 'strict', b'abc'),
|
|
851
|
+
('\xe9\u20ac', 'strict', b'\xc3\xa9\xe2\x82\xac'),
|
|
852
|
+
('\U0010ffff', 'strict', b'\xf4\x8f\xbf\xbf'),
|
|
853
|
+
('\udc80', 'strict', None),
|
|
854
|
+
('\udc80', 'ignore', b''),
|
|
855
|
+
('\udc80', 'replace', b'?'),
|
|
856
|
+
('\udc80', 'backslashreplace', b'\\udc80'),
|
|
857
|
+
('\udc80', 'namereplace', b'\\udc80'),
|
|
858
|
+
('\udc80', 'surrogatepass', b'\xed\xb2\x80'),
|
|
859
|
+
]
|
|
860
|
+
for text, errors, expected in tests:
|
|
861
|
+
if expected is not None:
|
|
862
|
+
try:
|
|
863
|
+
encoded = text.encode('cp65001', errors)
|
|
864
|
+
except UnicodeEncodeError as err:
|
|
865
|
+
self.fail('Unable to encode %a to cp65001 with '
|
|
866
|
+
'errors=%r: %s' % (text, errors, err))
|
|
867
|
+
self.assertEqual(encoded, expected,
|
|
868
|
+
'%a.encode("cp65001", %r)=%a != %a'
|
|
869
|
+
% (text, errors, encoded, expected))
|
|
870
|
+
else:
|
|
871
|
+
self.assertRaises(UnicodeEncodeError,
|
|
872
|
+
text.encode, "cp65001", errors)
|
|
873
|
+
|
|
874
|
+
def test_decode(self):
|
|
875
|
+
tests = [
|
|
876
|
+
(b'abc', 'strict', 'abc'),
|
|
877
|
+
(b'\xc3\xa9\xe2\x82\xac', 'strict', '\xe9\u20ac'),
|
|
878
|
+
(b'\xf4\x8f\xbf\xbf', 'strict', '\U0010ffff'),
|
|
879
|
+
(b'\xef\xbf\xbd', 'strict', '\ufffd'),
|
|
880
|
+
(b'[\xc3\xa9]', 'strict', '[\xe9]'),
|
|
881
|
+
# invalid bytes
|
|
882
|
+
(b'[\xff]', 'strict', None),
|
|
883
|
+
(b'[\xff]', 'ignore', '[]'),
|
|
884
|
+
(b'[\xff]', 'replace', '[\ufffd]'),
|
|
885
|
+
(b'[\xff]', 'surrogateescape', '[\udcff]'),
|
|
886
|
+
(b'[\xed\xb2\x80]', 'strict', None),
|
|
887
|
+
(b'[\xed\xb2\x80]', 'ignore', '[]'),
|
|
888
|
+
(b'[\xed\xb2\x80]', 'replace', '[\ufffd\ufffd\ufffd]'),
|
|
889
|
+
]
|
|
890
|
+
for raw, errors, expected in tests:
|
|
891
|
+
if expected is not None:
|
|
892
|
+
try:
|
|
893
|
+
decoded = raw.decode('cp65001', errors)
|
|
894
|
+
except UnicodeDecodeError as err:
|
|
895
|
+
self.fail('Unable to decode %a from cp65001 with '
|
|
896
|
+
'errors=%r: %s' % (raw, errors, err))
|
|
897
|
+
self.assertEqual(decoded, expected,
|
|
898
|
+
'%a.decode("cp65001", %r)=%a != %a'
|
|
899
|
+
% (raw, errors, decoded, expected))
|
|
900
|
+
else:
|
|
901
|
+
self.assertRaises(UnicodeDecodeError,
|
|
902
|
+
raw.decode, 'cp65001', errors)
|
|
903
|
+
|
|
904
|
+
def test_lone_surrogates(self):
|
|
905
|
+
self.assertRaises(UnicodeEncodeError, "\ud800".encode, "cp65001")
|
|
906
|
+
self.assertRaises(UnicodeDecodeError, b"\xed\xa0\x80".decode, "cp65001")
|
|
907
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "backslashreplace"),
|
|
908
|
+
b'[\\udc80]')
|
|
909
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "namereplace"),
|
|
910
|
+
b'[\\udc80]')
|
|
911
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "xmlcharrefreplace"),
|
|
912
|
+
b'[�]')
|
|
913
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "surrogateescape"),
|
|
914
|
+
b'[\x80]')
|
|
915
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "ignore"),
|
|
916
|
+
b'[]')
|
|
917
|
+
self.assertEqual("[\uDC80]".encode("cp65001", "replace"),
|
|
918
|
+
b'[?]')
|
|
919
|
+
|
|
920
|
+
def test_surrogatepass_handler(self):
|
|
921
|
+
self.assertEqual("abc\ud800def".encode("cp65001", "surrogatepass"),
|
|
922
|
+
b"abc\xed\xa0\x80def")
|
|
923
|
+
self.assertEqual(b"abc\xed\xa0\x80def".decode("cp65001", "surrogatepass"),
|
|
924
|
+
"abc\ud800def")
|
|
925
|
+
self.assertEqual("\U00010fff\uD800".encode("cp65001", "surrogatepass"),
|
|
926
|
+
b"\xf0\x90\xbf\xbf\xed\xa0\x80")
|
|
927
|
+
self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode("cp65001", "surrogatepass"),
|
|
928
|
+
"\U00010fff\uD800")
|
|
929
|
+
self.assertTrue(codecs.lookup_error("surrogatepass"))
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
class UTF7Test(ReadTest, unittest.TestCase):
|
|
933
|
+
encoding = "utf-7"
|
|
934
|
+
|
|
935
|
+
def test_ascii(self):
|
|
936
|
+
# Set D (directly encoded characters)
|
|
937
|
+
set_d = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
|
938
|
+
'abcdefghijklmnopqrstuvwxyz'
|
|
939
|
+
'0123456789'
|
|
940
|
+
'\'(),-./:?')
|
|
941
|
+
self.assertEqual(set_d.encode(self.encoding), set_d.encode('ascii'))
|
|
942
|
+
self.assertEqual(set_d.encode('ascii').decode(self.encoding), set_d)
|
|
943
|
+
# Set O (optional direct characters)
|
|
944
|
+
set_o = ' !"#$%&*;<=>@[]^_`{|}'
|
|
945
|
+
self.assertEqual(set_o.encode(self.encoding), set_o.encode('ascii'))
|
|
946
|
+
self.assertEqual(set_o.encode('ascii').decode(self.encoding), set_o)
|
|
947
|
+
# +
|
|
948
|
+
self.assertEqual('a+b'.encode(self.encoding), b'a+-b')
|
|
949
|
+
self.assertEqual(b'a+-b'.decode(self.encoding), 'a+b')
|
|
950
|
+
# White spaces
|
|
951
|
+
ws = ' \t\n\r'
|
|
952
|
+
self.assertEqual(ws.encode(self.encoding), ws.encode('ascii'))
|
|
953
|
+
self.assertEqual(ws.encode('ascii').decode(self.encoding), ws)
|
|
954
|
+
# Other ASCII characters
|
|
955
|
+
other_ascii = ''.join(sorted(set(bytes(range(0x80)).decode()) -
|
|
956
|
+
set(set_d + set_o + '+' + ws)))
|
|
957
|
+
self.assertEqual(other_ascii.encode(self.encoding),
|
|
958
|
+
b'+AAAAAQACAAMABAAFAAYABwAIAAsADAAOAA8AEAARABIAEwAU'
|
|
959
|
+
b'ABUAFgAXABgAGQAaABsAHAAdAB4AHwBcAH4Afw-')
|
|
960
|
+
|
|
961
|
+
def test_partial(self):
|
|
962
|
+
self.check_partial(
|
|
963
|
+
'a+-b\x00c\x80d\u0100e\U00010000f',
|
|
964
|
+
[
|
|
965
|
+
'a',
|
|
966
|
+
'a',
|
|
967
|
+
'a+',
|
|
968
|
+
'a+-',
|
|
969
|
+
'a+-b',
|
|
970
|
+
'a+-b',
|
|
971
|
+
'a+-b',
|
|
972
|
+
'a+-b',
|
|
973
|
+
'a+-b',
|
|
974
|
+
'a+-b\x00',
|
|
975
|
+
'a+-b\x00c',
|
|
976
|
+
'a+-b\x00c',
|
|
977
|
+
'a+-b\x00c',
|
|
978
|
+
'a+-b\x00c',
|
|
979
|
+
'a+-b\x00c',
|
|
980
|
+
'a+-b\x00c\x80',
|
|
981
|
+
'a+-b\x00c\x80d',
|
|
982
|
+
'a+-b\x00c\x80d',
|
|
983
|
+
'a+-b\x00c\x80d',
|
|
984
|
+
'a+-b\x00c\x80d',
|
|
985
|
+
'a+-b\x00c\x80d',
|
|
986
|
+
'a+-b\x00c\x80d\u0100',
|
|
987
|
+
'a+-b\x00c\x80d\u0100e',
|
|
988
|
+
'a+-b\x00c\x80d\u0100e',
|
|
989
|
+
'a+-b\x00c\x80d\u0100e',
|
|
990
|
+
'a+-b\x00c\x80d\u0100e',
|
|
991
|
+
'a+-b\x00c\x80d\u0100e',
|
|
992
|
+
'a+-b\x00c\x80d\u0100e',
|
|
993
|
+
'a+-b\x00c\x80d\u0100e',
|
|
994
|
+
'a+-b\x00c\x80d\u0100e',
|
|
995
|
+
'a+-b\x00c\x80d\u0100e\U00010000',
|
|
996
|
+
'a+-b\x00c\x80d\u0100e\U00010000f',
|
|
997
|
+
]
|
|
998
|
+
)
|
|
999
|
+
|
|
1000
|
+
def test_errors(self):
|
|
1001
|
+
tests = [
|
|
1002
|
+
(b'\xffb', '\ufffdb'),
|
|
1003
|
+
(b'a\xffb', 'a\ufffdb'),
|
|
1004
|
+
(b'a\xff\xffb', 'a\ufffd\ufffdb'),
|
|
1005
|
+
(b'a+IK', 'a\ufffd'),
|
|
1006
|
+
(b'a+IK-b', 'a\ufffdb'),
|
|
1007
|
+
(b'a+IK,b', 'a\ufffdb'),
|
|
1008
|
+
(b'a+IKx', 'a\u20ac\ufffd'),
|
|
1009
|
+
(b'a+IKx-b', 'a\u20ac\ufffdb'),
|
|
1010
|
+
(b'a+IKwgr', 'a\u20ac\ufffd'),
|
|
1011
|
+
(b'a+IKwgr-b', 'a\u20ac\ufffdb'),
|
|
1012
|
+
(b'a+IKwgr,', 'a\u20ac\ufffd'),
|
|
1013
|
+
(b'a+IKwgr,-b', 'a\u20ac\ufffd-b'),
|
|
1014
|
+
(b'a+IKwgrB', 'a\u20ac\u20ac\ufffd'),
|
|
1015
|
+
(b'a+IKwgrB-b', 'a\u20ac\u20ac\ufffdb'),
|
|
1016
|
+
(b'a+/,+IKw-b', 'a\ufffd\u20acb'),
|
|
1017
|
+
(b'a+//,+IKw-b', 'a\ufffd\u20acb'),
|
|
1018
|
+
(b'a+///,+IKw-b', 'a\uffff\ufffd\u20acb'),
|
|
1019
|
+
(b'a+////,+IKw-b', 'a\uffff\ufffd\u20acb'),
|
|
1020
|
+
(b'a+IKw-b\xff', 'a\u20acb\ufffd'),
|
|
1021
|
+
(b'a+IKw\xffb', 'a\u20ac\ufffdb'),
|
|
1022
|
+
]
|
|
1023
|
+
for raw, expected in tests:
|
|
1024
|
+
with self.subTest(raw=raw):
|
|
1025
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_7_decode,
|
|
1026
|
+
raw, 'strict', True)
|
|
1027
|
+
self.assertEqual(raw.decode('utf-7', 'replace'), expected)
|
|
1028
|
+
|
|
1029
|
+
def test_nonbmp(self):
|
|
1030
|
+
self.assertEqual('\U000104A0'.encode(self.encoding), b'+2AHcoA-')
|
|
1031
|
+
self.assertEqual('\ud801\udca0'.encode(self.encoding), b'+2AHcoA-')
|
|
1032
|
+
self.assertEqual(b'+2AHcoA-'.decode(self.encoding), '\U000104A0')
|
|
1033
|
+
self.assertEqual(b'+2AHcoA'.decode(self.encoding), '\U000104A0')
|
|
1034
|
+
self.assertEqual('\u20ac\U000104A0'.encode(self.encoding), b'+IKzYAdyg-')
|
|
1035
|
+
self.assertEqual(b'+IKzYAdyg-'.decode(self.encoding), '\u20ac\U000104A0')
|
|
1036
|
+
self.assertEqual(b'+IKzYAdyg'.decode(self.encoding), '\u20ac\U000104A0')
|
|
1037
|
+
self.assertEqual('\u20ac\u20ac\U000104A0'.encode(self.encoding),
|
|
1038
|
+
b'+IKwgrNgB3KA-')
|
|
1039
|
+
self.assertEqual(b'+IKwgrNgB3KA-'.decode(self.encoding),
|
|
1040
|
+
'\u20ac\u20ac\U000104A0')
|
|
1041
|
+
self.assertEqual(b'+IKwgrNgB3KA'.decode(self.encoding),
|
|
1042
|
+
'\u20ac\u20ac\U000104A0')
|
|
1043
|
+
|
|
1044
|
+
def test_lone_surrogates(self):
|
|
1045
|
+
tests = [
|
|
1046
|
+
(b'a+2AE-b', 'a\ud801b'),
|
|
1047
|
+
(b'a+2AE\xffb', 'a\ufffdb'),
|
|
1048
|
+
(b'a+2AE', 'a\ufffd'),
|
|
1049
|
+
(b'a+2AEA-b', 'a\ufffdb'),
|
|
1050
|
+
(b'a+2AH-b', 'a\ufffdb'),
|
|
1051
|
+
(b'a+IKzYAQ-b', 'a\u20ac\ud801b'),
|
|
1052
|
+
(b'a+IKzYAQ\xffb', 'a\u20ac\ufffdb'),
|
|
1053
|
+
(b'a+IKzYAQA-b', 'a\u20ac\ufffdb'),
|
|
1054
|
+
(b'a+IKzYAd-b', 'a\u20ac\ufffdb'),
|
|
1055
|
+
(b'a+IKwgrNgB-b', 'a\u20ac\u20ac\ud801b'),
|
|
1056
|
+
(b'a+IKwgrNgB\xffb', 'a\u20ac\u20ac\ufffdb'),
|
|
1057
|
+
(b'a+IKwgrNgB', 'a\u20ac\u20ac\ufffd'),
|
|
1058
|
+
(b'a+IKwgrNgBA-b', 'a\u20ac\u20ac\ufffdb'),
|
|
1059
|
+
]
|
|
1060
|
+
for raw, expected in tests:
|
|
1061
|
+
with self.subTest(raw=raw):
|
|
1062
|
+
self.assertEqual(raw.decode('utf-7', 'replace'), expected)
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
class UTF16ExTest(unittest.TestCase):
|
|
1066
|
+
|
|
1067
|
+
def test_errors(self):
|
|
1068
|
+
self.assertRaises(UnicodeDecodeError, codecs.utf_16_ex_decode, b"\xff", "strict", 0, True)
|
|
1069
|
+
|
|
1070
|
+
def test_bad_args(self):
|
|
1071
|
+
self.assertRaises(TypeError, codecs.utf_16_ex_decode)
|
|
1072
|
+
|
|
1073
|
+
class ReadBufferTest(unittest.TestCase):
|
|
1074
|
+
|
|
1075
|
+
def test_array(self):
|
|
1076
|
+
import array
|
|
1077
|
+
self.assertEqual(
|
|
1078
|
+
codecs.readbuffer_encode(array.array("b", b"spam")),
|
|
1079
|
+
(b"spam", 4)
|
|
1080
|
+
)
|
|
1081
|
+
|
|
1082
|
+
def test_empty(self):
|
|
1083
|
+
self.assertEqual(codecs.readbuffer_encode(""), (b"", 0))
|
|
1084
|
+
|
|
1085
|
+
def test_bad_args(self):
|
|
1086
|
+
self.assertRaises(TypeError, codecs.readbuffer_encode)
|
|
1087
|
+
self.assertRaises(TypeError, codecs.readbuffer_encode, 42)
|
|
1088
|
+
|
|
1089
|
+
class UTF8SigTest(UTF8Test, unittest.TestCase):
|
|
1090
|
+
encoding = "utf-8-sig"
|
|
1091
|
+
BOM = codecs.BOM_UTF8
|
|
1092
|
+
|
|
1093
|
+
def test_partial(self):
|
|
1094
|
+
self.check_partial(
|
|
1095
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
1096
|
+
[
|
|
1097
|
+
"",
|
|
1098
|
+
"",
|
|
1099
|
+
"", # First BOM has been read and skipped
|
|
1100
|
+
"",
|
|
1101
|
+
"",
|
|
1102
|
+
"\ufeff", # Second BOM has been read and emitted
|
|
1103
|
+
"\ufeff\x00", # "\x00" read and emitted
|
|
1104
|
+
"\ufeff\x00", # First byte of encoded "\xff" read
|
|
1105
|
+
"\ufeff\x00\xff", # Second byte of encoded "\xff" read
|
|
1106
|
+
"\ufeff\x00\xff", # First byte of encoded "\u07ff" read
|
|
1107
|
+
"\ufeff\x00\xff\u07ff", # Second byte of encoded "\u07ff" read
|
|
1108
|
+
"\ufeff\x00\xff\u07ff",
|
|
1109
|
+
"\ufeff\x00\xff\u07ff",
|
|
1110
|
+
"\ufeff\x00\xff\u07ff\u0800",
|
|
1111
|
+
"\ufeff\x00\xff\u07ff\u0800",
|
|
1112
|
+
"\ufeff\x00\xff\u07ff\u0800",
|
|
1113
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1114
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1115
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1116
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff",
|
|
1117
|
+
"\ufeff\x00\xff\u07ff\u0800\uffff\U00010000",
|
|
1118
|
+
]
|
|
1119
|
+
)
|
|
1120
|
+
|
|
1121
|
+
def test_bug1601501(self):
|
|
1122
|
+
# SF bug #1601501: check that the codec works with a buffer
|
|
1123
|
+
self.assertEqual(str(b"\xef\xbb\xbf", "utf-8-sig"), "")
|
|
1124
|
+
|
|
1125
|
+
def test_bom(self):
|
|
1126
|
+
d = codecs.getincrementaldecoder("utf-8-sig")()
|
|
1127
|
+
s = "spam"
|
|
1128
|
+
self.assertEqual(d.decode(s.encode("utf-8-sig")), s)
|
|
1129
|
+
|
|
1130
|
+
def test_stream_bom(self):
|
|
1131
|
+
unistring = "ABC\u00A1\u2200XYZ"
|
|
1132
|
+
bytestring = codecs.BOM_UTF8 + b"ABC\xC2\xA1\xE2\x88\x80XYZ"
|
|
1133
|
+
|
|
1134
|
+
reader = codecs.getreader("utf-8-sig")
|
|
1135
|
+
for sizehint in [None] + list(range(1, 11)) + \
|
|
1136
|
+
[64, 128, 256, 512, 1024]:
|
|
1137
|
+
istream = reader(io.BytesIO(bytestring))
|
|
1138
|
+
ostream = io.StringIO()
|
|
1139
|
+
while 1:
|
|
1140
|
+
if sizehint is not None:
|
|
1141
|
+
data = istream.read(sizehint)
|
|
1142
|
+
else:
|
|
1143
|
+
data = istream.read()
|
|
1144
|
+
|
|
1145
|
+
if not data:
|
|
1146
|
+
break
|
|
1147
|
+
ostream.write(data)
|
|
1148
|
+
|
|
1149
|
+
got = ostream.getvalue()
|
|
1150
|
+
self.assertEqual(got, unistring)
|
|
1151
|
+
|
|
1152
|
+
def test_stream_bare(self):
|
|
1153
|
+
unistring = "ABC\u00A1\u2200XYZ"
|
|
1154
|
+
bytestring = b"ABC\xC2\xA1\xE2\x88\x80XYZ"
|
|
1155
|
+
|
|
1156
|
+
reader = codecs.getreader("utf-8-sig")
|
|
1157
|
+
for sizehint in [None] + list(range(1, 11)) + \
|
|
1158
|
+
[64, 128, 256, 512, 1024]:
|
|
1159
|
+
istream = reader(io.BytesIO(bytestring))
|
|
1160
|
+
ostream = io.StringIO()
|
|
1161
|
+
while 1:
|
|
1162
|
+
if sizehint is not None:
|
|
1163
|
+
data = istream.read(sizehint)
|
|
1164
|
+
else:
|
|
1165
|
+
data = istream.read()
|
|
1166
|
+
|
|
1167
|
+
if not data:
|
|
1168
|
+
break
|
|
1169
|
+
ostream.write(data)
|
|
1170
|
+
|
|
1171
|
+
got = ostream.getvalue()
|
|
1172
|
+
self.assertEqual(got, unistring)
|
|
1173
|
+
|
|
1174
|
+
class EscapeDecodeTest(unittest.TestCase):
|
|
1175
|
+
def test_empty(self):
|
|
1176
|
+
self.assertEqual(codecs.escape_decode(b""), (b"", 0))
|
|
1177
|
+
self.assertEqual(codecs.escape_decode(bytearray()), (b"", 0))
|
|
1178
|
+
|
|
1179
|
+
def test_raw(self):
|
|
1180
|
+
decode = codecs.escape_decode
|
|
1181
|
+
for b in range(256):
|
|
1182
|
+
b = bytes([b])
|
|
1183
|
+
if b != b'\\':
|
|
1184
|
+
self.assertEqual(decode(b + b'0'), (b + b'0', 2))
|
|
1185
|
+
|
|
1186
|
+
def test_escape(self):
|
|
1187
|
+
decode = codecs.escape_decode
|
|
1188
|
+
check = coding_checker(self, decode)
|
|
1189
|
+
check(b"[\\\n]", b"[]")
|
|
1190
|
+
check(br'[\"]', b'["]')
|
|
1191
|
+
check(br"[\']", b"[']")
|
|
1192
|
+
check(br"[\\]", b"[\\]")
|
|
1193
|
+
check(br"[\a]", b"[\x07]")
|
|
1194
|
+
check(br"[\b]", b"[\x08]")
|
|
1195
|
+
check(br"[\t]", b"[\x09]")
|
|
1196
|
+
check(br"[\n]", b"[\x0a]")
|
|
1197
|
+
check(br"[\v]", b"[\x0b]")
|
|
1198
|
+
check(br"[\f]", b"[\x0c]")
|
|
1199
|
+
check(br"[\r]", b"[\x0d]")
|
|
1200
|
+
check(br"[\7]", b"[\x07]")
|
|
1201
|
+
check(br"[\78]", b"[\x078]")
|
|
1202
|
+
check(br"[\41]", b"[!]")
|
|
1203
|
+
check(br"[\418]", b"[!8]")
|
|
1204
|
+
check(br"[\101]", b"[A]")
|
|
1205
|
+
check(br"[\1010]", b"[A0]")
|
|
1206
|
+
check(br"[\501]", b"[A]")
|
|
1207
|
+
check(br"[\x41]", b"[A]")
|
|
1208
|
+
check(br"[\x410]", b"[A0]")
|
|
1209
|
+
for i in range(97, 123):
|
|
1210
|
+
b = bytes([i])
|
|
1211
|
+
if b not in b'abfnrtvx':
|
|
1212
|
+
with self.assertWarns(DeprecationWarning):
|
|
1213
|
+
check(b"\\" + b, b"\\" + b)
|
|
1214
|
+
with self.assertWarns(DeprecationWarning):
|
|
1215
|
+
check(b"\\" + b.upper(), b"\\" + b.upper())
|
|
1216
|
+
with self.assertWarns(DeprecationWarning):
|
|
1217
|
+
check(br"\8", b"\\8")
|
|
1218
|
+
with self.assertWarns(DeprecationWarning):
|
|
1219
|
+
check(br"\9", b"\\9")
|
|
1220
|
+
with self.assertWarns(DeprecationWarning):
|
|
1221
|
+
check(b"\\\xfa", b"\\\xfa")
|
|
1222
|
+
|
|
1223
|
+
def test_errors(self):
|
|
1224
|
+
decode = codecs.escape_decode
|
|
1225
|
+
self.assertRaises(ValueError, decode, br"\x")
|
|
1226
|
+
self.assertRaises(ValueError, decode, br"[\x]")
|
|
1227
|
+
self.assertEqual(decode(br"[\x]\x", "ignore"), (b"[]", 6))
|
|
1228
|
+
self.assertEqual(decode(br"[\x]\x", "replace"), (b"[?]?", 6))
|
|
1229
|
+
self.assertRaises(ValueError, decode, br"\x0")
|
|
1230
|
+
self.assertRaises(ValueError, decode, br"[\x0]")
|
|
1231
|
+
self.assertEqual(decode(br"[\x0]\x0", "ignore"), (b"[]", 8))
|
|
1232
|
+
self.assertEqual(decode(br"[\x0]\x0", "replace"), (b"[?]?", 8))
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
class RecodingTest(unittest.TestCase):
|
|
1236
|
+
def test_recoding(self):
|
|
1237
|
+
f = io.BytesIO()
|
|
1238
|
+
f2 = codecs.EncodedFile(f, "unicode_internal", "utf-8")
|
|
1239
|
+
f2.write("a")
|
|
1240
|
+
f2.close()
|
|
1241
|
+
# Python used to crash on this at exit because of a refcount
|
|
1242
|
+
# bug in _codecsmodule.c
|
|
1243
|
+
|
|
1244
|
+
self.assertTrue(f.closed)
|
|
1245
|
+
|
|
1246
|
+
# From RFC 3492
|
|
1247
|
+
punycode_testcases = [
|
|
1248
|
+
# A Arabic (Egyptian):
|
|
1249
|
+
("\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644"
|
|
1250
|
+
"\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F",
|
|
1251
|
+
b"egbpdaj6bu4bxfgehfvwxn"),
|
|
1252
|
+
# B Chinese (simplified):
|
|
1253
|
+
("\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587",
|
|
1254
|
+
b"ihqwcrb4cv8a8dqg056pqjye"),
|
|
1255
|
+
# C Chinese (traditional):
|
|
1256
|
+
("\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587",
|
|
1257
|
+
b"ihqwctvzc91f659drss3x8bo0yb"),
|
|
1258
|
+
# D Czech: Pro<ccaron>prost<ecaron>nemluv<iacute><ccaron>esky
|
|
1259
|
+
("\u0050\u0072\u006F\u010D\u0070\u0072\u006F\u0073\u0074"
|
|
1260
|
+
"\u011B\u006E\u0065\u006D\u006C\u0075\u0076\u00ED\u010D"
|
|
1261
|
+
"\u0065\u0073\u006B\u0079",
|
|
1262
|
+
b"Proprostnemluvesky-uyb24dma41a"),
|
|
1263
|
+
# E Hebrew:
|
|
1264
|
+
("\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8"
|
|
1265
|
+
"\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2"
|
|
1266
|
+
"\u05D1\u05E8\u05D9\u05EA",
|
|
1267
|
+
b"4dbcagdahymbxekheh6e0a7fei0b"),
|
|
1268
|
+
# F Hindi (Devanagari):
|
|
1269
|
+
("\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D"
|
|
1270
|
+
"\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939"
|
|
1271
|
+
"\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947"
|
|
1272
|
+
"\u0939\u0948\u0902",
|
|
1273
|
+
b"i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd"),
|
|
1274
|
+
|
|
1275
|
+
#(G) Japanese (kanji and hiragana):
|
|
1276
|
+
("\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092"
|
|
1277
|
+
"\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B",
|
|
1278
|
+
b"n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa"),
|
|
1279
|
+
|
|
1280
|
+
# (H) Korean (Hangul syllables):
|
|
1281
|
+
("\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774"
|
|
1282
|
+
"\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74"
|
|
1283
|
+
"\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C",
|
|
1284
|
+
b"989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j"
|
|
1285
|
+
b"psd879ccm6fea98c"),
|
|
1286
|
+
|
|
1287
|
+
# (I) Russian (Cyrillic):
|
|
1288
|
+
("\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E"
|
|
1289
|
+
"\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440"
|
|
1290
|
+
"\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A"
|
|
1291
|
+
"\u0438",
|
|
1292
|
+
b"b1abfaaepdrnnbgefbaDotcwatmq2g4l"),
|
|
1293
|
+
|
|
1294
|
+
# (J) Spanish: Porqu<eacute>nopuedensimplementehablarenEspa<ntilde>ol
|
|
1295
|
+
("\u0050\u006F\u0072\u0071\u0075\u00E9\u006E\u006F\u0070"
|
|
1296
|
+
"\u0075\u0065\u0064\u0065\u006E\u0073\u0069\u006D\u0070"
|
|
1297
|
+
"\u006C\u0065\u006D\u0065\u006E\u0074\u0065\u0068\u0061"
|
|
1298
|
+
"\u0062\u006C\u0061\u0072\u0065\u006E\u0045\u0073\u0070"
|
|
1299
|
+
"\u0061\u00F1\u006F\u006C",
|
|
1300
|
+
b"PorqunopuedensimplementehablarenEspaol-fmd56a"),
|
|
1301
|
+
|
|
1302
|
+
# (K) Vietnamese:
|
|
1303
|
+
# T<adotbelow>isaoh<odotbelow>kh<ocirc>ngth<ecirchookabove>ch\
|
|
1304
|
+
# <ihookabove>n<oacute>iti<ecircacute>ngVi<ecircdotbelow>t
|
|
1305
|
+
("\u0054\u1EA1\u0069\u0073\u0061\u006F\u0068\u1ECD\u006B"
|
|
1306
|
+
"\u0068\u00F4\u006E\u0067\u0074\u0068\u1EC3\u0063\u0068"
|
|
1307
|
+
"\u1EC9\u006E\u00F3\u0069\u0074\u0069\u1EBF\u006E\u0067"
|
|
1308
|
+
"\u0056\u0069\u1EC7\u0074",
|
|
1309
|
+
b"TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g"),
|
|
1310
|
+
|
|
1311
|
+
#(L) 3<nen>B<gumi><kinpachi><sensei>
|
|
1312
|
+
("\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F",
|
|
1313
|
+
b"3B-ww4c5e180e575a65lsy2b"),
|
|
1314
|
+
|
|
1315
|
+
# (M) <amuro><namie>-with-SUPER-MONKEYS
|
|
1316
|
+
("\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074"
|
|
1317
|
+
"\u0068\u002D\u0053\u0055\u0050\u0045\u0052\u002D\u004D"
|
|
1318
|
+
"\u004F\u004E\u004B\u0045\u0059\u0053",
|
|
1319
|
+
b"-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n"),
|
|
1320
|
+
|
|
1321
|
+
# (N) Hello-Another-Way-<sorezore><no><basho>
|
|
1322
|
+
("\u0048\u0065\u006C\u006C\u006F\u002D\u0041\u006E\u006F"
|
|
1323
|
+
"\u0074\u0068\u0065\u0072\u002D\u0057\u0061\u0079\u002D"
|
|
1324
|
+
"\u305D\u308C\u305E\u308C\u306E\u5834\u6240",
|
|
1325
|
+
b"Hello-Another-Way--fc4qua05auwb3674vfr0b"),
|
|
1326
|
+
|
|
1327
|
+
# (O) <hitotsu><yane><no><shita>2
|
|
1328
|
+
("\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B\u0032",
|
|
1329
|
+
b"2-u9tlzr9756bt3uc0v"),
|
|
1330
|
+
|
|
1331
|
+
# (P) Maji<de>Koi<suru>5<byou><mae>
|
|
1332
|
+
("\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059"
|
|
1333
|
+
"\u308B\u0035\u79D2\u524D",
|
|
1334
|
+
b"MajiKoi5-783gue6qz075azm5e"),
|
|
1335
|
+
|
|
1336
|
+
# (Q) <pafii>de<runba>
|
|
1337
|
+
("\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0",
|
|
1338
|
+
b"de-jg4avhby1noc0d"),
|
|
1339
|
+
|
|
1340
|
+
# (R) <sono><supiido><de>
|
|
1341
|
+
("\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067",
|
|
1342
|
+
b"d9juau41awczczp"),
|
|
1343
|
+
|
|
1344
|
+
# (S) -> $1.00 <-
|
|
1345
|
+
("\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020"
|
|
1346
|
+
"\u003C\u002D",
|
|
1347
|
+
b"-> $1.00 <--")
|
|
1348
|
+
]
|
|
1349
|
+
|
|
1350
|
+
for i in punycode_testcases:
|
|
1351
|
+
if len(i)!=2:
|
|
1352
|
+
print(repr(i))
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
class PunycodeTest(unittest.TestCase):
|
|
1356
|
+
def test_encode(self):
|
|
1357
|
+
for uni, puny in punycode_testcases:
|
|
1358
|
+
# Need to convert both strings to lower case, since
|
|
1359
|
+
# some of the extended encodings use upper case, but our
|
|
1360
|
+
# code produces only lower case. Converting just puny to
|
|
1361
|
+
# lower is also insufficient, since some of the input characters
|
|
1362
|
+
# are upper case.
|
|
1363
|
+
self.assertEqual(
|
|
1364
|
+
str(uni.encode("punycode"), "ascii").lower(),
|
|
1365
|
+
str(puny, "ascii").lower()
|
|
1366
|
+
)
|
|
1367
|
+
|
|
1368
|
+
def test_decode(self):
|
|
1369
|
+
for uni, puny in punycode_testcases:
|
|
1370
|
+
self.assertEqual(uni, puny.decode("punycode"))
|
|
1371
|
+
puny = puny.decode("ascii").encode("ascii")
|
|
1372
|
+
self.assertEqual(uni, puny.decode("punycode"))
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
class UnicodeInternalTest(unittest.TestCase):
|
|
1376
|
+
@unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
|
|
1377
|
+
def test_bug1251300(self):
|
|
1378
|
+
# Decoding with unicode_internal used to not correctly handle "code
|
|
1379
|
+
# points" above 0x10ffff on UCS-4 builds.
|
|
1380
|
+
ok = [
|
|
1381
|
+
(b"\x00\x10\xff\xff", "\U0010ffff"),
|
|
1382
|
+
(b"\x00\x00\x01\x01", "\U00000101"),
|
|
1383
|
+
(b"", ""),
|
|
1384
|
+
]
|
|
1385
|
+
not_ok = [
|
|
1386
|
+
b"\x7f\xff\xff\xff",
|
|
1387
|
+
b"\x80\x00\x00\x00",
|
|
1388
|
+
b"\x81\x00\x00\x00",
|
|
1389
|
+
b"\x00",
|
|
1390
|
+
b"\x00\x00\x00\x00\x00",
|
|
1391
|
+
]
|
|
1392
|
+
for internal, uni in ok:
|
|
1393
|
+
if sys.byteorder == "little":
|
|
1394
|
+
internal = bytes(reversed(internal))
|
|
1395
|
+
with support.check_warnings():
|
|
1396
|
+
self.assertEqual(uni, internal.decode("unicode_internal"))
|
|
1397
|
+
for internal in not_ok:
|
|
1398
|
+
if sys.byteorder == "little":
|
|
1399
|
+
internal = bytes(reversed(internal))
|
|
1400
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1401
|
+
'deprecated', DeprecationWarning)):
|
|
1402
|
+
self.assertRaises(UnicodeDecodeError, internal.decode,
|
|
1403
|
+
"unicode_internal")
|
|
1404
|
+
if sys.byteorder == "little":
|
|
1405
|
+
invalid = b"\x00\x00\x11\x00"
|
|
1406
|
+
invalid_backslashreplace = r"\x00\x00\x11\x00"
|
|
1407
|
+
else:
|
|
1408
|
+
invalid = b"\x00\x11\x00\x00"
|
|
1409
|
+
invalid_backslashreplace = r"\x00\x11\x00\x00"
|
|
1410
|
+
with support.check_warnings():
|
|
1411
|
+
self.assertRaises(UnicodeDecodeError,
|
|
1412
|
+
invalid.decode, "unicode_internal")
|
|
1413
|
+
with support.check_warnings():
|
|
1414
|
+
self.assertEqual(invalid.decode("unicode_internal", "replace"),
|
|
1415
|
+
'\ufffd')
|
|
1416
|
+
with support.check_warnings():
|
|
1417
|
+
self.assertEqual(invalid.decode("unicode_internal", "backslashreplace"),
|
|
1418
|
+
invalid_backslashreplace)
|
|
1419
|
+
|
|
1420
|
+
@unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
|
|
1421
|
+
def test_decode_error_attributes(self):
|
|
1422
|
+
try:
|
|
1423
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1424
|
+
'deprecated', DeprecationWarning)):
|
|
1425
|
+
b"\x00\x00\x00\x00\x00\x11\x11\x00".decode("unicode_internal")
|
|
1426
|
+
except UnicodeDecodeError as ex:
|
|
1427
|
+
self.assertEqual("unicode_internal", ex.encoding)
|
|
1428
|
+
self.assertEqual(b"\x00\x00\x00\x00\x00\x11\x11\x00", ex.object)
|
|
1429
|
+
self.assertEqual(4, ex.start)
|
|
1430
|
+
self.assertEqual(8, ex.end)
|
|
1431
|
+
else:
|
|
1432
|
+
self.fail()
|
|
1433
|
+
|
|
1434
|
+
@unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
|
|
1435
|
+
def test_decode_callback(self):
|
|
1436
|
+
codecs.register_error("UnicodeInternalTest", codecs.ignore_errors)
|
|
1437
|
+
decoder = codecs.getdecoder("unicode_internal")
|
|
1438
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1439
|
+
'deprecated', DeprecationWarning)):
|
|
1440
|
+
ab = "ab".encode("unicode_internal").decode()
|
|
1441
|
+
ignored = decoder(bytes("%s\x22\x22\x22\x22%s" % (ab[:4], ab[4:]),
|
|
1442
|
+
"ascii"),
|
|
1443
|
+
"UnicodeInternalTest")
|
|
1444
|
+
self.assertEqual(("ab", 12), ignored)
|
|
1445
|
+
|
|
1446
|
+
def test_encode_length(self):
|
|
1447
|
+
with support.check_warnings(('unicode_internal codec has been '
|
|
1448
|
+
'deprecated', DeprecationWarning)):
|
|
1449
|
+
# Issue 3739
|
|
1450
|
+
encoder = codecs.getencoder("unicode_internal")
|
|
1451
|
+
self.assertEqual(encoder("a")[1], 1)
|
|
1452
|
+
self.assertEqual(encoder("\xe9\u0142")[1], 2)
|
|
1453
|
+
|
|
1454
|
+
self.assertEqual(codecs.escape_encode(br'\x00')[1], 4)
|
|
1455
|
+
|
|
1456
|
+
# From http://www.gnu.org/software/libidn/draft-josefsson-idn-test-vectors.html
|
|
1457
|
+
nameprep_tests = [
|
|
1458
|
+
# 3.1 Map to nothing.
|
|
1459
|
+
(b'foo\xc2\xad\xcd\x8f\xe1\xa0\x86\xe1\xa0\x8bbar'
|
|
1460
|
+
b'\xe2\x80\x8b\xe2\x81\xa0baz\xef\xb8\x80\xef\xb8\x88\xef'
|
|
1461
|
+
b'\xb8\x8f\xef\xbb\xbf',
|
|
1462
|
+
b'foobarbaz'),
|
|
1463
|
+
# 3.2 Case folding ASCII U+0043 U+0041 U+0046 U+0045.
|
|
1464
|
+
(b'CAFE',
|
|
1465
|
+
b'cafe'),
|
|
1466
|
+
# 3.3 Case folding 8bit U+00DF (german sharp s).
|
|
1467
|
+
# The original test case is bogus; it says \xc3\xdf
|
|
1468
|
+
(b'\xc3\x9f',
|
|
1469
|
+
b'ss'),
|
|
1470
|
+
# 3.4 Case folding U+0130 (turkish capital I with dot).
|
|
1471
|
+
(b'\xc4\xb0',
|
|
1472
|
+
b'i\xcc\x87'),
|
|
1473
|
+
# 3.5 Case folding multibyte U+0143 U+037A.
|
|
1474
|
+
(b'\xc5\x83\xcd\xba',
|
|
1475
|
+
b'\xc5\x84 \xce\xb9'),
|
|
1476
|
+
# 3.6 Case folding U+2121 U+33C6 U+1D7BB.
|
|
1477
|
+
# XXX: skip this as it fails in UCS-2 mode
|
|
1478
|
+
#('\xe2\x84\xa1\xe3\x8f\x86\xf0\x9d\x9e\xbb',
|
|
1479
|
+
# 'telc\xe2\x88\x95kg\xcf\x83'),
|
|
1480
|
+
(None, None),
|
|
1481
|
+
# 3.7 Normalization of U+006a U+030c U+00A0 U+00AA.
|
|
1482
|
+
(b'j\xcc\x8c\xc2\xa0\xc2\xaa',
|
|
1483
|
+
b'\xc7\xb0 a'),
|
|
1484
|
+
# 3.8 Case folding U+1FB7 and normalization.
|
|
1485
|
+
(b'\xe1\xbe\xb7',
|
|
1486
|
+
b'\xe1\xbe\xb6\xce\xb9'),
|
|
1487
|
+
# 3.9 Self-reverting case folding U+01F0 and normalization.
|
|
1488
|
+
# The original test case is bogus, it says `\xc7\xf0'
|
|
1489
|
+
(b'\xc7\xb0',
|
|
1490
|
+
b'\xc7\xb0'),
|
|
1491
|
+
# 3.10 Self-reverting case folding U+0390 and normalization.
|
|
1492
|
+
(b'\xce\x90',
|
|
1493
|
+
b'\xce\x90'),
|
|
1494
|
+
# 3.11 Self-reverting case folding U+03B0 and normalization.
|
|
1495
|
+
(b'\xce\xb0',
|
|
1496
|
+
b'\xce\xb0'),
|
|
1497
|
+
# 3.12 Self-reverting case folding U+1E96 and normalization.
|
|
1498
|
+
(b'\xe1\xba\x96',
|
|
1499
|
+
b'\xe1\xba\x96'),
|
|
1500
|
+
# 3.13 Self-reverting case folding U+1F56 and normalization.
|
|
1501
|
+
(b'\xe1\xbd\x96',
|
|
1502
|
+
b'\xe1\xbd\x96'),
|
|
1503
|
+
# 3.14 ASCII space character U+0020.
|
|
1504
|
+
(b' ',
|
|
1505
|
+
b' '),
|
|
1506
|
+
# 3.15 Non-ASCII 8bit space character U+00A0.
|
|
1507
|
+
(b'\xc2\xa0',
|
|
1508
|
+
b' '),
|
|
1509
|
+
# 3.16 Non-ASCII multibyte space character U+1680.
|
|
1510
|
+
(b'\xe1\x9a\x80',
|
|
1511
|
+
None),
|
|
1512
|
+
# 3.17 Non-ASCII multibyte space character U+2000.
|
|
1513
|
+
(b'\xe2\x80\x80',
|
|
1514
|
+
b' '),
|
|
1515
|
+
# 3.18 Zero Width Space U+200b.
|
|
1516
|
+
(b'\xe2\x80\x8b',
|
|
1517
|
+
b''),
|
|
1518
|
+
# 3.19 Non-ASCII multibyte space character U+3000.
|
|
1519
|
+
(b'\xe3\x80\x80',
|
|
1520
|
+
b' '),
|
|
1521
|
+
# 3.20 ASCII control characters U+0010 U+007F.
|
|
1522
|
+
(b'\x10\x7f',
|
|
1523
|
+
b'\x10\x7f'),
|
|
1524
|
+
# 3.21 Non-ASCII 8bit control character U+0085.
|
|
1525
|
+
(b'\xc2\x85',
|
|
1526
|
+
None),
|
|
1527
|
+
# 3.22 Non-ASCII multibyte control character U+180E.
|
|
1528
|
+
(b'\xe1\xa0\x8e',
|
|
1529
|
+
None),
|
|
1530
|
+
# 3.23 Zero Width No-Break Space U+FEFF.
|
|
1531
|
+
(b'\xef\xbb\xbf',
|
|
1532
|
+
b''),
|
|
1533
|
+
# 3.24 Non-ASCII control character U+1D175.
|
|
1534
|
+
(b'\xf0\x9d\x85\xb5',
|
|
1535
|
+
None),
|
|
1536
|
+
# 3.25 Plane 0 private use character U+F123.
|
|
1537
|
+
(b'\xef\x84\xa3',
|
|
1538
|
+
None),
|
|
1539
|
+
# 3.26 Plane 15 private use character U+F1234.
|
|
1540
|
+
(b'\xf3\xb1\x88\xb4',
|
|
1541
|
+
None),
|
|
1542
|
+
# 3.27 Plane 16 private use character U+10F234.
|
|
1543
|
+
(b'\xf4\x8f\x88\xb4',
|
|
1544
|
+
None),
|
|
1545
|
+
# 3.28 Non-character code point U+8FFFE.
|
|
1546
|
+
(b'\xf2\x8f\xbf\xbe',
|
|
1547
|
+
None),
|
|
1548
|
+
# 3.29 Non-character code point U+10FFFF.
|
|
1549
|
+
(b'\xf4\x8f\xbf\xbf',
|
|
1550
|
+
None),
|
|
1551
|
+
# 3.30 Surrogate code U+DF42.
|
|
1552
|
+
(b'\xed\xbd\x82',
|
|
1553
|
+
None),
|
|
1554
|
+
# 3.31 Non-plain text character U+FFFD.
|
|
1555
|
+
(b'\xef\xbf\xbd',
|
|
1556
|
+
None),
|
|
1557
|
+
# 3.32 Ideographic description character U+2FF5.
|
|
1558
|
+
(b'\xe2\xbf\xb5',
|
|
1559
|
+
None),
|
|
1560
|
+
# 3.33 Display property character U+0341.
|
|
1561
|
+
(b'\xcd\x81',
|
|
1562
|
+
b'\xcc\x81'),
|
|
1563
|
+
# 3.34 Left-to-right mark U+200E.
|
|
1564
|
+
(b'\xe2\x80\x8e',
|
|
1565
|
+
None),
|
|
1566
|
+
# 3.35 Deprecated U+202A.
|
|
1567
|
+
(b'\xe2\x80\xaa',
|
|
1568
|
+
None),
|
|
1569
|
+
# 3.36 Language tagging character U+E0001.
|
|
1570
|
+
(b'\xf3\xa0\x80\x81',
|
|
1571
|
+
None),
|
|
1572
|
+
# 3.37 Language tagging character U+E0042.
|
|
1573
|
+
(b'\xf3\xa0\x81\x82',
|
|
1574
|
+
None),
|
|
1575
|
+
# 3.38 Bidi: RandALCat character U+05BE and LCat characters.
|
|
1576
|
+
(b'foo\xd6\xbebar',
|
|
1577
|
+
None),
|
|
1578
|
+
# 3.39 Bidi: RandALCat character U+FD50 and LCat characters.
|
|
1579
|
+
(b'foo\xef\xb5\x90bar',
|
|
1580
|
+
None),
|
|
1581
|
+
# 3.40 Bidi: RandALCat character U+FB38 and LCat characters.
|
|
1582
|
+
(b'foo\xef\xb9\xb6bar',
|
|
1583
|
+
b'foo \xd9\x8ebar'),
|
|
1584
|
+
# 3.41 Bidi: RandALCat without trailing RandALCat U+0627 U+0031.
|
|
1585
|
+
(b'\xd8\xa71',
|
|
1586
|
+
None),
|
|
1587
|
+
# 3.42 Bidi: RandALCat character U+0627 U+0031 U+0628.
|
|
1588
|
+
(b'\xd8\xa71\xd8\xa8',
|
|
1589
|
+
b'\xd8\xa71\xd8\xa8'),
|
|
1590
|
+
# 3.43 Unassigned code point U+E0002.
|
|
1591
|
+
# Skip this test as we allow unassigned
|
|
1592
|
+
#(b'\xf3\xa0\x80\x82',
|
|
1593
|
+
# None),
|
|
1594
|
+
(None, None),
|
|
1595
|
+
# 3.44 Larger test (shrinking).
|
|
1596
|
+
# Original test case reads \xc3\xdf
|
|
1597
|
+
(b'X\xc2\xad\xc3\x9f\xc4\xb0\xe2\x84\xa1j\xcc\x8c\xc2\xa0\xc2'
|
|
1598
|
+
b'\xaa\xce\xb0\xe2\x80\x80',
|
|
1599
|
+
b'xssi\xcc\x87tel\xc7\xb0 a\xce\xb0 '),
|
|
1600
|
+
# 3.45 Larger test (expanding).
|
|
1601
|
+
# Original test case reads \xc3\x9f
|
|
1602
|
+
(b'X\xc3\x9f\xe3\x8c\x96\xc4\xb0\xe2\x84\xa1\xe2\x92\x9f\xe3\x8c'
|
|
1603
|
+
b'\x80',
|
|
1604
|
+
b'xss\xe3\x82\xad\xe3\x83\xad\xe3\x83\xa1\xe3\x83\xbc\xe3'
|
|
1605
|
+
b'\x83\x88\xe3\x83\xabi\xcc\x87tel\x28d\x29\xe3\x82'
|
|
1606
|
+
b'\xa2\xe3\x83\x91\xe3\x83\xbc\xe3\x83\x88')
|
|
1607
|
+
]
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
class NameprepTest(unittest.TestCase):
|
|
1611
|
+
def test_nameprep(self):
|
|
1612
|
+
from encodings.idna import nameprep
|
|
1613
|
+
for pos, (orig, prepped) in enumerate(nameprep_tests):
|
|
1614
|
+
if orig is None:
|
|
1615
|
+
# Skipped
|
|
1616
|
+
continue
|
|
1617
|
+
# The Unicode strings are given in UTF-8
|
|
1618
|
+
orig = str(orig, "utf-8", "surrogatepass")
|
|
1619
|
+
if prepped is None:
|
|
1620
|
+
# Input contains prohibited characters
|
|
1621
|
+
self.assertRaises(UnicodeError, nameprep, orig)
|
|
1622
|
+
else:
|
|
1623
|
+
prepped = str(prepped, "utf-8", "surrogatepass")
|
|
1624
|
+
try:
|
|
1625
|
+
self.assertEqual(nameprep(orig), prepped)
|
|
1626
|
+
except Exception as e:
|
|
1627
|
+
raise support.TestFailed("Test 3.%d: %s" % (pos+1, str(e)))
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
class IDNACodecTest(unittest.TestCase):
|
|
1631
|
+
def test_builtin_decode(self):
|
|
1632
|
+
self.assertEqual(str(b"python.org", "idna"), "python.org")
|
|
1633
|
+
self.assertEqual(str(b"python.org.", "idna"), "python.org.")
|
|
1634
|
+
self.assertEqual(str(b"xn--pythn-mua.org", "idna"), "pyth\xf6n.org")
|
|
1635
|
+
self.assertEqual(str(b"xn--pythn-mua.org.", "idna"), "pyth\xf6n.org.")
|
|
1636
|
+
|
|
1637
|
+
def test_builtin_encode(self):
|
|
1638
|
+
self.assertEqual("python.org".encode("idna"), b"python.org")
|
|
1639
|
+
self.assertEqual("python.org.".encode("idna"), b"python.org.")
|
|
1640
|
+
self.assertEqual("pyth\xf6n.org".encode("idna"), b"xn--pythn-mua.org")
|
|
1641
|
+
self.assertEqual("pyth\xf6n.org.".encode("idna"), b"xn--pythn-mua.org.")
|
|
1642
|
+
|
|
1643
|
+
def test_stream(self):
|
|
1644
|
+
r = codecs.getreader("idna")(io.BytesIO(b"abc"))
|
|
1645
|
+
r.read(3)
|
|
1646
|
+
self.assertEqual(r.read(), "")
|
|
1647
|
+
|
|
1648
|
+
def test_incremental_decode(self):
|
|
1649
|
+
self.assertEqual(
|
|
1650
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"python.org"), "idna")),
|
|
1651
|
+
"python.org"
|
|
1652
|
+
)
|
|
1653
|
+
self.assertEqual(
|
|
1654
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"python.org."), "idna")),
|
|
1655
|
+
"python.org."
|
|
1656
|
+
)
|
|
1657
|
+
self.assertEqual(
|
|
1658
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"xn--pythn-mua.org."), "idna")),
|
|
1659
|
+
"pyth\xf6n.org."
|
|
1660
|
+
)
|
|
1661
|
+
self.assertEqual(
|
|
1662
|
+
"".join(codecs.iterdecode((bytes([c]) for c in b"xn--pythn-mua.org."), "idna")),
|
|
1663
|
+
"pyth\xf6n.org."
|
|
1664
|
+
)
|
|
1665
|
+
|
|
1666
|
+
decoder = codecs.getincrementaldecoder("idna")()
|
|
1667
|
+
self.assertEqual(decoder.decode(b"xn--xam", ), "")
|
|
1668
|
+
self.assertEqual(decoder.decode(b"ple-9ta.o", ), "\xe4xample.")
|
|
1669
|
+
self.assertEqual(decoder.decode(b"rg"), "")
|
|
1670
|
+
self.assertEqual(decoder.decode(b"", True), "org")
|
|
1671
|
+
|
|
1672
|
+
decoder.reset()
|
|
1673
|
+
self.assertEqual(decoder.decode(b"xn--xam", ), "")
|
|
1674
|
+
self.assertEqual(decoder.decode(b"ple-9ta.o", ), "\xe4xample.")
|
|
1675
|
+
self.assertEqual(decoder.decode(b"rg."), "org.")
|
|
1676
|
+
self.assertEqual(decoder.decode(b"", True), "")
|
|
1677
|
+
|
|
1678
|
+
def test_incremental_encode(self):
|
|
1679
|
+
self.assertEqual(
|
|
1680
|
+
b"".join(codecs.iterencode("python.org", "idna")),
|
|
1681
|
+
b"python.org"
|
|
1682
|
+
)
|
|
1683
|
+
self.assertEqual(
|
|
1684
|
+
b"".join(codecs.iterencode("python.org.", "idna")),
|
|
1685
|
+
b"python.org."
|
|
1686
|
+
)
|
|
1687
|
+
self.assertEqual(
|
|
1688
|
+
b"".join(codecs.iterencode("pyth\xf6n.org.", "idna")),
|
|
1689
|
+
b"xn--pythn-mua.org."
|
|
1690
|
+
)
|
|
1691
|
+
self.assertEqual(
|
|
1692
|
+
b"".join(codecs.iterencode("pyth\xf6n.org.", "idna")),
|
|
1693
|
+
b"xn--pythn-mua.org."
|
|
1694
|
+
)
|
|
1695
|
+
|
|
1696
|
+
encoder = codecs.getincrementalencoder("idna")()
|
|
1697
|
+
self.assertEqual(encoder.encode("\xe4x"), b"")
|
|
1698
|
+
self.assertEqual(encoder.encode("ample.org"), b"xn--xample-9ta.")
|
|
1699
|
+
self.assertEqual(encoder.encode("", True), b"org")
|
|
1700
|
+
|
|
1701
|
+
encoder.reset()
|
|
1702
|
+
self.assertEqual(encoder.encode("\xe4x"), b"")
|
|
1703
|
+
self.assertEqual(encoder.encode("ample.org."), b"xn--xample-9ta.org.")
|
|
1704
|
+
self.assertEqual(encoder.encode("", True), b"")
|
|
1705
|
+
|
|
1706
|
+
def test_errors(self):
|
|
1707
|
+
"""Only supports "strict" error handler"""
|
|
1708
|
+
"python.org".encode("idna", "strict")
|
|
1709
|
+
b"python.org".decode("idna", "strict")
|
|
1710
|
+
for errors in ("ignore", "replace", "backslashreplace",
|
|
1711
|
+
"surrogateescape"):
|
|
1712
|
+
self.assertRaises(Exception, "python.org".encode, "idna", errors)
|
|
1713
|
+
self.assertRaises(Exception,
|
|
1714
|
+
b"python.org".decode, "idna", errors)
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
class CodecsModuleTest(unittest.TestCase):
|
|
1718
|
+
|
|
1719
|
+
def test_decode(self):
|
|
1720
|
+
self.assertEqual(codecs.decode(b'\xe4\xf6\xfc', 'latin-1'),
|
|
1721
|
+
'\xe4\xf6\xfc')
|
|
1722
|
+
self.assertRaises(TypeError, codecs.decode)
|
|
1723
|
+
self.assertEqual(codecs.decode(b'abc'), 'abc')
|
|
1724
|
+
self.assertRaises(UnicodeDecodeError, codecs.decode, b'\xff', 'ascii')
|
|
1725
|
+
|
|
1726
|
+
# test keywords
|
|
1727
|
+
self.assertEqual(codecs.decode(obj=b'\xe4\xf6\xfc', encoding='latin-1'),
|
|
1728
|
+
'\xe4\xf6\xfc')
|
|
1729
|
+
self.assertEqual(codecs.decode(b'[\xff]', 'ascii', errors='ignore'),
|
|
1730
|
+
'[]')
|
|
1731
|
+
|
|
1732
|
+
def test_encode(self):
|
|
1733
|
+
self.assertEqual(codecs.encode('\xe4\xf6\xfc', 'latin-1'),
|
|
1734
|
+
b'\xe4\xf6\xfc')
|
|
1735
|
+
self.assertRaises(TypeError, codecs.encode)
|
|
1736
|
+
self.assertRaises(LookupError, codecs.encode, "foo", "__spam__")
|
|
1737
|
+
self.assertEqual(codecs.encode('abc'), b'abc')
|
|
1738
|
+
self.assertRaises(UnicodeEncodeError, codecs.encode, '\xffff', 'ascii')
|
|
1739
|
+
|
|
1740
|
+
# test keywords
|
|
1741
|
+
self.assertEqual(codecs.encode(obj='\xe4\xf6\xfc', encoding='latin-1'),
|
|
1742
|
+
b'\xe4\xf6\xfc')
|
|
1743
|
+
self.assertEqual(codecs.encode('[\xff]', 'ascii', errors='ignore'),
|
|
1744
|
+
b'[]')
|
|
1745
|
+
|
|
1746
|
+
def test_register(self):
|
|
1747
|
+
self.assertRaises(TypeError, codecs.register)
|
|
1748
|
+
self.assertRaises(TypeError, codecs.register, 42)
|
|
1749
|
+
|
|
1750
|
+
def test_lookup(self):
|
|
1751
|
+
self.assertRaises(TypeError, codecs.lookup)
|
|
1752
|
+
self.assertRaises(LookupError, codecs.lookup, "__spam__")
|
|
1753
|
+
self.assertRaises(LookupError, codecs.lookup, " ")
|
|
1754
|
+
|
|
1755
|
+
def test_getencoder(self):
|
|
1756
|
+
self.assertRaises(TypeError, codecs.getencoder)
|
|
1757
|
+
self.assertRaises(LookupError, codecs.getencoder, "__spam__")
|
|
1758
|
+
|
|
1759
|
+
def test_getdecoder(self):
|
|
1760
|
+
self.assertRaises(TypeError, codecs.getdecoder)
|
|
1761
|
+
self.assertRaises(LookupError, codecs.getdecoder, "__spam__")
|
|
1762
|
+
|
|
1763
|
+
def test_getreader(self):
|
|
1764
|
+
self.assertRaises(TypeError, codecs.getreader)
|
|
1765
|
+
self.assertRaises(LookupError, codecs.getreader, "__spam__")
|
|
1766
|
+
|
|
1767
|
+
def test_getwriter(self):
|
|
1768
|
+
self.assertRaises(TypeError, codecs.getwriter)
|
|
1769
|
+
self.assertRaises(LookupError, codecs.getwriter, "__spam__")
|
|
1770
|
+
|
|
1771
|
+
def test_lookup_issue1813(self):
|
|
1772
|
+
# Issue #1813: under Turkish locales, lookup of some codecs failed
|
|
1773
|
+
# because 'I' is lowercased as "ı" (dotless i)
|
|
1774
|
+
oldlocale = locale.setlocale(locale.LC_CTYPE)
|
|
1775
|
+
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
|
|
1776
|
+
try:
|
|
1777
|
+
locale.setlocale(locale.LC_CTYPE, 'tr_TR')
|
|
1778
|
+
except locale.Error:
|
|
1779
|
+
# Unsupported locale on this system
|
|
1780
|
+
self.skipTest('test needs Turkish locale')
|
|
1781
|
+
c = codecs.lookup('ASCII')
|
|
1782
|
+
self.assertEqual(c.name, 'ascii')
|
|
1783
|
+
|
|
1784
|
+
def test_all(self):
|
|
1785
|
+
api = (
|
|
1786
|
+
"encode", "decode",
|
|
1787
|
+
"register", "CodecInfo", "Codec", "IncrementalEncoder",
|
|
1788
|
+
"IncrementalDecoder", "StreamReader", "StreamWriter", "lookup",
|
|
1789
|
+
"getencoder", "getdecoder", "getincrementalencoder",
|
|
1790
|
+
"getincrementaldecoder", "getreader", "getwriter",
|
|
1791
|
+
"register_error", "lookup_error",
|
|
1792
|
+
"strict_errors", "replace_errors", "ignore_errors",
|
|
1793
|
+
"xmlcharrefreplace_errors", "backslashreplace_errors",
|
|
1794
|
+
"namereplace_errors",
|
|
1795
|
+
"open", "EncodedFile",
|
|
1796
|
+
"iterencode", "iterdecode",
|
|
1797
|
+
"BOM", "BOM_BE", "BOM_LE",
|
|
1798
|
+
"BOM_UTF8", "BOM_UTF16", "BOM_UTF16_BE", "BOM_UTF16_LE",
|
|
1799
|
+
"BOM_UTF32", "BOM_UTF32_BE", "BOM_UTF32_LE",
|
|
1800
|
+
"BOM32_BE", "BOM32_LE", "BOM64_BE", "BOM64_LE", # Undocumented
|
|
1801
|
+
"StreamReaderWriter", "StreamRecoder",
|
|
1802
|
+
)
|
|
1803
|
+
self.assertCountEqual(api, codecs.__all__)
|
|
1804
|
+
for api in codecs.__all__:
|
|
1805
|
+
getattr(codecs, api)
|
|
1806
|
+
|
|
1807
|
+
def test_open(self):
|
|
1808
|
+
self.addCleanup(support.unlink, support.TESTFN)
|
|
1809
|
+
for mode in ('w', 'r', 'r+', 'w+', 'a', 'a+'):
|
|
1810
|
+
with self.subTest(mode), \
|
|
1811
|
+
codecs.open(support.TESTFN, mode, 'ascii') as file:
|
|
1812
|
+
self.assertIsInstance(file, codecs.StreamReaderWriter)
|
|
1813
|
+
|
|
1814
|
+
def test_undefined(self):
|
|
1815
|
+
self.assertRaises(UnicodeError, codecs.encode, 'abc', 'undefined')
|
|
1816
|
+
self.assertRaises(UnicodeError, codecs.decode, b'abc', 'undefined')
|
|
1817
|
+
self.assertRaises(UnicodeError, codecs.encode, '', 'undefined')
|
|
1818
|
+
self.assertRaises(UnicodeError, codecs.decode, b'', 'undefined')
|
|
1819
|
+
for errors in ('strict', 'ignore', 'replace', 'backslashreplace'):
|
|
1820
|
+
self.assertRaises(UnicodeError,
|
|
1821
|
+
codecs.encode, 'abc', 'undefined', errors)
|
|
1822
|
+
self.assertRaises(UnicodeError,
|
|
1823
|
+
codecs.decode, b'abc', 'undefined', errors)
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
class StreamReaderTest(unittest.TestCase):
|
|
1827
|
+
|
|
1828
|
+
def setUp(self):
|
|
1829
|
+
self.reader = codecs.getreader('utf-8')
|
|
1830
|
+
self.stream = io.BytesIO(b'\xed\x95\x9c\n\xea\xb8\x80')
|
|
1831
|
+
|
|
1832
|
+
def test_readlines(self):
|
|
1833
|
+
f = self.reader(self.stream)
|
|
1834
|
+
self.assertEqual(f.readlines(), ['\ud55c\n', '\uae00'])
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
class EncodedFileTest(unittest.TestCase):
|
|
1838
|
+
|
|
1839
|
+
def test_basic(self):
|
|
1840
|
+
f = io.BytesIO(b'\xed\x95\x9c\n\xea\xb8\x80')
|
|
1841
|
+
ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
|
|
1842
|
+
self.assertEqual(ef.read(), b'\\\xd5\n\x00\x00\xae')
|
|
1843
|
+
|
|
1844
|
+
f = io.BytesIO()
|
|
1845
|
+
ef = codecs.EncodedFile(f, 'utf-8', 'latin-1')
|
|
1846
|
+
ef.write(b'\xc3\xbc')
|
|
1847
|
+
self.assertEqual(f.getvalue(), b'\xfc')
|
|
1848
|
+
|
|
1849
|
+
all_unicode_encodings = [
|
|
1850
|
+
"ascii",
|
|
1851
|
+
"big5",
|
|
1852
|
+
"big5hkscs",
|
|
1853
|
+
"charmap",
|
|
1854
|
+
"cp037",
|
|
1855
|
+
"cp1006",
|
|
1856
|
+
"cp1026",
|
|
1857
|
+
"cp1125",
|
|
1858
|
+
"cp1140",
|
|
1859
|
+
"cp1250",
|
|
1860
|
+
"cp1251",
|
|
1861
|
+
"cp1252",
|
|
1862
|
+
"cp1253",
|
|
1863
|
+
"cp1254",
|
|
1864
|
+
"cp1255",
|
|
1865
|
+
"cp1256",
|
|
1866
|
+
"cp1257",
|
|
1867
|
+
"cp1258",
|
|
1868
|
+
"cp424",
|
|
1869
|
+
"cp437",
|
|
1870
|
+
"cp500",
|
|
1871
|
+
"cp720",
|
|
1872
|
+
"cp737",
|
|
1873
|
+
"cp775",
|
|
1874
|
+
"cp850",
|
|
1875
|
+
"cp852",
|
|
1876
|
+
"cp855",
|
|
1877
|
+
"cp856",
|
|
1878
|
+
"cp857",
|
|
1879
|
+
"cp858",
|
|
1880
|
+
"cp860",
|
|
1881
|
+
"cp861",
|
|
1882
|
+
"cp862",
|
|
1883
|
+
"cp863",
|
|
1884
|
+
"cp864",
|
|
1885
|
+
"cp865",
|
|
1886
|
+
"cp866",
|
|
1887
|
+
"cp869",
|
|
1888
|
+
"cp874",
|
|
1889
|
+
"cp875",
|
|
1890
|
+
"cp932",
|
|
1891
|
+
"cp949",
|
|
1892
|
+
"cp950",
|
|
1893
|
+
"euc_jis_2004",
|
|
1894
|
+
"euc_jisx0213",
|
|
1895
|
+
"euc_jp",
|
|
1896
|
+
"euc_kr",
|
|
1897
|
+
"gb18030",
|
|
1898
|
+
"gb2312",
|
|
1899
|
+
"gbk",
|
|
1900
|
+
"hp_roman8",
|
|
1901
|
+
"hz",
|
|
1902
|
+
"idna",
|
|
1903
|
+
"iso2022_jp",
|
|
1904
|
+
"iso2022_jp_1",
|
|
1905
|
+
"iso2022_jp_2",
|
|
1906
|
+
"iso2022_jp_2004",
|
|
1907
|
+
"iso2022_jp_3",
|
|
1908
|
+
"iso2022_jp_ext",
|
|
1909
|
+
"iso2022_kr",
|
|
1910
|
+
"iso8859_1",
|
|
1911
|
+
"iso8859_10",
|
|
1912
|
+
"iso8859_11",
|
|
1913
|
+
"iso8859_13",
|
|
1914
|
+
"iso8859_14",
|
|
1915
|
+
"iso8859_15",
|
|
1916
|
+
"iso8859_16",
|
|
1917
|
+
"iso8859_2",
|
|
1918
|
+
"iso8859_3",
|
|
1919
|
+
"iso8859_4",
|
|
1920
|
+
"iso8859_5",
|
|
1921
|
+
"iso8859_6",
|
|
1922
|
+
"iso8859_7",
|
|
1923
|
+
"iso8859_8",
|
|
1924
|
+
"iso8859_9",
|
|
1925
|
+
"johab",
|
|
1926
|
+
"koi8_r",
|
|
1927
|
+
"koi8_t",
|
|
1928
|
+
"koi8_u",
|
|
1929
|
+
"kz1048",
|
|
1930
|
+
"latin_1",
|
|
1931
|
+
"mac_cyrillic",
|
|
1932
|
+
"mac_greek",
|
|
1933
|
+
"mac_iceland",
|
|
1934
|
+
"mac_latin2",
|
|
1935
|
+
"mac_roman",
|
|
1936
|
+
"mac_turkish",
|
|
1937
|
+
"palmos",
|
|
1938
|
+
"ptcp154",
|
|
1939
|
+
"punycode",
|
|
1940
|
+
"raw_unicode_escape",
|
|
1941
|
+
"shift_jis",
|
|
1942
|
+
"shift_jis_2004",
|
|
1943
|
+
"shift_jisx0213",
|
|
1944
|
+
"tis_620",
|
|
1945
|
+
"unicode_escape",
|
|
1946
|
+
"unicode_internal",
|
|
1947
|
+
"utf_16",
|
|
1948
|
+
"utf_16_be",
|
|
1949
|
+
"utf_16_le",
|
|
1950
|
+
"utf_7",
|
|
1951
|
+
"utf_8",
|
|
1952
|
+
]
|
|
1953
|
+
|
|
1954
|
+
if hasattr(codecs, "mbcs_encode"):
|
|
1955
|
+
all_unicode_encodings.append("mbcs")
|
|
1956
|
+
if hasattr(codecs, "oem_encode"):
|
|
1957
|
+
all_unicode_encodings.append("oem")
|
|
1958
|
+
|
|
1959
|
+
# The following encoding is not tested, because it's not supposed
|
|
1960
|
+
# to work:
|
|
1961
|
+
# "undefined"
|
|
1962
|
+
|
|
1963
|
+
# The following encodings don't work in stateful mode
|
|
1964
|
+
broken_unicode_with_stateful = [
|
|
1965
|
+
"punycode",
|
|
1966
|
+
"unicode_internal"
|
|
1967
|
+
]
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
class BasicUnicodeTest(unittest.TestCase, MixInCheckStateHandling):
|
|
1971
|
+
def test_basics(self):
|
|
1972
|
+
s = "abc123" # all codecs should be able to encode these
|
|
1973
|
+
for encoding in all_unicode_encodings:
|
|
1974
|
+
name = codecs.lookup(encoding).name
|
|
1975
|
+
if encoding.endswith("_codec"):
|
|
1976
|
+
name += "_codec"
|
|
1977
|
+
elif encoding == "latin_1":
|
|
1978
|
+
name = "latin_1"
|
|
1979
|
+
self.assertEqual(encoding.replace("_", "-"), name.replace("_", "-"))
|
|
1980
|
+
|
|
1981
|
+
with support.check_warnings():
|
|
1982
|
+
# unicode-internal has been deprecated
|
|
1983
|
+
(b, size) = codecs.getencoder(encoding)(s)
|
|
1984
|
+
self.assertEqual(size, len(s), "encoding=%r" % encoding)
|
|
1985
|
+
(chars, size) = codecs.getdecoder(encoding)(b)
|
|
1986
|
+
self.assertEqual(chars, s, "encoding=%r" % encoding)
|
|
1987
|
+
|
|
1988
|
+
if encoding not in broken_unicode_with_stateful:
|
|
1989
|
+
# check stream reader/writer
|
|
1990
|
+
q = Queue(b"")
|
|
1991
|
+
writer = codecs.getwriter(encoding)(q)
|
|
1992
|
+
encodedresult = b""
|
|
1993
|
+
for c in s:
|
|
1994
|
+
writer.write(c)
|
|
1995
|
+
chunk = q.read()
|
|
1996
|
+
self.assertTrue(type(chunk) is bytes, type(chunk))
|
|
1997
|
+
encodedresult += chunk
|
|
1998
|
+
q = Queue(b"")
|
|
1999
|
+
reader = codecs.getreader(encoding)(q)
|
|
2000
|
+
decodedresult = ""
|
|
2001
|
+
for c in encodedresult:
|
|
2002
|
+
q.write(bytes([c]))
|
|
2003
|
+
decodedresult += reader.read()
|
|
2004
|
+
self.assertEqual(decodedresult, s, "encoding=%r" % encoding)
|
|
2005
|
+
|
|
2006
|
+
if encoding not in broken_unicode_with_stateful:
|
|
2007
|
+
# check incremental decoder/encoder and iterencode()/iterdecode()
|
|
2008
|
+
try:
|
|
2009
|
+
encoder = codecs.getincrementalencoder(encoding)()
|
|
2010
|
+
except LookupError: # no IncrementalEncoder
|
|
2011
|
+
pass
|
|
2012
|
+
else:
|
|
2013
|
+
# check incremental decoder/encoder
|
|
2014
|
+
encodedresult = b""
|
|
2015
|
+
for c in s:
|
|
2016
|
+
encodedresult += encoder.encode(c)
|
|
2017
|
+
encodedresult += encoder.encode("", True)
|
|
2018
|
+
decoder = codecs.getincrementaldecoder(encoding)()
|
|
2019
|
+
decodedresult = ""
|
|
2020
|
+
for c in encodedresult:
|
|
2021
|
+
decodedresult += decoder.decode(bytes([c]))
|
|
2022
|
+
decodedresult += decoder.decode(b"", True)
|
|
2023
|
+
self.assertEqual(decodedresult, s,
|
|
2024
|
+
"encoding=%r" % encoding)
|
|
2025
|
+
|
|
2026
|
+
# check iterencode()/iterdecode()
|
|
2027
|
+
result = "".join(codecs.iterdecode(
|
|
2028
|
+
codecs.iterencode(s, encoding), encoding))
|
|
2029
|
+
self.assertEqual(result, s, "encoding=%r" % encoding)
|
|
2030
|
+
|
|
2031
|
+
# check iterencode()/iterdecode() with empty string
|
|
2032
|
+
result = "".join(codecs.iterdecode(
|
|
2033
|
+
codecs.iterencode("", encoding), encoding))
|
|
2034
|
+
self.assertEqual(result, "")
|
|
2035
|
+
|
|
2036
|
+
if encoding not in ("idna", "mbcs"):
|
|
2037
|
+
# check incremental decoder/encoder with errors argument
|
|
2038
|
+
try:
|
|
2039
|
+
encoder = codecs.getincrementalencoder(encoding)("ignore")
|
|
2040
|
+
except LookupError: # no IncrementalEncoder
|
|
2041
|
+
pass
|
|
2042
|
+
else:
|
|
2043
|
+
encodedresult = b"".join(encoder.encode(c) for c in s)
|
|
2044
|
+
decoder = codecs.getincrementaldecoder(encoding)("ignore")
|
|
2045
|
+
decodedresult = "".join(decoder.decode(bytes([c]))
|
|
2046
|
+
for c in encodedresult)
|
|
2047
|
+
self.assertEqual(decodedresult, s,
|
|
2048
|
+
"encoding=%r" % encoding)
|
|
2049
|
+
|
|
2050
|
+
@support.cpython_only
|
|
2051
|
+
def test_basics_capi(self):
|
|
2052
|
+
from _testcapi import codec_incrementalencoder, codec_incrementaldecoder
|
|
2053
|
+
s = "abc123" # all codecs should be able to encode these
|
|
2054
|
+
for encoding in all_unicode_encodings:
|
|
2055
|
+
if encoding not in broken_unicode_with_stateful:
|
|
2056
|
+
# check incremental decoder/encoder (fetched via the C API)
|
|
2057
|
+
try:
|
|
2058
|
+
cencoder = codec_incrementalencoder(encoding)
|
|
2059
|
+
except LookupError: # no IncrementalEncoder
|
|
2060
|
+
pass
|
|
2061
|
+
else:
|
|
2062
|
+
# check C API
|
|
2063
|
+
encodedresult = b""
|
|
2064
|
+
for c in s:
|
|
2065
|
+
encodedresult += cencoder.encode(c)
|
|
2066
|
+
encodedresult += cencoder.encode("", True)
|
|
2067
|
+
cdecoder = codec_incrementaldecoder(encoding)
|
|
2068
|
+
decodedresult = ""
|
|
2069
|
+
for c in encodedresult:
|
|
2070
|
+
decodedresult += cdecoder.decode(bytes([c]))
|
|
2071
|
+
decodedresult += cdecoder.decode(b"", True)
|
|
2072
|
+
self.assertEqual(decodedresult, s,
|
|
2073
|
+
"encoding=%r" % encoding)
|
|
2074
|
+
|
|
2075
|
+
if encoding not in ("idna", "mbcs"):
|
|
2076
|
+
# check incremental decoder/encoder with errors argument
|
|
2077
|
+
try:
|
|
2078
|
+
cencoder = codec_incrementalencoder(encoding, "ignore")
|
|
2079
|
+
except LookupError: # no IncrementalEncoder
|
|
2080
|
+
pass
|
|
2081
|
+
else:
|
|
2082
|
+
encodedresult = b"".join(cencoder.encode(c) for c in s)
|
|
2083
|
+
cdecoder = codec_incrementaldecoder(encoding, "ignore")
|
|
2084
|
+
decodedresult = "".join(cdecoder.decode(bytes([c]))
|
|
2085
|
+
for c in encodedresult)
|
|
2086
|
+
self.assertEqual(decodedresult, s,
|
|
2087
|
+
"encoding=%r" % encoding)
|
|
2088
|
+
|
|
2089
|
+
def test_seek(self):
|
|
2090
|
+
# all codecs should be able to encode these
|
|
2091
|
+
s = "%s\n%s\n" % (100*"abc123", 100*"def456")
|
|
2092
|
+
for encoding in all_unicode_encodings:
|
|
2093
|
+
if encoding == "idna": # FIXME: See SF bug #1163178
|
|
2094
|
+
continue
|
|
2095
|
+
if encoding in broken_unicode_with_stateful:
|
|
2096
|
+
continue
|
|
2097
|
+
reader = codecs.getreader(encoding)(io.BytesIO(s.encode(encoding)))
|
|
2098
|
+
for t in range(5):
|
|
2099
|
+
# Test that calling seek resets the internal codec state and buffers
|
|
2100
|
+
reader.seek(0, 0)
|
|
2101
|
+
data = reader.read()
|
|
2102
|
+
self.assertEqual(s, data)
|
|
2103
|
+
|
|
2104
|
+
def test_bad_decode_args(self):
|
|
2105
|
+
for encoding in all_unicode_encodings:
|
|
2106
|
+
decoder = codecs.getdecoder(encoding)
|
|
2107
|
+
self.assertRaises(TypeError, decoder)
|
|
2108
|
+
if encoding not in ("idna", "punycode"):
|
|
2109
|
+
self.assertRaises(TypeError, decoder, 42)
|
|
2110
|
+
|
|
2111
|
+
def test_bad_encode_args(self):
|
|
2112
|
+
for encoding in all_unicode_encodings:
|
|
2113
|
+
encoder = codecs.getencoder(encoding)
|
|
2114
|
+
with support.check_warnings():
|
|
2115
|
+
# unicode-internal has been deprecated
|
|
2116
|
+
self.assertRaises(TypeError, encoder)
|
|
2117
|
+
|
|
2118
|
+
def test_encoding_map_type_initialized(self):
|
|
2119
|
+
from encodings import cp1140
|
|
2120
|
+
# This used to crash, we are only verifying there's no crash.
|
|
2121
|
+
table_type = type(cp1140.encoding_table)
|
|
2122
|
+
self.assertEqual(table_type, table_type)
|
|
2123
|
+
|
|
2124
|
+
def test_decoder_state(self):
|
|
2125
|
+
# Check that getstate() and setstate() handle the state properly
|
|
2126
|
+
u = "abc123"
|
|
2127
|
+
for encoding in all_unicode_encodings:
|
|
2128
|
+
if encoding not in broken_unicode_with_stateful:
|
|
2129
|
+
self.check_state_handling_decode(encoding, u, u.encode(encoding))
|
|
2130
|
+
self.check_state_handling_encode(encoding, u, u.encode(encoding))
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
class CharmapTest(unittest.TestCase):
|
|
2134
|
+
def test_decode_with_string_map(self):
|
|
2135
|
+
self.assertEqual(
|
|
2136
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict", "abc"),
|
|
2137
|
+
("abc", 3)
|
|
2138
|
+
)
|
|
2139
|
+
|
|
2140
|
+
self.assertEqual(
|
|
2141
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict", "\U0010FFFFbc"),
|
|
2142
|
+
("\U0010FFFFbc", 3)
|
|
2143
|
+
)
|
|
2144
|
+
|
|
2145
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2146
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab"
|
|
2147
|
+
)
|
|
2148
|
+
|
|
2149
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2150
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict", "ab\ufffe"
|
|
2151
|
+
)
|
|
2152
|
+
|
|
2153
|
+
self.assertEqual(
|
|
2154
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace", "ab"),
|
|
2155
|
+
("ab\ufffd", 3)
|
|
2156
|
+
)
|
|
2157
|
+
|
|
2158
|
+
self.assertEqual(
|
|
2159
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace", "ab\ufffe"),
|
|
2160
|
+
("ab\ufffd", 3)
|
|
2161
|
+
)
|
|
2162
|
+
|
|
2163
|
+
self.assertEqual(
|
|
2164
|
+
codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace", "ab"),
|
|
2165
|
+
("ab\\x02", 3)
|
|
2166
|
+
)
|
|
2167
|
+
|
|
2168
|
+
self.assertEqual(
|
|
2169
|
+
codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace", "ab\ufffe"),
|
|
2170
|
+
("ab\\x02", 3)
|
|
2171
|
+
)
|
|
2172
|
+
|
|
2173
|
+
self.assertEqual(
|
|
2174
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore", "ab"),
|
|
2175
|
+
("ab", 3)
|
|
2176
|
+
)
|
|
2177
|
+
|
|
2178
|
+
self.assertEqual(
|
|
2179
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore", "ab\ufffe"),
|
|
2180
|
+
("ab", 3)
|
|
2181
|
+
)
|
|
2182
|
+
|
|
2183
|
+
allbytes = bytes(range(256))
|
|
2184
|
+
self.assertEqual(
|
|
2185
|
+
codecs.charmap_decode(allbytes, "ignore", ""),
|
|
2186
|
+
("", len(allbytes))
|
|
2187
|
+
)
|
|
2188
|
+
|
|
2189
|
+
def test_decode_with_int2str_map(self):
|
|
2190
|
+
self.assertEqual(
|
|
2191
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2192
|
+
{0: 'a', 1: 'b', 2: 'c'}),
|
|
2193
|
+
("abc", 3)
|
|
2194
|
+
)
|
|
2195
|
+
|
|
2196
|
+
self.assertEqual(
|
|
2197
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2198
|
+
{0: 'Aa', 1: 'Bb', 2: 'Cc'}),
|
|
2199
|
+
("AaBbCc", 3)
|
|
2200
|
+
)
|
|
2201
|
+
|
|
2202
|
+
self.assertEqual(
|
|
2203
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2204
|
+
{0: '\U0010FFFF', 1: 'b', 2: 'c'}),
|
|
2205
|
+
("\U0010FFFFbc", 3)
|
|
2206
|
+
)
|
|
2207
|
+
|
|
2208
|
+
self.assertEqual(
|
|
2209
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2210
|
+
{0: 'a', 1: 'b', 2: ''}),
|
|
2211
|
+
("ab", 3)
|
|
2212
|
+
)
|
|
2213
|
+
|
|
2214
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2215
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2216
|
+
{0: 'a', 1: 'b'}
|
|
2217
|
+
)
|
|
2218
|
+
|
|
2219
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2220
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2221
|
+
{0: 'a', 1: 'b', 2: None}
|
|
2222
|
+
)
|
|
2223
|
+
|
|
2224
|
+
# Issue #14850
|
|
2225
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2226
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2227
|
+
{0: 'a', 1: 'b', 2: '\ufffe'}
|
|
2228
|
+
)
|
|
2229
|
+
|
|
2230
|
+
self.assertEqual(
|
|
2231
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2232
|
+
{0: 'a', 1: 'b'}),
|
|
2233
|
+
("ab\ufffd", 3)
|
|
2234
|
+
)
|
|
2235
|
+
|
|
2236
|
+
self.assertEqual(
|
|
2237
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2238
|
+
{0: 'a', 1: 'b', 2: None}),
|
|
2239
|
+
("ab\ufffd", 3)
|
|
2240
|
+
)
|
|
2241
|
+
|
|
2242
|
+
# Issue #14850
|
|
2243
|
+
self.assertEqual(
|
|
2244
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2245
|
+
{0: 'a', 1: 'b', 2: '\ufffe'}),
|
|
2246
|
+
("ab\ufffd", 3)
|
|
2247
|
+
)
|
|
2248
|
+
|
|
2249
|
+
self.assertEqual(
|
|
2250
|
+
codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
|
|
2251
|
+
{0: 'a', 1: 'b'}),
|
|
2252
|
+
("ab\\x02", 3)
|
|
2253
|
+
)
|
|
2254
|
+
|
|
2255
|
+
self.assertEqual(
|
|
2256
|
+
codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
|
|
2257
|
+
{0: 'a', 1: 'b', 2: None}),
|
|
2258
|
+
("ab\\x02", 3)
|
|
2259
|
+
)
|
|
2260
|
+
|
|
2261
|
+
# Issue #14850
|
|
2262
|
+
self.assertEqual(
|
|
2263
|
+
codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
|
|
2264
|
+
{0: 'a', 1: 'b', 2: '\ufffe'}),
|
|
2265
|
+
("ab\\x02", 3)
|
|
2266
|
+
)
|
|
2267
|
+
|
|
2268
|
+
self.assertEqual(
|
|
2269
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2270
|
+
{0: 'a', 1: 'b'}),
|
|
2271
|
+
("ab", 3)
|
|
2272
|
+
)
|
|
2273
|
+
|
|
2274
|
+
self.assertEqual(
|
|
2275
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2276
|
+
{0: 'a', 1: 'b', 2: None}),
|
|
2277
|
+
("ab", 3)
|
|
2278
|
+
)
|
|
2279
|
+
|
|
2280
|
+
# Issue #14850
|
|
2281
|
+
self.assertEqual(
|
|
2282
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2283
|
+
{0: 'a', 1: 'b', 2: '\ufffe'}),
|
|
2284
|
+
("ab", 3)
|
|
2285
|
+
)
|
|
2286
|
+
|
|
2287
|
+
allbytes = bytes(range(256))
|
|
2288
|
+
self.assertEqual(
|
|
2289
|
+
codecs.charmap_decode(allbytes, "ignore", {}),
|
|
2290
|
+
("", len(allbytes))
|
|
2291
|
+
)
|
|
2292
|
+
|
|
2293
|
+
def test_decode_with_int2int_map(self):
|
|
2294
|
+
a = ord('a')
|
|
2295
|
+
b = ord('b')
|
|
2296
|
+
c = ord('c')
|
|
2297
|
+
|
|
2298
|
+
self.assertEqual(
|
|
2299
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2300
|
+
{0: a, 1: b, 2: c}),
|
|
2301
|
+
("abc", 3)
|
|
2302
|
+
)
|
|
2303
|
+
|
|
2304
|
+
# Issue #15379
|
|
2305
|
+
self.assertEqual(
|
|
2306
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2307
|
+
{0: 0x10FFFF, 1: b, 2: c}),
|
|
2308
|
+
("\U0010FFFFbc", 3)
|
|
2309
|
+
)
|
|
2310
|
+
|
|
2311
|
+
self.assertEqual(
|
|
2312
|
+
codecs.charmap_decode(b"\x00\x01\x02", "strict",
|
|
2313
|
+
{0: sys.maxunicode, 1: b, 2: c}),
|
|
2314
|
+
(chr(sys.maxunicode) + "bc", 3)
|
|
2315
|
+
)
|
|
2316
|
+
|
|
2317
|
+
self.assertRaises(TypeError,
|
|
2318
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2319
|
+
{0: sys.maxunicode + 1, 1: b, 2: c}
|
|
2320
|
+
)
|
|
2321
|
+
|
|
2322
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2323
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2324
|
+
{0: a, 1: b},
|
|
2325
|
+
)
|
|
2326
|
+
|
|
2327
|
+
self.assertRaises(UnicodeDecodeError,
|
|
2328
|
+
codecs.charmap_decode, b"\x00\x01\x02", "strict",
|
|
2329
|
+
{0: a, 1: b, 2: 0xFFFE},
|
|
2330
|
+
)
|
|
2331
|
+
|
|
2332
|
+
self.assertEqual(
|
|
2333
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2334
|
+
{0: a, 1: b}),
|
|
2335
|
+
("ab\ufffd", 3)
|
|
2336
|
+
)
|
|
2337
|
+
|
|
2338
|
+
self.assertEqual(
|
|
2339
|
+
codecs.charmap_decode(b"\x00\x01\x02", "replace",
|
|
2340
|
+
{0: a, 1: b, 2: 0xFFFE}),
|
|
2341
|
+
("ab\ufffd", 3)
|
|
2342
|
+
)
|
|
2343
|
+
|
|
2344
|
+
self.assertEqual(
|
|
2345
|
+
codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
|
|
2346
|
+
{0: a, 1: b}),
|
|
2347
|
+
("ab\\x02", 3)
|
|
2348
|
+
)
|
|
2349
|
+
|
|
2350
|
+
self.assertEqual(
|
|
2351
|
+
codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
|
|
2352
|
+
{0: a, 1: b, 2: 0xFFFE}),
|
|
2353
|
+
("ab\\x02", 3)
|
|
2354
|
+
)
|
|
2355
|
+
|
|
2356
|
+
self.assertEqual(
|
|
2357
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2358
|
+
{0: a, 1: b}),
|
|
2359
|
+
("ab", 3)
|
|
2360
|
+
)
|
|
2361
|
+
|
|
2362
|
+
self.assertEqual(
|
|
2363
|
+
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
|
|
2364
|
+
{0: a, 1: b, 2: 0xFFFE}),
|
|
2365
|
+
("ab", 3)
|
|
2366
|
+
)
|
|
2367
|
+
|
|
2368
|
+
|
|
2369
|
+
class WithStmtTest(unittest.TestCase):
|
|
2370
|
+
def test_encodedfile(self):
|
|
2371
|
+
f = io.BytesIO(b"\xc3\xbc")
|
|
2372
|
+
with codecs.EncodedFile(f, "latin-1", "utf-8") as ef:
|
|
2373
|
+
self.assertEqual(ef.read(), b"\xfc")
|
|
2374
|
+
self.assertTrue(f.closed)
|
|
2375
|
+
|
|
2376
|
+
def test_streamreaderwriter(self):
|
|
2377
|
+
f = io.BytesIO(b"\xc3\xbc")
|
|
2378
|
+
info = codecs.lookup("utf-8")
|
|
2379
|
+
with codecs.StreamReaderWriter(f, info.streamreader,
|
|
2380
|
+
info.streamwriter, 'strict') as srw:
|
|
2381
|
+
self.assertEqual(srw.read(), "\xfc")
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
class TypesTest(unittest.TestCase):
|
|
2385
|
+
def test_decode_unicode(self):
|
|
2386
|
+
# Most decoders don't accept unicode input
|
|
2387
|
+
decoders = [
|
|
2388
|
+
codecs.utf_7_decode,
|
|
2389
|
+
codecs.utf_8_decode,
|
|
2390
|
+
codecs.utf_16_le_decode,
|
|
2391
|
+
codecs.utf_16_be_decode,
|
|
2392
|
+
codecs.utf_16_ex_decode,
|
|
2393
|
+
codecs.utf_32_decode,
|
|
2394
|
+
codecs.utf_32_le_decode,
|
|
2395
|
+
codecs.utf_32_be_decode,
|
|
2396
|
+
codecs.utf_32_ex_decode,
|
|
2397
|
+
codecs.latin_1_decode,
|
|
2398
|
+
codecs.ascii_decode,
|
|
2399
|
+
codecs.charmap_decode,
|
|
2400
|
+
]
|
|
2401
|
+
if hasattr(codecs, "mbcs_decode"):
|
|
2402
|
+
decoders.append(codecs.mbcs_decode)
|
|
2403
|
+
for decoder in decoders:
|
|
2404
|
+
self.assertRaises(TypeError, decoder, "xxx")
|
|
2405
|
+
|
|
2406
|
+
def test_unicode_escape(self):
|
|
2407
|
+
# Escape-decoding a unicode string is supported and gives the same
|
|
2408
|
+
# result as decoding the equivalent ASCII bytes string.
|
|
2409
|
+
self.assertEqual(codecs.unicode_escape_decode(r"\u1234"), ("\u1234", 6))
|
|
2410
|
+
self.assertEqual(codecs.unicode_escape_decode(br"\u1234"), ("\u1234", 6))
|
|
2411
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(r"\u1234"), ("\u1234", 6))
|
|
2412
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(br"\u1234"), ("\u1234", 6))
|
|
2413
|
+
|
|
2414
|
+
self.assertRaises(UnicodeDecodeError, codecs.unicode_escape_decode, br"\U00110000")
|
|
2415
|
+
self.assertEqual(codecs.unicode_escape_decode(r"\U00110000", "replace"), ("\ufffd", 10))
|
|
2416
|
+
self.assertEqual(codecs.unicode_escape_decode(r"\U00110000", "backslashreplace"),
|
|
2417
|
+
(r"\x5c\x55\x30\x30\x31\x31\x30\x30\x30\x30", 10))
|
|
2418
|
+
|
|
2419
|
+
self.assertRaises(UnicodeDecodeError, codecs.raw_unicode_escape_decode, br"\U00110000")
|
|
2420
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(r"\U00110000", "replace"), ("\ufffd", 10))
|
|
2421
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(r"\U00110000", "backslashreplace"),
|
|
2422
|
+
(r"\x5c\x55\x30\x30\x31\x31\x30\x30\x30\x30", 10))
|
|
2423
|
+
|
|
2424
|
+
|
|
2425
|
+
class UnicodeEscapeTest(unittest.TestCase):
|
|
2426
|
+
def test_empty(self):
|
|
2427
|
+
self.assertEqual(codecs.unicode_escape_encode(""), (b"", 0))
|
|
2428
|
+
self.assertEqual(codecs.unicode_escape_decode(b""), ("", 0))
|
|
2429
|
+
|
|
2430
|
+
def test_raw_encode(self):
|
|
2431
|
+
encode = codecs.unicode_escape_encode
|
|
2432
|
+
for b in range(32, 127):
|
|
2433
|
+
if b != b'\\'[0]:
|
|
2434
|
+
self.assertEqual(encode(chr(b)), (bytes([b]), 1))
|
|
2435
|
+
|
|
2436
|
+
def test_raw_decode(self):
|
|
2437
|
+
decode = codecs.unicode_escape_decode
|
|
2438
|
+
for b in range(256):
|
|
2439
|
+
if b != b'\\'[0]:
|
|
2440
|
+
self.assertEqual(decode(bytes([b]) + b'0'), (chr(b) + '0', 2))
|
|
2441
|
+
|
|
2442
|
+
def test_escape_encode(self):
|
|
2443
|
+
encode = codecs.unicode_escape_encode
|
|
2444
|
+
check = coding_checker(self, encode)
|
|
2445
|
+
check('\t', br'\t')
|
|
2446
|
+
check('\n', br'\n')
|
|
2447
|
+
check('\r', br'\r')
|
|
2448
|
+
check('\\', br'\\')
|
|
2449
|
+
for b in range(32):
|
|
2450
|
+
if chr(b) not in '\t\n\r':
|
|
2451
|
+
check(chr(b), ('\\x%02x' % b).encode())
|
|
2452
|
+
for b in range(127, 256):
|
|
2453
|
+
check(chr(b), ('\\x%02x' % b).encode())
|
|
2454
|
+
check('\u20ac', br'\u20ac')
|
|
2455
|
+
check('\U0001d120', br'\U0001d120')
|
|
2456
|
+
|
|
2457
|
+
def test_escape_decode(self):
|
|
2458
|
+
decode = codecs.unicode_escape_decode
|
|
2459
|
+
check = coding_checker(self, decode)
|
|
2460
|
+
check(b"[\\\n]", "[]")
|
|
2461
|
+
check(br'[\"]', '["]')
|
|
2462
|
+
check(br"[\']", "[']")
|
|
2463
|
+
check(br"[\\]", r"[\]")
|
|
2464
|
+
check(br"[\a]", "[\x07]")
|
|
2465
|
+
check(br"[\b]", "[\x08]")
|
|
2466
|
+
check(br"[\t]", "[\x09]")
|
|
2467
|
+
check(br"[\n]", "[\x0a]")
|
|
2468
|
+
check(br"[\v]", "[\x0b]")
|
|
2469
|
+
check(br"[\f]", "[\x0c]")
|
|
2470
|
+
check(br"[\r]", "[\x0d]")
|
|
2471
|
+
check(br"[\7]", "[\x07]")
|
|
2472
|
+
check(br"[\78]", "[\x078]")
|
|
2473
|
+
check(br"[\41]", "[!]")
|
|
2474
|
+
check(br"[\418]", "[!8]")
|
|
2475
|
+
check(br"[\101]", "[A]")
|
|
2476
|
+
check(br"[\1010]", "[A0]")
|
|
2477
|
+
check(br"[\x41]", "[A]")
|
|
2478
|
+
check(br"[\x410]", "[A0]")
|
|
2479
|
+
check(br"\u20ac", "\u20ac")
|
|
2480
|
+
check(br"\U0001d120", "\U0001d120")
|
|
2481
|
+
for i in range(97, 123):
|
|
2482
|
+
b = bytes([i])
|
|
2483
|
+
if b not in b'abfnrtuvx':
|
|
2484
|
+
with self.assertWarns(DeprecationWarning):
|
|
2485
|
+
check(b"\\" + b, "\\" + chr(i))
|
|
2486
|
+
if b.upper() not in b'UN':
|
|
2487
|
+
with self.assertWarns(DeprecationWarning):
|
|
2488
|
+
check(b"\\" + b.upper(), "\\" + chr(i-32))
|
|
2489
|
+
with self.assertWarns(DeprecationWarning):
|
|
2490
|
+
check(br"\8", "\\8")
|
|
2491
|
+
with self.assertWarns(DeprecationWarning):
|
|
2492
|
+
check(br"\9", "\\9")
|
|
2493
|
+
with self.assertWarns(DeprecationWarning):
|
|
2494
|
+
check(b"\\\xfa", "\\\xfa")
|
|
2495
|
+
|
|
2496
|
+
def test_decode_errors(self):
|
|
2497
|
+
decode = codecs.unicode_escape_decode
|
|
2498
|
+
for c, d in (b'x', 2), (b'u', 4), (b'U', 4):
|
|
2499
|
+
for i in range(d):
|
|
2500
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2501
|
+
b"\\" + c + b"0"*i)
|
|
2502
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2503
|
+
b"[\\" + c + b"0"*i + b"]")
|
|
2504
|
+
data = b"[\\" + c + b"0"*i + b"]\\" + c + b"0"*i
|
|
2505
|
+
self.assertEqual(decode(data, "ignore"), ("[]", len(data)))
|
|
2506
|
+
self.assertEqual(decode(data, "replace"),
|
|
2507
|
+
("[\ufffd]\ufffd", len(data)))
|
|
2508
|
+
self.assertRaises(UnicodeDecodeError, decode, br"\U00110000")
|
|
2509
|
+
self.assertEqual(decode(br"\U00110000", "ignore"), ("", 10))
|
|
2510
|
+
self.assertEqual(decode(br"\U00110000", "replace"), ("\ufffd", 10))
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
class RawUnicodeEscapeTest(unittest.TestCase):
|
|
2514
|
+
def test_empty(self):
|
|
2515
|
+
self.assertEqual(codecs.raw_unicode_escape_encode(""), (b"", 0))
|
|
2516
|
+
self.assertEqual(codecs.raw_unicode_escape_decode(b""), ("", 0))
|
|
2517
|
+
|
|
2518
|
+
def test_raw_encode(self):
|
|
2519
|
+
encode = codecs.raw_unicode_escape_encode
|
|
2520
|
+
for b in range(256):
|
|
2521
|
+
self.assertEqual(encode(chr(b)), (bytes([b]), 1))
|
|
2522
|
+
|
|
2523
|
+
def test_raw_decode(self):
|
|
2524
|
+
decode = codecs.raw_unicode_escape_decode
|
|
2525
|
+
for b in range(256):
|
|
2526
|
+
self.assertEqual(decode(bytes([b]) + b'0'), (chr(b) + '0', 2))
|
|
2527
|
+
|
|
2528
|
+
def test_escape_encode(self):
|
|
2529
|
+
encode = codecs.raw_unicode_escape_encode
|
|
2530
|
+
check = coding_checker(self, encode)
|
|
2531
|
+
for b in range(256):
|
|
2532
|
+
if b not in b'uU':
|
|
2533
|
+
check('\\' + chr(b), b'\\' + bytes([b]))
|
|
2534
|
+
check('\u20ac', br'\u20ac')
|
|
2535
|
+
check('\U0001d120', br'\U0001d120')
|
|
2536
|
+
|
|
2537
|
+
def test_escape_decode(self):
|
|
2538
|
+
decode = codecs.raw_unicode_escape_decode
|
|
2539
|
+
check = coding_checker(self, decode)
|
|
2540
|
+
for b in range(256):
|
|
2541
|
+
if b not in b'uU':
|
|
2542
|
+
check(b'\\' + bytes([b]), '\\' + chr(b))
|
|
2543
|
+
check(br"\u20ac", "\u20ac")
|
|
2544
|
+
check(br"\U0001d120", "\U0001d120")
|
|
2545
|
+
|
|
2546
|
+
def test_decode_errors(self):
|
|
2547
|
+
decode = codecs.raw_unicode_escape_decode
|
|
2548
|
+
for c, d in (b'u', 4), (b'U', 4):
|
|
2549
|
+
for i in range(d):
|
|
2550
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2551
|
+
b"\\" + c + b"0"*i)
|
|
2552
|
+
self.assertRaises(UnicodeDecodeError, decode,
|
|
2553
|
+
b"[\\" + c + b"0"*i + b"]")
|
|
2554
|
+
data = b"[\\" + c + b"0"*i + b"]\\" + c + b"0"*i
|
|
2555
|
+
self.assertEqual(decode(data, "ignore"), ("[]", len(data)))
|
|
2556
|
+
self.assertEqual(decode(data, "replace"),
|
|
2557
|
+
("[\ufffd]\ufffd", len(data)))
|
|
2558
|
+
self.assertRaises(UnicodeDecodeError, decode, br"\U00110000")
|
|
2559
|
+
self.assertEqual(decode(br"\U00110000", "ignore"), ("", 10))
|
|
2560
|
+
self.assertEqual(decode(br"\U00110000", "replace"), ("\ufffd", 10))
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
class EscapeEncodeTest(unittest.TestCase):
|
|
2564
|
+
|
|
2565
|
+
def test_escape_encode(self):
|
|
2566
|
+
tests = [
|
|
2567
|
+
(b'', (b'', 0)),
|
|
2568
|
+
(b'foobar', (b'foobar', 6)),
|
|
2569
|
+
(b'spam\0eggs', (b'spam\\x00eggs', 9)),
|
|
2570
|
+
(b'a\'b', (b"a\\'b", 3)),
|
|
2571
|
+
(b'b\\c', (b'b\\\\c', 3)),
|
|
2572
|
+
(b'c\nd', (b'c\\nd', 3)),
|
|
2573
|
+
(b'd\re', (b'd\\re', 3)),
|
|
2574
|
+
(b'f\x7fg', (b'f\\x7fg', 3)),
|
|
2575
|
+
]
|
|
2576
|
+
for data, output in tests:
|
|
2577
|
+
with self.subTest(data=data):
|
|
2578
|
+
self.assertEqual(codecs.escape_encode(data), output)
|
|
2579
|
+
self.assertRaises(TypeError, codecs.escape_encode, 'spam')
|
|
2580
|
+
self.assertRaises(TypeError, codecs.escape_encode, bytearray(b'spam'))
|
|
2581
|
+
|
|
2582
|
+
|
|
2583
|
+
class SurrogateEscapeTest(unittest.TestCase):
|
|
2584
|
+
|
|
2585
|
+
def test_utf8(self):
|
|
2586
|
+
# Bad byte
|
|
2587
|
+
self.assertEqual(b"foo\x80bar".decode("utf-8", "surrogateescape"),
|
|
2588
|
+
"foo\udc80bar")
|
|
2589
|
+
self.assertEqual("foo\udc80bar".encode("utf-8", "surrogateescape"),
|
|
2590
|
+
b"foo\x80bar")
|
|
2591
|
+
# bad-utf-8 encoded surrogate
|
|
2592
|
+
self.assertEqual(b"\xed\xb0\x80".decode("utf-8", "surrogateescape"),
|
|
2593
|
+
"\udced\udcb0\udc80")
|
|
2594
|
+
self.assertEqual("\udced\udcb0\udc80".encode("utf-8", "surrogateescape"),
|
|
2595
|
+
b"\xed\xb0\x80")
|
|
2596
|
+
|
|
2597
|
+
def test_ascii(self):
|
|
2598
|
+
# bad byte
|
|
2599
|
+
self.assertEqual(b"foo\x80bar".decode("ascii", "surrogateescape"),
|
|
2600
|
+
"foo\udc80bar")
|
|
2601
|
+
self.assertEqual("foo\udc80bar".encode("ascii", "surrogateescape"),
|
|
2602
|
+
b"foo\x80bar")
|
|
2603
|
+
|
|
2604
|
+
def test_charmap(self):
|
|
2605
|
+
# bad byte: \xa5 is unmapped in iso-8859-3
|
|
2606
|
+
self.assertEqual(b"foo\xa5bar".decode("iso-8859-3", "surrogateescape"),
|
|
2607
|
+
"foo\udca5bar")
|
|
2608
|
+
self.assertEqual("foo\udca5bar".encode("iso-8859-3", "surrogateescape"),
|
|
2609
|
+
b"foo\xa5bar")
|
|
2610
|
+
|
|
2611
|
+
def test_latin1(self):
|
|
2612
|
+
# Issue6373
|
|
2613
|
+
self.assertEqual("\udce4\udceb\udcef\udcf6\udcfc".encode("latin-1", "surrogateescape"),
|
|
2614
|
+
b"\xe4\xeb\xef\xf6\xfc")
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
class BomTest(unittest.TestCase):
|
|
2618
|
+
def test_seek0(self):
|
|
2619
|
+
data = "1234567890"
|
|
2620
|
+
tests = ("utf-16",
|
|
2621
|
+
"utf-16-le",
|
|
2622
|
+
"utf-16-be",
|
|
2623
|
+
"utf-32",
|
|
2624
|
+
"utf-32-le",
|
|
2625
|
+
"utf-32-be")
|
|
2626
|
+
self.addCleanup(support.unlink, support.TESTFN)
|
|
2627
|
+
for encoding in tests:
|
|
2628
|
+
# Check if the BOM is written only once
|
|
2629
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2630
|
+
f.write(data)
|
|
2631
|
+
f.write(data)
|
|
2632
|
+
f.seek(0)
|
|
2633
|
+
self.assertEqual(f.read(), data * 2)
|
|
2634
|
+
f.seek(0)
|
|
2635
|
+
self.assertEqual(f.read(), data * 2)
|
|
2636
|
+
|
|
2637
|
+
# Check that the BOM is written after a seek(0)
|
|
2638
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2639
|
+
f.write(data[0])
|
|
2640
|
+
self.assertNotEqual(f.tell(), 0)
|
|
2641
|
+
f.seek(0)
|
|
2642
|
+
f.write(data)
|
|
2643
|
+
f.seek(0)
|
|
2644
|
+
self.assertEqual(f.read(), data)
|
|
2645
|
+
|
|
2646
|
+
# (StreamWriter) Check that the BOM is written after a seek(0)
|
|
2647
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2648
|
+
f.writer.write(data[0])
|
|
2649
|
+
self.assertNotEqual(f.writer.tell(), 0)
|
|
2650
|
+
f.writer.seek(0)
|
|
2651
|
+
f.writer.write(data)
|
|
2652
|
+
f.seek(0)
|
|
2653
|
+
self.assertEqual(f.read(), data)
|
|
2654
|
+
|
|
2655
|
+
# Check that the BOM is not written after a seek() at a position
|
|
2656
|
+
# different than the start
|
|
2657
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2658
|
+
f.write(data)
|
|
2659
|
+
f.seek(f.tell())
|
|
2660
|
+
f.write(data)
|
|
2661
|
+
f.seek(0)
|
|
2662
|
+
self.assertEqual(f.read(), data * 2)
|
|
2663
|
+
|
|
2664
|
+
# (StreamWriter) Check that the BOM is not written after a seek()
|
|
2665
|
+
# at a position different than the start
|
|
2666
|
+
with codecs.open(support.TESTFN, 'w+', encoding=encoding) as f:
|
|
2667
|
+
f.writer.write(data)
|
|
2668
|
+
f.writer.seek(f.writer.tell())
|
|
2669
|
+
f.writer.write(data)
|
|
2670
|
+
f.seek(0)
|
|
2671
|
+
self.assertEqual(f.read(), data * 2)
|
|
2672
|
+
|
|
2673
|
+
|
|
2674
|
+
bytes_transform_encodings = [
|
|
2675
|
+
"base64_codec",
|
|
2676
|
+
"uu_codec",
|
|
2677
|
+
"quopri_codec",
|
|
2678
|
+
"hex_codec",
|
|
2679
|
+
]
|
|
2680
|
+
|
|
2681
|
+
transform_aliases = {
|
|
2682
|
+
"base64_codec": ["base64", "base_64"],
|
|
2683
|
+
"uu_codec": ["uu"],
|
|
2684
|
+
"quopri_codec": ["quopri", "quoted_printable", "quotedprintable"],
|
|
2685
|
+
"hex_codec": ["hex"],
|
|
2686
|
+
"rot_13": ["rot13"],
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
try:
|
|
2690
|
+
import zlib
|
|
2691
|
+
except ImportError:
|
|
2692
|
+
zlib = None
|
|
2693
|
+
else:
|
|
2694
|
+
bytes_transform_encodings.append("zlib_codec")
|
|
2695
|
+
transform_aliases["zlib_codec"] = ["zip", "zlib"]
|
|
2696
|
+
try:
|
|
2697
|
+
import bz2
|
|
2698
|
+
except ImportError:
|
|
2699
|
+
pass
|
|
2700
|
+
else:
|
|
2701
|
+
bytes_transform_encodings.append("bz2_codec")
|
|
2702
|
+
transform_aliases["bz2_codec"] = ["bz2"]
|
|
2703
|
+
|
|
2704
|
+
|
|
2705
|
+
class TransformCodecTest(unittest.TestCase):
|
|
2706
|
+
|
|
2707
|
+
def test_basics(self):
|
|
2708
|
+
binput = bytes(range(256))
|
|
2709
|
+
for encoding in bytes_transform_encodings:
|
|
2710
|
+
with self.subTest(encoding=encoding):
|
|
2711
|
+
# generic codecs interface
|
|
2712
|
+
(o, size) = codecs.getencoder(encoding)(binput)
|
|
2713
|
+
self.assertEqual(size, len(binput))
|
|
2714
|
+
(i, size) = codecs.getdecoder(encoding)(o)
|
|
2715
|
+
self.assertEqual(size, len(o))
|
|
2716
|
+
self.assertEqual(i, binput)
|
|
2717
|
+
|
|
2718
|
+
def test_read(self):
|
|
2719
|
+
for encoding in bytes_transform_encodings:
|
|
2720
|
+
with self.subTest(encoding=encoding):
|
|
2721
|
+
sin = codecs.encode(b"\x80", encoding)
|
|
2722
|
+
reader = codecs.getreader(encoding)(io.BytesIO(sin))
|
|
2723
|
+
sout = reader.read()
|
|
2724
|
+
self.assertEqual(sout, b"\x80")
|
|
2725
|
+
|
|
2726
|
+
def test_readline(self):
|
|
2727
|
+
for encoding in bytes_transform_encodings:
|
|
2728
|
+
with self.subTest(encoding=encoding):
|
|
2729
|
+
sin = codecs.encode(b"\x80", encoding)
|
|
2730
|
+
reader = codecs.getreader(encoding)(io.BytesIO(sin))
|
|
2731
|
+
sout = reader.readline()
|
|
2732
|
+
self.assertEqual(sout, b"\x80")
|
|
2733
|
+
|
|
2734
|
+
def test_buffer_api_usage(self):
|
|
2735
|
+
# We check all the transform codecs accept memoryview input
|
|
2736
|
+
# for encoding and decoding
|
|
2737
|
+
# and also that they roundtrip correctly
|
|
2738
|
+
original = b"12345\x80"
|
|
2739
|
+
for encoding in bytes_transform_encodings:
|
|
2740
|
+
with self.subTest(encoding=encoding):
|
|
2741
|
+
data = original
|
|
2742
|
+
view = memoryview(data)
|
|
2743
|
+
data = codecs.encode(data, encoding)
|
|
2744
|
+
view_encoded = codecs.encode(view, encoding)
|
|
2745
|
+
self.assertEqual(view_encoded, data)
|
|
2746
|
+
view = memoryview(data)
|
|
2747
|
+
data = codecs.decode(data, encoding)
|
|
2748
|
+
self.assertEqual(data, original)
|
|
2749
|
+
view_decoded = codecs.decode(view, encoding)
|
|
2750
|
+
self.assertEqual(view_decoded, data)
|
|
2751
|
+
|
|
2752
|
+
def test_text_to_binary_blacklists_binary_transforms(self):
|
|
2753
|
+
# Check binary -> binary codecs give a good error for str input
|
|
2754
|
+
bad_input = "bad input type"
|
|
2755
|
+
for encoding in bytes_transform_encodings:
|
|
2756
|
+
with self.subTest(encoding=encoding):
|
|
2757
|
+
fmt = (r"{!r} is not a text encoding; "
|
|
2758
|
+
r"use codecs.encode\(\) to handle arbitrary codecs")
|
|
2759
|
+
msg = fmt.format(encoding)
|
|
2760
|
+
with self.assertRaisesRegex(LookupError, msg) as failure:
|
|
2761
|
+
bad_input.encode(encoding)
|
|
2762
|
+
self.assertIsNone(failure.exception.__cause__)
|
|
2763
|
+
|
|
2764
|
+
def test_text_to_binary_blacklists_text_transforms(self):
|
|
2765
|
+
# Check str.encode gives a good error message for str -> str codecs
|
|
2766
|
+
msg = (r"^'rot_13' is not a text encoding; "
|
|
2767
|
+
r"use codecs.encode\(\) to handle arbitrary codecs")
|
|
2768
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2769
|
+
"just an example message".encode("rot_13")
|
|
2770
|
+
|
|
2771
|
+
def test_binary_to_text_blacklists_binary_transforms(self):
|
|
2772
|
+
# Check bytes.decode and bytearray.decode give a good error
|
|
2773
|
+
# message for binary -> binary codecs
|
|
2774
|
+
data = b"encode first to ensure we meet any format restrictions"
|
|
2775
|
+
for encoding in bytes_transform_encodings:
|
|
2776
|
+
with self.subTest(encoding=encoding):
|
|
2777
|
+
encoded_data = codecs.encode(data, encoding)
|
|
2778
|
+
fmt = (r"{!r} is not a text encoding; "
|
|
2779
|
+
r"use codecs.decode\(\) to handle arbitrary codecs")
|
|
2780
|
+
msg = fmt.format(encoding)
|
|
2781
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2782
|
+
encoded_data.decode(encoding)
|
|
2783
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2784
|
+
bytearray(encoded_data).decode(encoding)
|
|
2785
|
+
|
|
2786
|
+
def test_binary_to_text_blacklists_text_transforms(self):
|
|
2787
|
+
# Check str -> str codec gives a good error for binary input
|
|
2788
|
+
for bad_input in (b"immutable", bytearray(b"mutable")):
|
|
2789
|
+
with self.subTest(bad_input=bad_input):
|
|
2790
|
+
msg = (r"^'rot_13' is not a text encoding; "
|
|
2791
|
+
r"use codecs.decode\(\) to handle arbitrary codecs")
|
|
2792
|
+
with self.assertRaisesRegex(LookupError, msg) as failure:
|
|
2793
|
+
bad_input.decode("rot_13")
|
|
2794
|
+
self.assertIsNone(failure.exception.__cause__)
|
|
2795
|
+
|
|
2796
|
+
@unittest.skipUnless(zlib, "Requires zlib support")
|
|
2797
|
+
def test_custom_zlib_error_is_wrapped(self):
|
|
2798
|
+
# Check zlib codec gives a good error for malformed input
|
|
2799
|
+
msg = "^decoding with 'zlib_codec' codec failed"
|
|
2800
|
+
with self.assertRaisesRegex(Exception, msg) as failure:
|
|
2801
|
+
codecs.decode(b"hello", "zlib_codec")
|
|
2802
|
+
self.assertIsInstance(failure.exception.__cause__,
|
|
2803
|
+
type(failure.exception))
|
|
2804
|
+
|
|
2805
|
+
def test_custom_hex_error_is_wrapped(self):
|
|
2806
|
+
# Check hex codec gives a good error for malformed input
|
|
2807
|
+
msg = "^decoding with 'hex_codec' codec failed"
|
|
2808
|
+
with self.assertRaisesRegex(Exception, msg) as failure:
|
|
2809
|
+
codecs.decode(b"hello", "hex_codec")
|
|
2810
|
+
self.assertIsInstance(failure.exception.__cause__,
|
|
2811
|
+
type(failure.exception))
|
|
2812
|
+
|
|
2813
|
+
# Unfortunately, the bz2 module throws OSError, which the codec
|
|
2814
|
+
# machinery currently can't wrap :(
|
|
2815
|
+
|
|
2816
|
+
# Ensure codec aliases from http://bugs.python.org/issue7475 work
|
|
2817
|
+
def test_aliases(self):
|
|
2818
|
+
for codec_name, aliases in transform_aliases.items():
|
|
2819
|
+
expected_name = codecs.lookup(codec_name).name
|
|
2820
|
+
for alias in aliases:
|
|
2821
|
+
with self.subTest(alias=alias):
|
|
2822
|
+
info = codecs.lookup(alias)
|
|
2823
|
+
self.assertEqual(info.name, expected_name)
|
|
2824
|
+
|
|
2825
|
+
def test_quopri_stateless(self):
|
|
2826
|
+
# Should encode with quotetabs=True
|
|
2827
|
+
encoded = codecs.encode(b"space tab\teol \n", "quopri-codec")
|
|
2828
|
+
self.assertEqual(encoded, b"space=20tab=09eol=20\n")
|
|
2829
|
+
# But should still support unescaped tabs and spaces
|
|
2830
|
+
unescaped = b"space tab eol\n"
|
|
2831
|
+
self.assertEqual(codecs.decode(unescaped, "quopri-codec"), unescaped)
|
|
2832
|
+
|
|
2833
|
+
def test_uu_invalid(self):
|
|
2834
|
+
# Missing "begin" line
|
|
2835
|
+
self.assertRaises(ValueError, codecs.decode, b"", "uu-codec")
|
|
2836
|
+
|
|
2837
|
+
|
|
2838
|
+
# The codec system tries to wrap exceptions in order to ensure the error
|
|
2839
|
+
# mentions the operation being performed and the codec involved. We
|
|
2840
|
+
# currently *only* want this to happen for relatively stateless
|
|
2841
|
+
# exceptions, where the only significant information they contain is their
|
|
2842
|
+
# type and a single str argument.
|
|
2843
|
+
|
|
2844
|
+
# Use a local codec registry to avoid appearing to leak objects when
|
|
2845
|
+
# registering multiple search functions
|
|
2846
|
+
_TEST_CODECS = {}
|
|
2847
|
+
|
|
2848
|
+
def _get_test_codec(codec_name):
|
|
2849
|
+
return _TEST_CODECS.get(codec_name)
|
|
2850
|
+
codecs.register(_get_test_codec) # Returns None, not usable as a decorator
|
|
2851
|
+
|
|
2852
|
+
try:
|
|
2853
|
+
# Issue #22166: Also need to clear the internal cache in CPython
|
|
2854
|
+
from _codecs import _forget_codec
|
|
2855
|
+
except ImportError:
|
|
2856
|
+
def _forget_codec(codec_name):
|
|
2857
|
+
pass
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
class ExceptionChainingTest(unittest.TestCase):
|
|
2861
|
+
|
|
2862
|
+
def setUp(self):
|
|
2863
|
+
# There's no way to unregister a codec search function, so we just
|
|
2864
|
+
# ensure we render this one fairly harmless after the test
|
|
2865
|
+
# case finishes by using the test case repr as the codec name
|
|
2866
|
+
# The codecs module normalizes codec names, although this doesn't
|
|
2867
|
+
# appear to be formally documented...
|
|
2868
|
+
# We also make sure we use a truly unique id for the custom codec
|
|
2869
|
+
# to avoid issues with the codec cache when running these tests
|
|
2870
|
+
# multiple times (e.g. when hunting for refleaks)
|
|
2871
|
+
unique_id = repr(self) + str(id(self))
|
|
2872
|
+
self.codec_name = encodings.normalize_encoding(unique_id).lower()
|
|
2873
|
+
|
|
2874
|
+
# We store the object to raise on the instance because of a bad
|
|
2875
|
+
# interaction between the codec caching (which means we can't
|
|
2876
|
+
# recreate the codec entry) and regrtest refleak hunting (which
|
|
2877
|
+
# runs the same test instance multiple times). This means we
|
|
2878
|
+
# need to ensure the codecs call back in to the instance to find
|
|
2879
|
+
# out which exception to raise rather than binding them in a
|
|
2880
|
+
# closure to an object that may change on the next run
|
|
2881
|
+
self.obj_to_raise = RuntimeError
|
|
2882
|
+
|
|
2883
|
+
def tearDown(self):
|
|
2884
|
+
_TEST_CODECS.pop(self.codec_name, None)
|
|
2885
|
+
# Issue #22166: Also pop from caches to avoid appearance of ref leaks
|
|
2886
|
+
encodings._cache.pop(self.codec_name, None)
|
|
2887
|
+
try:
|
|
2888
|
+
_forget_codec(self.codec_name)
|
|
2889
|
+
except KeyError:
|
|
2890
|
+
pass
|
|
2891
|
+
|
|
2892
|
+
def set_codec(self, encode, decode):
|
|
2893
|
+
codec_info = codecs.CodecInfo(encode, decode,
|
|
2894
|
+
name=self.codec_name)
|
|
2895
|
+
_TEST_CODECS[self.codec_name] = codec_info
|
|
2896
|
+
|
|
2897
|
+
@contextlib.contextmanager
|
|
2898
|
+
def assertWrapped(self, operation, exc_type, msg):
|
|
2899
|
+
full_msg = r"{} with {!r} codec failed \({}: {}\)".format(
|
|
2900
|
+
operation, self.codec_name, exc_type.__name__, msg)
|
|
2901
|
+
with self.assertRaisesRegex(exc_type, full_msg) as caught:
|
|
2902
|
+
yield caught
|
|
2903
|
+
self.assertIsInstance(caught.exception.__cause__, exc_type)
|
|
2904
|
+
self.assertIsNotNone(caught.exception.__cause__.__traceback__)
|
|
2905
|
+
|
|
2906
|
+
def raise_obj(self, *args, **kwds):
|
|
2907
|
+
# Helper to dynamically change the object raised by a test codec
|
|
2908
|
+
raise self.obj_to_raise
|
|
2909
|
+
|
|
2910
|
+
def check_wrapped(self, obj_to_raise, msg, exc_type=RuntimeError):
|
|
2911
|
+
self.obj_to_raise = obj_to_raise
|
|
2912
|
+
self.set_codec(self.raise_obj, self.raise_obj)
|
|
2913
|
+
with self.assertWrapped("encoding", exc_type, msg):
|
|
2914
|
+
"str_input".encode(self.codec_name)
|
|
2915
|
+
with self.assertWrapped("encoding", exc_type, msg):
|
|
2916
|
+
codecs.encode("str_input", self.codec_name)
|
|
2917
|
+
with self.assertWrapped("decoding", exc_type, msg):
|
|
2918
|
+
b"bytes input".decode(self.codec_name)
|
|
2919
|
+
with self.assertWrapped("decoding", exc_type, msg):
|
|
2920
|
+
codecs.decode(b"bytes input", self.codec_name)
|
|
2921
|
+
|
|
2922
|
+
def test_raise_by_type(self):
|
|
2923
|
+
self.check_wrapped(RuntimeError, "")
|
|
2924
|
+
|
|
2925
|
+
def test_raise_by_value(self):
|
|
2926
|
+
msg = "This should be wrapped"
|
|
2927
|
+
self.check_wrapped(RuntimeError(msg), msg)
|
|
2928
|
+
|
|
2929
|
+
def test_raise_grandchild_subclass_exact_size(self):
|
|
2930
|
+
msg = "This should be wrapped"
|
|
2931
|
+
class MyRuntimeError(RuntimeError):
|
|
2932
|
+
__slots__ = ()
|
|
2933
|
+
self.check_wrapped(MyRuntimeError(msg), msg, MyRuntimeError)
|
|
2934
|
+
|
|
2935
|
+
def test_raise_subclass_with_weakref_support(self):
|
|
2936
|
+
msg = "This should be wrapped"
|
|
2937
|
+
class MyRuntimeError(RuntimeError):
|
|
2938
|
+
pass
|
|
2939
|
+
self.check_wrapped(MyRuntimeError(msg), msg, MyRuntimeError)
|
|
2940
|
+
|
|
2941
|
+
def check_not_wrapped(self, obj_to_raise, msg):
|
|
2942
|
+
def raise_obj(*args, **kwds):
|
|
2943
|
+
raise obj_to_raise
|
|
2944
|
+
self.set_codec(raise_obj, raise_obj)
|
|
2945
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2946
|
+
"str input".encode(self.codec_name)
|
|
2947
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2948
|
+
codecs.encode("str input", self.codec_name)
|
|
2949
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2950
|
+
b"bytes input".decode(self.codec_name)
|
|
2951
|
+
with self.assertRaisesRegex(RuntimeError, msg):
|
|
2952
|
+
codecs.decode(b"bytes input", self.codec_name)
|
|
2953
|
+
|
|
2954
|
+
def test_init_override_is_not_wrapped(self):
|
|
2955
|
+
class CustomInit(RuntimeError):
|
|
2956
|
+
def __init__(self):
|
|
2957
|
+
pass
|
|
2958
|
+
self.check_not_wrapped(CustomInit, "")
|
|
2959
|
+
|
|
2960
|
+
def test_new_override_is_not_wrapped(self):
|
|
2961
|
+
class CustomNew(RuntimeError):
|
|
2962
|
+
def __new__(cls):
|
|
2963
|
+
return super().__new__(cls)
|
|
2964
|
+
self.check_not_wrapped(CustomNew, "")
|
|
2965
|
+
|
|
2966
|
+
def test_instance_attribute_is_not_wrapped(self):
|
|
2967
|
+
msg = "This should NOT be wrapped"
|
|
2968
|
+
exc = RuntimeError(msg)
|
|
2969
|
+
exc.attr = 1
|
|
2970
|
+
self.check_not_wrapped(exc, "^{}$".format(msg))
|
|
2971
|
+
|
|
2972
|
+
def test_non_str_arg_is_not_wrapped(self):
|
|
2973
|
+
self.check_not_wrapped(RuntimeError(1), "1")
|
|
2974
|
+
|
|
2975
|
+
def test_multiple_args_is_not_wrapped(self):
|
|
2976
|
+
msg_re = r"^\('a', 'b', 'c'\)$"
|
|
2977
|
+
self.check_not_wrapped(RuntimeError('a', 'b', 'c'), msg_re)
|
|
2978
|
+
|
|
2979
|
+
# http://bugs.python.org/issue19609
|
|
2980
|
+
def test_codec_lookup_failure_not_wrapped(self):
|
|
2981
|
+
msg = "^unknown encoding: {}$".format(self.codec_name)
|
|
2982
|
+
# The initial codec lookup should not be wrapped
|
|
2983
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2984
|
+
"str input".encode(self.codec_name)
|
|
2985
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2986
|
+
codecs.encode("str input", self.codec_name)
|
|
2987
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2988
|
+
b"bytes input".decode(self.codec_name)
|
|
2989
|
+
with self.assertRaisesRegex(LookupError, msg):
|
|
2990
|
+
codecs.decode(b"bytes input", self.codec_name)
|
|
2991
|
+
|
|
2992
|
+
def test_unflagged_non_text_codec_handling(self):
|
|
2993
|
+
# The stdlib non-text codecs are now marked so they're
|
|
2994
|
+
# pre-emptively skipped by the text model related methods
|
|
2995
|
+
# However, third party codecs won't be flagged, so we still make
|
|
2996
|
+
# sure the case where an inappropriate output type is produced is
|
|
2997
|
+
# handled appropriately
|
|
2998
|
+
def encode_to_str(*args, **kwds):
|
|
2999
|
+
return "not bytes!", 0
|
|
3000
|
+
def decode_to_bytes(*args, **kwds):
|
|
3001
|
+
return b"not str!", 0
|
|
3002
|
+
self.set_codec(encode_to_str, decode_to_bytes)
|
|
3003
|
+
# No input or output type checks on the codecs module functions
|
|
3004
|
+
encoded = codecs.encode(None, self.codec_name)
|
|
3005
|
+
self.assertEqual(encoded, "not bytes!")
|
|
3006
|
+
decoded = codecs.decode(None, self.codec_name)
|
|
3007
|
+
self.assertEqual(decoded, b"not str!")
|
|
3008
|
+
# Text model methods should complain
|
|
3009
|
+
fmt = (r"^{!r} encoder returned 'str' instead of 'bytes'; "
|
|
3010
|
+
r"use codecs.encode\(\) to encode to arbitrary types$")
|
|
3011
|
+
msg = fmt.format(self.codec_name)
|
|
3012
|
+
with self.assertRaisesRegex(TypeError, msg):
|
|
3013
|
+
"str_input".encode(self.codec_name)
|
|
3014
|
+
fmt = (r"^{!r} decoder returned 'bytes' instead of 'str'; "
|
|
3015
|
+
r"use codecs.decode\(\) to decode to arbitrary types$")
|
|
3016
|
+
msg = fmt.format(self.codec_name)
|
|
3017
|
+
with self.assertRaisesRegex(TypeError, msg):
|
|
3018
|
+
b"bytes input".decode(self.codec_name)
|
|
3019
|
+
|
|
3020
|
+
|
|
3021
|
+
|
|
3022
|
+
@unittest.skipUnless(sys.platform == 'win32',
|
|
3023
|
+
'code pages are specific to Windows')
|
|
3024
|
+
class CodePageTest(unittest.TestCase):
|
|
3025
|
+
# CP_UTF8 is already tested by CP65001Test
|
|
3026
|
+
CP_UTF8 = 65001
|
|
3027
|
+
|
|
3028
|
+
def test_invalid_code_page(self):
|
|
3029
|
+
self.assertRaises(ValueError, codecs.code_page_encode, -1, 'a')
|
|
3030
|
+
self.assertRaises(ValueError, codecs.code_page_decode, -1, b'a')
|
|
3031
|
+
self.assertRaises(OSError, codecs.code_page_encode, 123, 'a')
|
|
3032
|
+
self.assertRaises(OSError, codecs.code_page_decode, 123, b'a')
|
|
3033
|
+
|
|
3034
|
+
def test_code_page_name(self):
|
|
3035
|
+
self.assertRaisesRegex(UnicodeEncodeError, 'cp932',
|
|
3036
|
+
codecs.code_page_encode, 932, '\xff')
|
|
3037
|
+
self.assertRaisesRegex(UnicodeDecodeError, 'cp932',
|
|
3038
|
+
codecs.code_page_decode, 932, b'\x81\x00', 'strict', True)
|
|
3039
|
+
self.assertRaisesRegex(UnicodeDecodeError, 'CP_UTF8',
|
|
3040
|
+
codecs.code_page_decode, self.CP_UTF8, b'\xff', 'strict', True)
|
|
3041
|
+
|
|
3042
|
+
def check_decode(self, cp, tests):
|
|
3043
|
+
for raw, errors, expected in tests:
|
|
3044
|
+
if expected is not None:
|
|
3045
|
+
try:
|
|
3046
|
+
decoded = codecs.code_page_decode(cp, raw, errors, True)
|
|
3047
|
+
except UnicodeDecodeError as err:
|
|
3048
|
+
self.fail('Unable to decode %a from "cp%s" with '
|
|
3049
|
+
'errors=%r: %s' % (raw, cp, errors, err))
|
|
3050
|
+
self.assertEqual(decoded[0], expected,
|
|
3051
|
+
'%a.decode("cp%s", %r)=%a != %a'
|
|
3052
|
+
% (raw, cp, errors, decoded[0], expected))
|
|
3053
|
+
# assert 0 <= decoded[1] <= len(raw)
|
|
3054
|
+
self.assertGreaterEqual(decoded[1], 0)
|
|
3055
|
+
self.assertLessEqual(decoded[1], len(raw))
|
|
3056
|
+
else:
|
|
3057
|
+
self.assertRaises(UnicodeDecodeError,
|
|
3058
|
+
codecs.code_page_decode, cp, raw, errors, True)
|
|
3059
|
+
|
|
3060
|
+
def check_encode(self, cp, tests):
|
|
3061
|
+
for text, errors, expected in tests:
|
|
3062
|
+
if expected is not None:
|
|
3063
|
+
try:
|
|
3064
|
+
encoded = codecs.code_page_encode(cp, text, errors)
|
|
3065
|
+
except UnicodeEncodeError as err:
|
|
3066
|
+
self.fail('Unable to encode %a to "cp%s" with '
|
|
3067
|
+
'errors=%r: %s' % (text, cp, errors, err))
|
|
3068
|
+
self.assertEqual(encoded[0], expected,
|
|
3069
|
+
'%a.encode("cp%s", %r)=%a != %a'
|
|
3070
|
+
% (text, cp, errors, encoded[0], expected))
|
|
3071
|
+
self.assertEqual(encoded[1], len(text))
|
|
3072
|
+
else:
|
|
3073
|
+
self.assertRaises(UnicodeEncodeError,
|
|
3074
|
+
codecs.code_page_encode, cp, text, errors)
|
|
3075
|
+
|
|
3076
|
+
def test_cp932(self):
|
|
3077
|
+
self.check_encode(932, (
|
|
3078
|
+
('abc', 'strict', b'abc'),
|
|
3079
|
+
('\uff44\u9a3e', 'strict', b'\x82\x84\xe9\x80'),
|
|
3080
|
+
# test error handlers
|
|
3081
|
+
('\xff', 'strict', None),
|
|
3082
|
+
('[\xff]', 'ignore', b'[]'),
|
|
3083
|
+
('[\xff]', 'replace', b'[y]'),
|
|
3084
|
+
('[\u20ac]', 'replace', b'[?]'),
|
|
3085
|
+
('[\xff]', 'backslashreplace', b'[\\xff]'),
|
|
3086
|
+
('[\xff]', 'namereplace',
|
|
3087
|
+
b'[\\N{LATIN SMALL LETTER Y WITH DIAERESIS}]'),
|
|
3088
|
+
('[\xff]', 'xmlcharrefreplace', b'[ÿ]'),
|
|
3089
|
+
('\udcff', 'strict', None),
|
|
3090
|
+
('[\udcff]', 'surrogateescape', b'[\xff]'),
|
|
3091
|
+
('[\udcff]', 'surrogatepass', None),
|
|
3092
|
+
))
|
|
3093
|
+
self.check_decode(932, (
|
|
3094
|
+
(b'abc', 'strict', 'abc'),
|
|
3095
|
+
(b'\x82\x84\xe9\x80', 'strict', '\uff44\u9a3e'),
|
|
3096
|
+
# invalid bytes
|
|
3097
|
+
(b'[\xff]', 'strict', None),
|
|
3098
|
+
(b'[\xff]', 'ignore', '[]'),
|
|
3099
|
+
(b'[\xff]', 'replace', '[\ufffd]'),
|
|
3100
|
+
(b'[\xff]', 'backslashreplace', '[\\xff]'),
|
|
3101
|
+
(b'[\xff]', 'surrogateescape', '[\udcff]'),
|
|
3102
|
+
(b'[\xff]', 'surrogatepass', None),
|
|
3103
|
+
(b'\x81\x00abc', 'strict', None),
|
|
3104
|
+
(b'\x81\x00abc', 'ignore', '\x00abc'),
|
|
3105
|
+
(b'\x81\x00abc', 'replace', '\ufffd\x00abc'),
|
|
3106
|
+
(b'\x81\x00abc', 'backslashreplace', '\\x81\x00abc'),
|
|
3107
|
+
))
|
|
3108
|
+
|
|
3109
|
+
def test_cp1252(self):
|
|
3110
|
+
self.check_encode(1252, (
|
|
3111
|
+
('abc', 'strict', b'abc'),
|
|
3112
|
+
('\xe9\u20ac', 'strict', b'\xe9\x80'),
|
|
3113
|
+
('\xff', 'strict', b'\xff'),
|
|
3114
|
+
# test error handlers
|
|
3115
|
+
('\u0141', 'strict', None),
|
|
3116
|
+
('\u0141', 'ignore', b''),
|
|
3117
|
+
('\u0141', 'replace', b'L'),
|
|
3118
|
+
('\udc98', 'surrogateescape', b'\x98'),
|
|
3119
|
+
('\udc98', 'surrogatepass', None),
|
|
3120
|
+
))
|
|
3121
|
+
self.check_decode(1252, (
|
|
3122
|
+
(b'abc', 'strict', 'abc'),
|
|
3123
|
+
(b'\xe9\x80', 'strict', '\xe9\u20ac'),
|
|
3124
|
+
(b'\xff', 'strict', '\xff'),
|
|
3125
|
+
))
|
|
3126
|
+
|
|
3127
|
+
def test_cp_utf7(self):
|
|
3128
|
+
cp = 65000
|
|
3129
|
+
self.check_encode(cp, (
|
|
3130
|
+
('abc', 'strict', b'abc'),
|
|
3131
|
+
('\xe9\u20ac', 'strict', b'+AOkgrA-'),
|
|
3132
|
+
('\U0010ffff', 'strict', b'+2//f/w-'),
|
|
3133
|
+
('\udc80', 'strict', b'+3IA-'),
|
|
3134
|
+
('\ufffd', 'strict', b'+//0-'),
|
|
3135
|
+
))
|
|
3136
|
+
self.check_decode(cp, (
|
|
3137
|
+
(b'abc', 'strict', 'abc'),
|
|
3138
|
+
(b'+AOkgrA-', 'strict', '\xe9\u20ac'),
|
|
3139
|
+
(b'+2//f/w-', 'strict', '\U0010ffff'),
|
|
3140
|
+
(b'+3IA-', 'strict', '\udc80'),
|
|
3141
|
+
(b'+//0-', 'strict', '\ufffd'),
|
|
3142
|
+
# invalid bytes
|
|
3143
|
+
(b'[+/]', 'strict', '[]'),
|
|
3144
|
+
(b'[\xff]', 'strict', '[\xff]'),
|
|
3145
|
+
))
|
|
3146
|
+
|
|
3147
|
+
def test_multibyte_encoding(self):
|
|
3148
|
+
self.check_decode(932, (
|
|
3149
|
+
(b'\x84\xe9\x80', 'ignore', '\u9a3e'),
|
|
3150
|
+
(b'\x84\xe9\x80', 'replace', '\ufffd\u9a3e'),
|
|
3151
|
+
))
|
|
3152
|
+
self.check_decode(self.CP_UTF8, (
|
|
3153
|
+
(b'\xff\xf4\x8f\xbf\xbf', 'ignore', '\U0010ffff'),
|
|
3154
|
+
(b'\xff\xf4\x8f\xbf\xbf', 'replace', '\ufffd\U0010ffff'),
|
|
3155
|
+
))
|
|
3156
|
+
self.check_encode(self.CP_UTF8, (
|
|
3157
|
+
('[\U0010ffff\uDC80]', 'ignore', b'[\xf4\x8f\xbf\xbf]'),
|
|
3158
|
+
('[\U0010ffff\uDC80]', 'replace', b'[\xf4\x8f\xbf\xbf?]'),
|
|
3159
|
+
))
|
|
3160
|
+
|
|
3161
|
+
def test_incremental(self):
|
|
3162
|
+
decoded = codecs.code_page_decode(932, b'\x82', 'strict', False)
|
|
3163
|
+
self.assertEqual(decoded, ('', 0))
|
|
3164
|
+
|
|
3165
|
+
decoded = codecs.code_page_decode(932,
|
|
3166
|
+
b'\xe9\x80\xe9', 'strict',
|
|
3167
|
+
False)
|
|
3168
|
+
self.assertEqual(decoded, ('\u9a3e', 2))
|
|
3169
|
+
|
|
3170
|
+
decoded = codecs.code_page_decode(932,
|
|
3171
|
+
b'\xe9\x80\xe9\x80', 'strict',
|
|
3172
|
+
False)
|
|
3173
|
+
self.assertEqual(decoded, ('\u9a3e\u9a3e', 4))
|
|
3174
|
+
|
|
3175
|
+
decoded = codecs.code_page_decode(932,
|
|
3176
|
+
b'abc', 'strict',
|
|
3177
|
+
False)
|
|
3178
|
+
self.assertEqual(decoded, ('abc', 3))
|
|
3179
|
+
|
|
3180
|
+
def test_mbcs_alias(self):
|
|
3181
|
+
# Check that looking up our 'default' codepage will return
|
|
3182
|
+
# mbcs when we don't have a more specific one available
|
|
3183
|
+
import _bootlocale
|
|
3184
|
+
def _get_fake_codepage(*a):
|
|
3185
|
+
return 'cp123'
|
|
3186
|
+
old_getpreferredencoding = _bootlocale.getpreferredencoding
|
|
3187
|
+
_bootlocale.getpreferredencoding = _get_fake_codepage
|
|
3188
|
+
try:
|
|
3189
|
+
codec = codecs.lookup('cp123')
|
|
3190
|
+
self.assertEqual(codec.name, 'mbcs')
|
|
3191
|
+
finally:
|
|
3192
|
+
_bootlocale.getpreferredencoding = old_getpreferredencoding
|
|
3193
|
+
|
|
3194
|
+
|
|
3195
|
+
class ASCIITest(unittest.TestCase):
|
|
3196
|
+
def test_encode(self):
|
|
3197
|
+
self.assertEqual('abc123'.encode('ascii'), b'abc123')
|
|
3198
|
+
|
|
3199
|
+
def test_encode_error(self):
|
|
3200
|
+
for data, error_handler, expected in (
|
|
3201
|
+
('[\x80\xff\u20ac]', 'ignore', b'[]'),
|
|
3202
|
+
('[\x80\xff\u20ac]', 'replace', b'[???]'),
|
|
3203
|
+
('[\x80\xff\u20ac]', 'xmlcharrefreplace', b'[€ÿ€]'),
|
|
3204
|
+
('[\x80\xff\u20ac\U000abcde]', 'backslashreplace',
|
|
3205
|
+
b'[\\x80\\xff\\u20ac\\U000abcde]'),
|
|
3206
|
+
('[\udc80\udcff]', 'surrogateescape', b'[\x80\xff]'),
|
|
3207
|
+
):
|
|
3208
|
+
with self.subTest(data=data, error_handler=error_handler,
|
|
3209
|
+
expected=expected):
|
|
3210
|
+
self.assertEqual(data.encode('ascii', error_handler),
|
|
3211
|
+
expected)
|
|
3212
|
+
|
|
3213
|
+
def test_encode_surrogateescape_error(self):
|
|
3214
|
+
with self.assertRaises(UnicodeEncodeError):
|
|
3215
|
+
# the first character can be decoded, but not the second
|
|
3216
|
+
'\udc80\xff'.encode('ascii', 'surrogateescape')
|
|
3217
|
+
|
|
3218
|
+
def test_decode(self):
|
|
3219
|
+
self.assertEqual(b'abc'.decode('ascii'), 'abc')
|
|
3220
|
+
|
|
3221
|
+
def test_decode_error(self):
|
|
3222
|
+
for data, error_handler, expected in (
|
|
3223
|
+
(b'[\x80\xff]', 'ignore', '[]'),
|
|
3224
|
+
(b'[\x80\xff]', 'replace', '[\ufffd\ufffd]'),
|
|
3225
|
+
(b'[\x80\xff]', 'surrogateescape', '[\udc80\udcff]'),
|
|
3226
|
+
(b'[\x80\xff]', 'backslashreplace', '[\\x80\\xff]'),
|
|
3227
|
+
):
|
|
3228
|
+
with self.subTest(data=data, error_handler=error_handler,
|
|
3229
|
+
expected=expected):
|
|
3230
|
+
self.assertEqual(data.decode('ascii', error_handler),
|
|
3231
|
+
expected)
|
|
3232
|
+
|
|
3233
|
+
|
|
3234
|
+
class Latin1Test(unittest.TestCase):
|
|
3235
|
+
def test_encode(self):
|
|
3236
|
+
for data, expected in (
|
|
3237
|
+
('abc', b'abc'),
|
|
3238
|
+
('\x80\xe9\xff', b'\x80\xe9\xff'),
|
|
3239
|
+
):
|
|
3240
|
+
with self.subTest(data=data, expected=expected):
|
|
3241
|
+
self.assertEqual(data.encode('latin1'), expected)
|
|
3242
|
+
|
|
3243
|
+
def test_encode_errors(self):
|
|
3244
|
+
for data, error_handler, expected in (
|
|
3245
|
+
('[\u20ac\udc80]', 'ignore', b'[]'),
|
|
3246
|
+
('[\u20ac\udc80]', 'replace', b'[??]'),
|
|
3247
|
+
('[\u20ac\U000abcde]', 'backslashreplace',
|
|
3248
|
+
b'[\\u20ac\\U000abcde]'),
|
|
3249
|
+
('[\u20ac\udc80]', 'xmlcharrefreplace', b'[€�]'),
|
|
3250
|
+
('[\udc80\udcff]', 'surrogateescape', b'[\x80\xff]'),
|
|
3251
|
+
):
|
|
3252
|
+
with self.subTest(data=data, error_handler=error_handler,
|
|
3253
|
+
expected=expected):
|
|
3254
|
+
self.assertEqual(data.encode('latin1', error_handler),
|
|
3255
|
+
expected)
|
|
3256
|
+
|
|
3257
|
+
def test_encode_surrogateescape_error(self):
|
|
3258
|
+
with self.assertRaises(UnicodeEncodeError):
|
|
3259
|
+
# the first character can be decoded, but not the second
|
|
3260
|
+
'\udc80\u20ac'.encode('latin1', 'surrogateescape')
|
|
3261
|
+
|
|
3262
|
+
def test_decode(self):
|
|
3263
|
+
for data, expected in (
|
|
3264
|
+
(b'abc', 'abc'),
|
|
3265
|
+
(b'[\x80\xff]', '[\x80\xff]'),
|
|
3266
|
+
):
|
|
3267
|
+
with self.subTest(data=data, expected=expected):
|
|
3268
|
+
self.assertEqual(data.decode('latin1'), expected)
|
|
3269
|
+
|
|
3270
|
+
|
|
3271
|
+
if __name__ == "__main__":
|
|
3272
|
+
unittest.main()
|