com.googler.python 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -0
- package/python3 +6 -0
- package/python3.4.2/bin/2to3 +5 -0
- package/python3.4.2/bin/2to3-3.4 +5 -0
- package/python3.4.2/bin/android-debian-builder +10 -0
- package/python3.4.2/bin/easy_install-3.4 +11 -0
- package/python3.4.2/bin/idle3 +5 -0
- package/python3.4.2/bin/idle3.4 +5 -0
- package/python3.4.2/bin/pip3 +11 -0
- package/python3.4.2/bin/pip3.4 +11 -0
- package/python3.4.2/bin/pydoc3 +5 -0
- package/python3.4.2/bin/pydoc3.4 +5 -0
- package/python3.4.2/bin/python3-config +111 -0
- package/python3.4.2/bin/python3.4 +0 -0
- package/python3.4.2/bin/python3.4-config +111 -0
- package/python3.4.2/bin/python3.4m-config +111 -0
- package/python3.4.2/bin/pyvenv +11 -0
- package/python3.4.2/bin/pyvenv-3.4 +11 -0
- package/python3.4.2/include/python3.4m/Python-ast.h +569 -0
- package/python3.4.2/include/python3.4m/Python.h +133 -0
- package/python3.4.2/include/python3.4m/abstract.h +1267 -0
- package/python3.4.2/include/python3.4m/accu.h +37 -0
- package/python3.4.2/include/python3.4m/asdl.h +45 -0
- package/python3.4.2/include/python3.4m/ast.h +22 -0
- package/python3.4.2/include/python3.4m/bitset.h +32 -0
- package/python3.4.2/include/python3.4m/bltinmodule.h +14 -0
- package/python3.4.2/include/python3.4m/boolobject.h +34 -0
- package/python3.4.2/include/python3.4m/bytearrayobject.h +62 -0
- package/python3.4.2/include/python3.4m/bytes_methods.h +46 -0
- package/python3.4.2/include/python3.4m/bytesobject.h +128 -0
- package/python3.4.2/include/python3.4m/cellobject.h +29 -0
- package/python3.4.2/include/python3.4m/ceval.h +205 -0
- package/python3.4.2/include/python3.4m/classobject.h +58 -0
- package/python3.4.2/include/python3.4m/code.h +115 -0
- package/python3.4.2/include/python3.4m/codecs.h +233 -0
- package/python3.4.2/include/python3.4m/compile.h +72 -0
- package/python3.4.2/include/python3.4m/complexobject.h +77 -0
- package/python3.4.2/include/python3.4m/datetime.h +243 -0
- package/python3.4.2/include/python3.4m/descrobject.h +105 -0
- package/python3.4.2/include/python3.4m/dictobject.h +126 -0
- package/python3.4.2/include/python3.4m/dtoa.h +19 -0
- package/python3.4.2/include/python3.4m/dynamic_annotations.h +499 -0
- package/python3.4.2/include/python3.4m/enumobject.h +17 -0
- package/python3.4.2/include/python3.4m/errcode.h +38 -0
- package/python3.4.2/include/python3.4m/eval.h +27 -0
- package/python3.4.2/include/python3.4m/fileobject.h +58 -0
- package/python3.4.2/include/python3.4m/fileutils.h +79 -0
- package/python3.4.2/include/python3.4m/floatobject.h +128 -0
- package/python3.4.2/include/python3.4m/frameobject.h +95 -0
- package/python3.4.2/include/python3.4m/funcobject.h +89 -0
- package/python3.4.2/include/python3.4m/genobject.h +46 -0
- package/python3.4.2/include/python3.4m/graminit.h +84 -0
- package/python3.4.2/include/python3.4m/grammar.h +93 -0
- package/python3.4.2/include/python3.4m/import.h +130 -0
- package/python3.4.2/include/python3.4m/intrcheck.h +21 -0
- package/python3.4.2/include/python3.4m/iterobject.h +25 -0
- package/python3.4.2/include/python3.4m/listobject.h +80 -0
- package/python3.4.2/include/python3.4m/longintrepr.h +103 -0
- package/python3.4.2/include/python3.4m/longobject.h +204 -0
- package/python3.4.2/include/python3.4m/marshal.h +28 -0
- package/python3.4.2/include/python3.4m/memoryobject.h +74 -0
- package/python3.4.2/include/python3.4m/metagrammar.h +18 -0
- package/python3.4.2/include/python3.4m/methodobject.h +93 -0
- package/python3.4.2/include/python3.4m/modsupport.h +132 -0
- package/python3.4.2/include/python3.4m/moduleobject.h +63 -0
- package/python3.4.2/include/python3.4m/namespaceobject.h +17 -0
- package/python3.4.2/include/python3.4m/node.h +44 -0
- package/python3.4.2/include/python3.4m/object.h +1015 -0
- package/python3.4.2/include/python3.4m/objimpl.h +361 -0
- package/python3.4.2/include/python3.4m/opcode.h +159 -0
- package/python3.4.2/include/python3.4m/osdefs.h +50 -0
- package/python3.4.2/include/python3.4m/parsetok.h +108 -0
- package/python3.4.2/include/python3.4m/patchlevel.h +35 -0
- package/python3.4.2/include/python3.4m/pgen.h +18 -0
- package/python3.4.2/include/python3.4m/pgenheaders.h +42 -0
- package/python3.4.2/include/python3.4m/py_curses.h +177 -0
- package/python3.4.2/include/python3.4m/pyarena.h +64 -0
- package/python3.4.2/include/python3.4m/pyatomic.h +184 -0
- package/python3.4.2/include/python3.4m/pycapsule.h +59 -0
- package/python3.4.2/include/python3.4m/pyconfig.h +1503 -0
- package/python3.4.2/include/python3.4m/pyctype.h +33 -0
- package/python3.4.2/include/python3.4m/pydebug.h +34 -0
- package/python3.4.2/include/python3.4m/pyerrors.h +464 -0
- package/python3.4.2/include/python3.4m/pyexpat.h +53 -0
- package/python3.4.2/include/python3.4m/pyfpe.h +176 -0
- package/python3.4.2/include/python3.4m/pygetopt.h +21 -0
- package/python3.4.2/include/python3.4m/pyhash.h +149 -0
- package/python3.4.2/include/python3.4m/pymacconfig.h +102 -0
- package/python3.4.2/include/python3.4m/pymacro.h +78 -0
- package/python3.4.2/include/python3.4m/pymath.h +190 -0
- package/python3.4.2/include/python3.4m/pymem.h +183 -0
- package/python3.4.2/include/python3.4m/pyport.h +883 -0
- package/python3.4.2/include/python3.4m/pystate.h +271 -0
- package/python3.4.2/include/python3.4m/pystrcmp.h +23 -0
- package/python3.4.2/include/python3.4m/pystrtod.h +41 -0
- package/python3.4.2/include/python3.4m/pythonrun.h +304 -0
- package/python3.4.2/include/python3.4m/pythread.h +93 -0
- package/python3.4.2/include/python3.4m/pytime.h +105 -0
- package/python3.4.2/include/python3.4m/rangeobject.h +27 -0
- package/python3.4.2/include/python3.4m/setobject.h +113 -0
- package/python3.4.2/include/python3.4m/sliceobject.h +50 -0
- package/python3.4.2/include/python3.4m/structmember.h +76 -0
- package/python3.4.2/include/python3.4m/structseq.h +49 -0
- package/python3.4.2/include/python3.4m/symtable.h +122 -0
- package/python3.4.2/include/python3.4m/sysmodule.h +43 -0
- package/python3.4.2/include/python3.4m/token.h +87 -0
- package/python3.4.2/include/python3.4m/traceback.h +72 -0
- package/python3.4.2/include/python3.4m/tupleobject.h +73 -0
- package/python3.4.2/include/python3.4m/typeslots.h +76 -0
- package/python3.4.2/include/python3.4m/ucnhash.h +36 -0
- package/python3.4.2/include/python3.4m/unicodeobject.h +2271 -0
- package/python3.4.2/include/python3.4m/warnings.h +54 -0
- package/python3.4.2/include/python3.4m/weakrefobject.h +86 -0
- package/python3.4.2/lib/pkgconfig/python-3.4.pc +13 -0
- package/python3.4.2/lib/pkgconfig/python-3.4m.pc +13 -0
- package/python3.4.2/lib/pkgconfig/python3.pc +13 -0
- package/python3.4.2/lib/python3.4/LICENSE.txt +254 -0
- package/python3.4.2/lib/python3.4/__future__.py +134 -0
- package/python3.4.2/lib/python3.4/__phello__.foo.py +1 -0
- package/python3.4.2/lib/python3.4/__pycache__/_bootlocale.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_collections_abc.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_sitebuiltins.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_sysconfigdata.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_weakrefset.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/abc.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/codecs.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/genericpath.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/io.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/os.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/posixpath.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/rlcompleter.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/site.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/stat.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/sysconfig.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/_bootlocale.py +34 -0
- package/python3.4.2/lib/python3.4/_collections_abc.py +753 -0
- package/python3.4.2/lib/python3.4/_compat_pickle.py +137 -0
- package/python3.4.2/lib/python3.4/_dummy_thread.py +155 -0
- package/python3.4.2/lib/python3.4/_markupbase.py +395 -0
- package/python3.4.2/lib/python3.4/_osx_support.py +502 -0
- package/python3.4.2/lib/python3.4/_pyio.py +2105 -0
- package/python3.4.2/lib/python3.4/_sitebuiltins.py +103 -0
- package/python3.4.2/lib/python3.4/_strptime.py +511 -0
- package/python3.4.2/lib/python3.4/_sysconfigdata.py +710 -0
- package/python3.4.2/lib/python3.4/_threading_local.py +246 -0
- package/python3.4.2/lib/python3.4/_weakrefset.py +196 -0
- package/python3.4.2/lib/python3.4/abc.py +248 -0
- package/python3.4.2/lib/python3.4/aifc.py +918 -0
- package/python3.4.2/lib/python3.4/antigravity.py +17 -0
- package/python3.4.2/lib/python3.4/argparse.py +2379 -0
- package/python3.4.2/lib/python3.4/ast.py +315 -0
- package/python3.4.2/lib/python3.4/asynchat.py +333 -0
- package/python3.4.2/lib/python3.4/asyncio/__init__.py +48 -0
- package/python3.4.2/lib/python3.4/asyncio/base_events.py +1055 -0
- package/python3.4.2/lib/python3.4/asyncio/base_subprocess.py +197 -0
- package/python3.4.2/lib/python3.4/asyncio/constants.py +7 -0
- package/python3.4.2/lib/python3.4/asyncio/coroutines.py +195 -0
- package/python3.4.2/lib/python3.4/asyncio/events.py +586 -0
- package/python3.4.2/lib/python3.4/asyncio/futures.py +411 -0
- package/python3.4.2/lib/python3.4/asyncio/locks.py +469 -0
- package/python3.4.2/lib/python3.4/asyncio/log.py +7 -0
- package/python3.4.2/lib/python3.4/asyncio/proactor_events.py +499 -0
- package/python3.4.2/lib/python3.4/asyncio/protocols.py +129 -0
- package/python3.4.2/lib/python3.4/asyncio/queues.py +288 -0
- package/python3.4.2/lib/python3.4/asyncio/selector_events.py +996 -0
- package/python3.4.2/lib/python3.4/asyncio/streams.py +485 -0
- package/python3.4.2/lib/python3.4/asyncio/subprocess.py +228 -0
- package/python3.4.2/lib/python3.4/asyncio/tasks.py +658 -0
- package/python3.4.2/lib/python3.4/asyncio/test_utils.py +425 -0
- package/python3.4.2/lib/python3.4/asyncio/transports.py +298 -0
- package/python3.4.2/lib/python3.4/asyncio/unix_events.py +922 -0
- package/python3.4.2/lib/python3.4/asyncio/windows_events.py +634 -0
- package/python3.4.2/lib/python3.4/asyncio/windows_utils.py +207 -0
- package/python3.4.2/lib/python3.4/asyncore.py +666 -0
- package/python3.4.2/lib/python3.4/base64.py +602 -0
- package/python3.4.2/lib/python3.4/bdb.py +673 -0
- package/python3.4.2/lib/python3.4/binhex.py +471 -0
- package/python3.4.2/lib/python3.4/bisect.py +92 -0
- package/python3.4.2/lib/python3.4/bz2.py +521 -0
- package/python3.4.2/lib/python3.4/cProfile.py +160 -0
- package/python3.4.2/lib/python3.4/calendar.py +703 -0
- package/python3.4.2/lib/python3.4/cgi.py +1061 -0
- package/python3.4.2/lib/python3.4/cgitb.py +320 -0
- package/python3.4.2/lib/python3.4/chunk.py +167 -0
- package/python3.4.2/lib/python3.4/cmd.py +401 -0
- package/python3.4.2/lib/python3.4/code.py +302 -0
- package/python3.4.2/lib/python3.4/codecs.py +1110 -0
- package/python3.4.2/lib/python3.4/codeop.py +168 -0
- package/python3.4.2/lib/python3.4/collections/__init__.py +1132 -0
- package/python3.4.2/lib/python3.4/collections/__main__.py +38 -0
- package/python3.4.2/lib/python3.4/collections/abc.py +2 -0
- package/python3.4.2/lib/python3.4/colorsys.py +164 -0
- package/python3.4.2/lib/python3.4/compileall.py +241 -0
- package/python3.4.2/lib/python3.4/concurrent/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/__init__.py +18 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/_base.py +575 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/process.py +427 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/thread.py +132 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Makefile +1835 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup +466 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup.config +13 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup.local +1 -0
- package/python3.4.2/lib/python3.4/config-3.4m/config.c +234 -0
- package/python3.4.2/lib/python3.4/config-3.4m/config.c.in +67 -0
- package/python3.4.2/lib/python3.4/config-3.4m/install-sh +294 -0
- package/python3.4.2/lib/python3.4/config-3.4m/makesetup +293 -0
- package/python3.4.2/lib/python3.4/config-3.4m/python-config.py +68 -0
- package/python3.4.2/lib/python3.4/configparser.py +1254 -0
- package/python3.4.2/lib/python3.4/contextlib.py +340 -0
- package/python3.4.2/lib/python3.4/copy.py +333 -0
- package/python3.4.2/lib/python3.4/copyreg.py +202 -0
- package/python3.4.2/lib/python3.4/crypt.py +62 -0
- package/python3.4.2/lib/python3.4/csv.py +449 -0
- package/python3.4.2/lib/python3.4/ctypes/__init__.py +541 -0
- package/python3.4.2/lib/python3.4/ctypes/_endian.py +59 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/README.ctypes +7 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/__init__.py +9 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/dyld.py +158 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/dylib.py +63 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib +2 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib.bat +1 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/framework.py +65 -0
- package/python3.4.2/lib/python3.4/ctypes/test/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/ctypes/test/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_anon.py +60 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_array_in_pointer.py +64 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_arrays.py +181 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_as_parameter.py +226 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_bitfields.py +263 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_buffers.py +64 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_bytes.py +65 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_byteswap.py +295 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_callbacks.py +247 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_cast.py +86 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_cfuncs.py +212 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_checkretval.py +36 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_delattr.py +21 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_errno.py +79 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_find.py +81 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_frombuffer.py +81 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_funcptr.py +127 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_functions.py +402 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_incomplete.py +42 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_init.py +40 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_internals.py +100 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_keeprefs.py +153 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_libc.py +33 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_loading.py +119 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_macholib.py +63 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_memfunctions.py +79 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_numbers.py +290 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_objects.py +67 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_parameters.py +176 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pep3118.py +206 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pickling.py +83 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pointers.py +192 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_prototypes.py +219 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_python_api.py +89 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_random_things.py +74 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_refcounts.py +101 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_repr.py +29 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_returnfuncptrs.py +67 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_simplesubclasses.py +55 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_sizes.py +34 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_slicing.py +167 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_stringptr.py +77 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_strings.py +225 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_struct_fields.py +50 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_structures.py +468 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_unaligned_structures.py +45 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_unicode.py +56 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_values.py +95 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_varsize_struct.py +50 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_win32.py +119 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_wintypes.py +41 -0
- package/python3.4.2/lib/python3.4/ctypes/util.py +267 -0
- package/python3.4.2/lib/python3.4/ctypes/wintypes.py +202 -0
- package/python3.4.2/lib/python3.4/curses/__init__.py +101 -0
- package/python3.4.2/lib/python3.4/curses/ascii.py +99 -0
- package/python3.4.2/lib/python3.4/curses/has_key.py +192 -0
- package/python3.4.2/lib/python3.4/curses/panel.py +6 -0
- package/python3.4.2/lib/python3.4/curses/textpad.py +188 -0
- package/python3.4.2/lib/python3.4/datetime.py +2136 -0
- package/python3.4.2/lib/python3.4/dbm/__init__.py +188 -0
- package/python3.4.2/lib/python3.4/dbm/dumb.py +291 -0
- package/python3.4.2/lib/python3.4/dbm/gnu.py +3 -0
- package/python3.4.2/lib/python3.4/dbm/ndbm.py +3 -0
- package/python3.4.2/lib/python3.4/decimal.py +6414 -0
- package/python3.4.2/lib/python3.4/difflib.py +2039 -0
- package/python3.4.2/lib/python3.4/dis.py +475 -0
- package/python3.4.2/lib/python3.4/distutils/README +13 -0
- package/python3.4.2/lib/python3.4/distutils/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/distutils/archive_util.py +245 -0
- package/python3.4.2/lib/python3.4/distutils/bcppcompiler.py +393 -0
- package/python3.4.2/lib/python3.4/distutils/ccompiler.py +1115 -0
- package/python3.4.2/lib/python3.4/distutils/cmd.py +435 -0
- package/python3.4.2/lib/python3.4/distutils/command/__init__.py +31 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist.py +142 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_dumb.py +122 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_msi.py +741 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_rpm.py +582 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_wininst.py +349 -0
- package/python3.4.2/lib/python3.4/distutils/command/build.py +148 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_clib.py +209 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_ext.py +735 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_py.py +416 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_scripts.py +160 -0
- package/python3.4.2/lib/python3.4/distutils/command/check.py +145 -0
- package/python3.4.2/lib/python3.4/distutils/command/clean.py +76 -0
- package/python3.4.2/lib/python3.4/distutils/command/command_template +33 -0
- package/python3.4.2/lib/python3.4/distutils/command/config.py +347 -0
- package/python3.4.2/lib/python3.4/distutils/command/install.py +650 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_data.py +79 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_egg_info.py +77 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_headers.py +47 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_lib.py +217 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_scripts.py +60 -0
- package/python3.4.2/lib/python3.4/distutils/command/register.py +304 -0
- package/python3.4.2/lib/python3.4/distutils/command/sdist.py +467 -0
- package/python3.4.2/lib/python3.4/distutils/command/upload.py +202 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0-amd64.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-6.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-7.1.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-8.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0-amd64.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/config.py +131 -0
- package/python3.4.2/lib/python3.4/distutils/core.py +237 -0
- package/python3.4.2/lib/python3.4/distutils/cygwinccompiler.py +405 -0
- package/python3.4.2/lib/python3.4/distutils/debug.py +5 -0
- package/python3.4.2/lib/python3.4/distutils/dep_util.py +92 -0
- package/python3.4.2/lib/python3.4/distutils/dir_util.py +210 -0
- package/python3.4.2/lib/python3.4/distutils/dist.py +1238 -0
- package/python3.4.2/lib/python3.4/distutils/errors.py +97 -0
- package/python3.4.2/lib/python3.4/distutils/extension.py +233 -0
- package/python3.4.2/lib/python3.4/distutils/fancy_getopt.py +457 -0
- package/python3.4.2/lib/python3.4/distutils/file_util.py +230 -0
- package/python3.4.2/lib/python3.4/distutils/filelist.py +328 -0
- package/python3.4.2/lib/python3.4/distutils/log.py +75 -0
- package/python3.4.2/lib/python3.4/distutils/msvc9compiler.py +788 -0
- package/python3.4.2/lib/python3.4/distutils/msvccompiler.py +640 -0
- package/python3.4.2/lib/python3.4/distutils/spawn.py +195 -0
- package/python3.4.2/lib/python3.4/distutils/sysconfig.py +562 -0
- package/python3.4.2/lib/python3.4/distutils/tests/Setup.sample +67 -0
- package/python3.4.2/lib/python3.4/distutils/tests/__init__.py +36 -0
- package/python3.4.2/lib/python3.4/distutils/tests/support.py +210 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_archive_util.py +341 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist.py +50 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_dumb.py +97 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_msi.py +25 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_rpm.py +134 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_wininst.py +31 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build.py +55 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_clib.py +143 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_ext.py +488 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_py.py +178 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_scripts.py +112 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_check.py +106 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_clean.py +51 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_cmd.py +126 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_config.py +120 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_config_cmd.py +89 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_core.py +108 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_cygwinccompiler.py +155 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dep_util.py +81 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dir_util.py +139 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dist.py +454 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_extension.py +69 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_file_util.py +85 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_filelist.py +299 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install.py +246 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_data.py +77 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_headers.py +41 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_lib.py +115 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_scripts.py +82 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_log.py +37 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_msvc9compiler.py +184 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_register.py +309 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_sdist.py +484 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_spawn.py +58 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_sysconfig.py +207 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_text_file.py +107 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_unixccompiler.py +150 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_upload.py +151 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_util.py +300 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_version.py +71 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_versionpredicate.py +13 -0
- package/python3.4.2/lib/python3.4/distutils/tests/xxmodule.c +396 -0
- package/python3.4.2/lib/python3.4/distutils/text_file.py +285 -0
- package/python3.4.2/lib/python3.4/distutils/unixccompiler.py +298 -0
- package/python3.4.2/lib/python3.4/distutils/util.py +553 -0
- package/python3.4.2/lib/python3.4/distutils/version.py +349 -0
- package/python3.4.2/lib/python3.4/distutils/versionpredicate.py +166 -0
- package/python3.4.2/lib/python3.4/doctest.py +2793 -0
- package/python3.4.2/lib/python3.4/dummy_threading.py +78 -0
- package/python3.4.2/lib/python3.4/email/__init__.py +64 -0
- package/python3.4.2/lib/python3.4/email/_encoded_words.py +221 -0
- package/python3.4.2/lib/python3.4/email/_header_value_parser.py +2947 -0
- package/python3.4.2/lib/python3.4/email/_parseaddr.py +540 -0
- package/python3.4.2/lib/python3.4/email/_policybase.py +358 -0
- package/python3.4.2/lib/python3.4/email/architecture.rst +216 -0
- package/python3.4.2/lib/python3.4/email/base64mime.py +119 -0
- package/python3.4.2/lib/python3.4/email/charset.py +409 -0
- package/python3.4.2/lib/python3.4/email/contentmanager.py +249 -0
- package/python3.4.2/lib/python3.4/email/encoders.py +69 -0
- package/python3.4.2/lib/python3.4/email/errors.py +107 -0
- package/python3.4.2/lib/python3.4/email/feedparser.py +526 -0
- package/python3.4.2/lib/python3.4/email/generator.py +507 -0
- package/python3.4.2/lib/python3.4/email/header.py +581 -0
- package/python3.4.2/lib/python3.4/email/headerregistry.py +583 -0
- package/python3.4.2/lib/python3.4/email/iterators.py +71 -0
- package/python3.4.2/lib/python3.4/email/message.py +1147 -0
- package/python3.4.2/lib/python3.4/email/mime/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/email/mime/application.py +36 -0
- package/python3.4.2/lib/python3.4/email/mime/audio.py +73 -0
- package/python3.4.2/lib/python3.4/email/mime/base.py +26 -0
- package/python3.4.2/lib/python3.4/email/mime/image.py +46 -0
- package/python3.4.2/lib/python3.4/email/mime/message.py +34 -0
- package/python3.4.2/lib/python3.4/email/mime/multipart.py +47 -0
- package/python3.4.2/lib/python3.4/email/mime/nonmultipart.py +22 -0
- package/python3.4.2/lib/python3.4/email/mime/text.py +41 -0
- package/python3.4.2/lib/python3.4/email/parser.py +132 -0
- package/python3.4.2/lib/python3.4/email/policy.py +201 -0
- package/python3.4.2/lib/python3.4/email/quoprimime.py +299 -0
- package/python3.4.2/lib/python3.4/email/utils.py +399 -0
- package/python3.4.2/lib/python3.4/encodings/__init__.py +152 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/__init__.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/aliases.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/ascii.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/latin_1.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/utf_8.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/aliases.py +544 -0
- package/python3.4.2/lib/python3.4/encodings/ascii.py +50 -0
- package/python3.4.2/lib/python3.4/encodings/base64_codec.py +55 -0
- package/python3.4.2/lib/python3.4/encodings/big5.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/big5hkscs.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/bz2_codec.py +78 -0
- package/python3.4.2/lib/python3.4/encodings/charmap.py +69 -0
- package/python3.4.2/lib/python3.4/encodings/cp037.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1006.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1026.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1125.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp1140.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1250.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1251.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1252.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1253.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1254.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1255.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1256.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1257.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1258.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp273.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp424.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp437.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp500.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp65001.py +40 -0
- package/python3.4.2/lib/python3.4/encodings/cp720.py +309 -0
- package/python3.4.2/lib/python3.4/encodings/cp737.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp775.py +697 -0
- package/python3.4.2/lib/python3.4/encodings/cp850.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp852.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp855.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp856.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp857.py +694 -0
- package/python3.4.2/lib/python3.4/encodings/cp858.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp860.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp861.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp862.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp863.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp864.py +690 -0
- package/python3.4.2/lib/python3.4/encodings/cp865.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp866.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp869.py +689 -0
- package/python3.4.2/lib/python3.4/encodings/cp874.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp875.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp932.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/cp949.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/cp950.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jis_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jisx0213.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jp.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_kr.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gb18030.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gb2312.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gbk.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/hex_codec.py +55 -0
- package/python3.4.2/lib/python3.4/encodings/hp_roman8.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/hz.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/idna.py +309 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_1.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_3.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_ext.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_kr.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_1.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_10.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_11.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_13.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_14.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_15.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_16.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_2.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_3.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_4.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_5.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_6.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_7.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_8.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_9.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/johab.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/koi8_r.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/koi8_u.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/latin_1.py +50 -0
- package/python3.4.2/lib/python3.4/encodings/mac_arabic.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/mac_centeuro.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_croatian.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_cyrillic.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_farsi.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_greek.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_iceland.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_latin2.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/mac_roman.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_romanian.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_turkish.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mbcs.py +47 -0
- package/python3.4.2/lib/python3.4/encodings/palmos.py +308 -0
- package/python3.4.2/lib/python3.4/encodings/ptcp154.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/punycode.py +237 -0
- package/python3.4.2/lib/python3.4/encodings/quopri_codec.py +56 -0
- package/python3.4.2/lib/python3.4/encodings/raw_unicode_escape.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/rot_13.py +113 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jis.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jis_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jisx0213.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/tis_620.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/undefined.py +49 -0
- package/python3.4.2/lib/python3.4/encodings/unicode_escape.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/unicode_internal.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16.py +155 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16_be.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16_le.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32.py +150 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32_be.py +37 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32_le.py +37 -0
- package/python3.4.2/lib/python3.4/encodings/utf_7.py +38 -0
- package/python3.4.2/lib/python3.4/encodings/utf_8.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_8_sig.py +130 -0
- package/python3.4.2/lib/python3.4/encodings/uu_codec.py +99 -0
- package/python3.4.2/lib/python3.4/encodings/zlib_codec.py +77 -0
- package/python3.4.2/lib/python3.4/ensurepip/__init__.py +210 -0
- package/python3.4.2/lib/python3.4/ensurepip/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl +0 -0
- package/python3.4.2/lib/python3.4/ensurepip/_bundled/setuptools-2.1-py2.py3-none-any.whl +0 -0
- package/python3.4.2/lib/python3.4/ensurepip/_uninstall.py +30 -0
- package/python3.4.2/lib/python3.4/enum.py +525 -0
- package/python3.4.2/lib/python3.4/filecmp.py +305 -0
- package/python3.4.2/lib/python3.4/fileinput.py +429 -0
- package/python3.4.2/lib/python3.4/fnmatch.py +109 -0
- package/python3.4.2/lib/python3.4/formatter.py +448 -0
- package/python3.4.2/lib/python3.4/fractions.py +630 -0
- package/python3.4.2/lib/python3.4/ftplib.py +1088 -0
- package/python3.4.2/lib/python3.4/functools.py +721 -0
- package/python3.4.2/lib/python3.4/genericpath.py +132 -0
- package/python3.4.2/lib/python3.4/getopt.py +215 -0
- package/python3.4.2/lib/python3.4/getpass.py +186 -0
- package/python3.4.2/lib/python3.4/gettext.py +523 -0
- package/python3.4.2/lib/python3.4/glob.py +110 -0
- package/python3.4.2/lib/python3.4/gzip.py +674 -0
- package/python3.4.2/lib/python3.4/hashlib.py +217 -0
- package/python3.4.2/lib/python3.4/heapq.py +476 -0
- package/python3.4.2/lib/python3.4/hmac.py +144 -0
- package/python3.4.2/lib/python3.4/html/__init__.py +132 -0
- package/python3.4.2/lib/python3.4/html/entities.py +2506 -0
- package/python3.4.2/lib/python3.4/html/parser.py +550 -0
- package/python3.4.2/lib/python3.4/http/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/http/client.py +1302 -0
- package/python3.4.2/lib/python3.4/http/cookiejar.py +2080 -0
- package/python3.4.2/lib/python3.4/http/cookies.py +578 -0
- package/python3.4.2/lib/python3.4/http/server.py +1241 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoComplete.py +233 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoCompleteWindow.py +415 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoExpand.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/Bindings.py +94 -0
- package/python3.4.2/lib/python3.4/idlelib/CREDITS.txt +37 -0
- package/python3.4.2/lib/python3.4/idlelib/CallTipWindow.py +170 -0
- package/python3.4.2/lib/python3.4/idlelib/CallTips.py +175 -0
- package/python3.4.2/lib/python3.4/idlelib/ChangeLog +1591 -0
- package/python3.4.2/lib/python3.4/idlelib/ClassBrowser.py +229 -0
- package/python3.4.2/lib/python3.4/idlelib/CodeContext.py +176 -0
- package/python3.4.2/lib/python3.4/idlelib/ColorDelegator.py +254 -0
- package/python3.4.2/lib/python3.4/idlelib/Debugger.py +490 -0
- package/python3.4.2/lib/python3.4/idlelib/Delegator.py +25 -0
- package/python3.4.2/lib/python3.4/idlelib/EditorWindow.py +1729 -0
- package/python3.4.2/lib/python3.4/idlelib/FileList.py +129 -0
- package/python3.4.2/lib/python3.4/idlelib/FormatParagraph.py +193 -0
- package/python3.4.2/lib/python3.4/idlelib/GrepDialog.py +159 -0
- package/python3.4.2/lib/python3.4/idlelib/HISTORY.txt +296 -0
- package/python3.4.2/lib/python3.4/idlelib/HyperParser.py +313 -0
- package/python3.4.2/lib/python3.4/idlelib/IOBinding.py +555 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/folder.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle.icns +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle.ico +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/minusnode.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/openfolder.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/plusnode.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/python.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/tk.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/IdleHistory.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/MultiCall.py +453 -0
- package/python3.4.2/lib/python3.4/idlelib/MultiStatusBar.py +45 -0
- package/python3.4.2/lib/python3.4/idlelib/NEWS.txt +877 -0
- package/python3.4.2/lib/python3.4/idlelib/ObjectBrowser.py +143 -0
- package/python3.4.2/lib/python3.4/idlelib/OutputWindow.py +144 -0
- package/python3.4.2/lib/python3.4/idlelib/ParenMatch.py +178 -0
- package/python3.4.2/lib/python3.4/idlelib/PathBrowser.py +106 -0
- package/python3.4.2/lib/python3.4/idlelib/Percolator.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/PyParse.py +618 -0
- package/python3.4.2/lib/python3.4/idlelib/PyShell.py +1619 -0
- package/python3.4.2/lib/python3.4/idlelib/README.txt +60 -0
- package/python3.4.2/lib/python3.4/idlelib/RemoteDebugger.py +389 -0
- package/python3.4.2/lib/python3.4/idlelib/RemoteObjectBrowser.py +36 -0
- package/python3.4.2/lib/python3.4/idlelib/ReplaceDialog.py +221 -0
- package/python3.4.2/lib/python3.4/idlelib/RstripExtension.py +33 -0
- package/python3.4.2/lib/python3.4/idlelib/ScriptBinding.py +207 -0
- package/python3.4.2/lib/python3.4/idlelib/ScrolledList.py +140 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchDialog.py +89 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchDialogBase.py +184 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchEngine.py +233 -0
- package/python3.4.2/lib/python3.4/idlelib/StackViewer.py +152 -0
- package/python3.4.2/lib/python3.4/idlelib/TODO.txt +210 -0
- package/python3.4.2/lib/python3.4/idlelib/ToolTip.py +97 -0
- package/python3.4.2/lib/python3.4/idlelib/TreeWidget.py +465 -0
- package/python3.4.2/lib/python3.4/idlelib/UndoDelegator.py +365 -0
- package/python3.4.2/lib/python3.4/idlelib/WidgetRedirector.py +174 -0
- package/python3.4.2/lib/python3.4/idlelib/WindowList.py +90 -0
- package/python3.4.2/lib/python3.4/idlelib/ZoomHeight.py +51 -0
- package/python3.4.2/lib/python3.4/idlelib/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/idlelib/__main__.py +9 -0
- package/python3.4.2/lib/python3.4/idlelib/aboutDialog.py +145 -0
- package/python3.4.2/lib/python3.4/idlelib/config-extensions.def +96 -0
- package/python3.4.2/lib/python3.4/idlelib/config-highlight.def +64 -0
- package/python3.4.2/lib/python3.4/idlelib/config-keys.def +214 -0
- package/python3.4.2/lib/python3.4/idlelib/config-main.def +79 -0
- package/python3.4.2/lib/python3.4/idlelib/configDialog.py +1195 -0
- package/python3.4.2/lib/python3.4/idlelib/configHandler.py +722 -0
- package/python3.4.2/lib/python3.4/idlelib/configHelpSourceEdit.py +166 -0
- package/python3.4.2/lib/python3.4/idlelib/configSectionNameDialog.py +98 -0
- package/python3.4.2/lib/python3.4/idlelib/dynOptionMenuWidget.py +57 -0
- package/python3.4.2/lib/python3.4/idlelib/extend.txt +83 -0
- package/python3.4.2/lib/python3.4/idlelib/help.txt +368 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.bat +4 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.py +11 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.pyw +21 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/README.txt +115 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/__init__.py +9 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/htest.py +369 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_idle.py +55 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_tk.py +298 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autocomplete.py +143 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autoexpand.py +141 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_calltips.py +172 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_config_name.py +75 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_configdialog.py +32 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_delegator.py +37 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_formatparagraph.py +377 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_grep.py +80 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_hyperparser.py +273 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_idlehistory.py +167 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_parenmatch.py +109 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_pathbrowser.py +12 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_rstrip.py +49 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchdialogbase.py +165 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchengine.py +329 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_text.py +228 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_textview.py +97 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_warning.py +73 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_widgetredir.py +122 -0
- package/python3.4.2/lib/python3.4/idlelib/idlever.py +1 -0
- package/python3.4.2/lib/python3.4/idlelib/keybindingDialog.py +266 -0
- package/python3.4.2/lib/python3.4/idlelib/macosxSupport.py +239 -0
- package/python3.4.2/lib/python3.4/idlelib/rpc.py +624 -0
- package/python3.4.2/lib/python3.4/idlelib/run.py +404 -0
- package/python3.4.2/lib/python3.4/idlelib/tabbedpages.py +498 -0
- package/python3.4.2/lib/python3.4/idlelib/testcode.py +31 -0
- package/python3.4.2/lib/python3.4/idlelib/textView.py +86 -0
- package/python3.4.2/lib/python3.4/imaplib.py +1549 -0
- package/python3.4.2/lib/python3.4/imghdr.py +154 -0
- package/python3.4.2/lib/python3.4/imp.py +315 -0
- package/python3.4.2/lib/python3.4/importlib/__init__.py +156 -0
- package/python3.4.2/lib/python3.4/importlib/_bootstrap.py +2461 -0
- package/python3.4.2/lib/python3.4/importlib/abc.py +323 -0
- package/python3.4.2/lib/python3.4/importlib/machinery.py +21 -0
- package/python3.4.2/lib/python3.4/importlib/util.py +202 -0
- package/python3.4.2/lib/python3.4/inspect.py +2759 -0
- package/python3.4.2/lib/python3.4/io.py +92 -0
- package/python3.4.2/lib/python3.4/ipaddress.py +2183 -0
- package/python3.4.2/lib/python3.4/json/__init__.py +331 -0
- package/python3.4.2/lib/python3.4/json/decoder.py +362 -0
- package/python3.4.2/lib/python3.4/json/encoder.py +433 -0
- package/python3.4.2/lib/python3.4/json/scanner.py +73 -0
- package/python3.4.2/lib/python3.4/json/tool.py +39 -0
- package/python3.4.2/lib/python3.4/keyword.py +94 -0
- package/python3.4.2/lib/python3.4/lib2to3/Grammar.txt +159 -0
- package/python3.4.2/lib/python3.4/lib2to3/Grammar3.4.2.final.0.pickle +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar.txt +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar3.4.2.final.0.pickle +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/lib2to3/btm_matcher.py +168 -0
- package/python3.4.2/lib/python3.4/lib2to3/btm_utils.py +281 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixer_base.py +187 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixer_util.py +455 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_apply.py +59 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_asserts.py +34 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_basestring.py +14 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_buffer.py +22 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_callable.py +37 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_dict.py +107 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_except.py +93 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exec.py +40 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_execfile.py +52 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exitfunc.py +72 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_filter.py +76 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_funcattrs.py +21 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_future.py +22 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_getcwdu.py +19 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_has_key.py +110 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_idioms.py +152 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_import.py +99 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports.py +145 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports2.py +16 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_input.py +26 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_intern.py +31 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_isinstance.py +52 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools.py +43 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools_imports.py +57 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_long.py +19 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_map.py +91 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_metaclass.py +228 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_methodattrs.py +24 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ne.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_next.py +103 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_nonzero.py +21 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_numliterals.py +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_operator.py +98 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_paren.py +44 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_print.py +87 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raise.py +90 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raw_input.py +17 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reduce.py +35 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reload.py +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_renames.py +70 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_repr.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_set_literal.py +53 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_standarderror.py +18 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_sys_exc.py +30 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_throw.py +56 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_tuple_params.py +175 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_types.py +62 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_unicode.py +42 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_urllib.py +197 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ws_comma.py +39 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xrange.py +73 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xreadlines.py +25 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_zip.py +35 -0
- package/python3.4.2/lib/python3.4/lib2to3/main.py +268 -0
- package/python3.4.2/lib/python3.4/lib2to3/patcomp.py +205 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/conv.py +257 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/driver.py +157 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/grammar.py +183 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/literals.py +60 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/parse.py +201 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/pgen.py +386 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/token.py +83 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/tokenize.py +502 -0
- package/python3.4.2/lib/python3.4/lib2to3/pygram.py +40 -0
- package/python3.4.2/lib/python3.4/lib2to3/pytree.py +864 -0
- package/python3.4.2/lib/python3.4/lib2to3/refactor.py +747 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/__init__.py +24 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/README +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/bom.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/crlf.py +3 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/different_encoding.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/false_encoding.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/bad_order.py +5 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_explicit.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_first.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_last.py +7 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_parrot.py +13 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_preorder.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/no_fixer_cls.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/parrot_example.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/infinite_recursion.py +2669 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/py2_test_grammar.py +974 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/py3_test_grammar.py +923 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/pytree_idempotency.py +92 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/support.py +54 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_all_fixers.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_fixers.py +4687 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_main.py +139 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_parser.py +249 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_pytree.py +477 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_refactor.py +321 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_util.py +594 -0
- package/python3.4.2/lib/python3.4/linecache.py +134 -0
- package/python3.4.2/lib/python3.4/locale.py +1559 -0
- package/python3.4.2/lib/python3.4/logging/__init__.py +1950 -0
- package/python3.4.2/lib/python3.4/logging/config.py +927 -0
- package/python3.4.2/lib/python3.4/logging/handlers.py +1452 -0
- package/python3.4.2/lib/python3.4/lzma.py +511 -0
- package/python3.4.2/lib/python3.4/macpath.py +205 -0
- package/python3.4.2/lib/python3.4/macurl2path.py +77 -0
- package/python3.4.2/lib/python3.4/mailbox.py +2136 -0
- package/python3.4.2/lib/python3.4/mailcap.py +253 -0
- package/python3.4.2/lib/python3.4/mimetypes.py +592 -0
- package/python3.4.2/lib/python3.4/modulefinder.py +642 -0
- package/python3.4.2/lib/python3.4/multiprocessing/__init__.py +38 -0
- package/python3.4.2/lib/python3.4/multiprocessing/connection.py +954 -0
- package/python3.4.2/lib/python3.4/multiprocessing/context.py +348 -0
- package/python3.4.2/lib/python3.4/multiprocessing/dummy/__init__.py +119 -0
- package/python3.4.2/lib/python3.4/multiprocessing/dummy/connection.py +74 -0
- package/python3.4.2/lib/python3.4/multiprocessing/forkserver.py +267 -0
- package/python3.4.2/lib/python3.4/multiprocessing/heap.py +249 -0
- package/python3.4.2/lib/python3.4/multiprocessing/managers.py +1131 -0
- package/python3.4.2/lib/python3.4/multiprocessing/pool.py +769 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_fork.py +83 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_forkserver.py +69 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_posix.py +69 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_win32.py +99 -0
- package/python3.4.2/lib/python3.4/multiprocessing/process.py +332 -0
- package/python3.4.2/lib/python3.4/multiprocessing/queues.py +367 -0
- package/python3.4.2/lib/python3.4/multiprocessing/reduction.py +240 -0
- package/python3.4.2/lib/python3.4/multiprocessing/resource_sharer.py +158 -0
- package/python3.4.2/lib/python3.4/multiprocessing/semaphore_tracker.py +143 -0
- package/python3.4.2/lib/python3.4/multiprocessing/sharedctypes.py +245 -0
- package/python3.4.2/lib/python3.4/multiprocessing/spawn.py +287 -0
- package/python3.4.2/lib/python3.4/multiprocessing/synchronize.py +418 -0
- package/python3.4.2/lib/python3.4/multiprocessing/util.py +367 -0
- package/python3.4.2/lib/python3.4/netrc.py +142 -0
- package/python3.4.2/lib/python3.4/nntplib.py +1134 -0
- package/python3.4.2/lib/python3.4/ntpath.py +625 -0
- package/python3.4.2/lib/python3.4/nturl2path.py +66 -0
- package/python3.4.2/lib/python3.4/numbers.py +394 -0
- package/python3.4.2/lib/python3.4/opcode.py +200 -0
- package/python3.4.2/lib/python3.4/operator.py +411 -0
- package/python3.4.2/lib/python3.4/optparse.py +1680 -0
- package/python3.4.2/lib/python3.4/os.py +980 -0
- package/python3.4.2/lib/python3.4/pathlib.py +1291 -0
- package/python3.4.2/lib/python3.4/pdb.py +1685 -0
- package/python3.4.2/lib/python3.4/pickle.py +1599 -0
- package/python3.4.2/lib/python3.4/pickletools.py +2818 -0
- package/python3.4.2/lib/python3.4/pipes.py +247 -0
- package/python3.4.2/lib/python3.4/pkgutil.py +629 -0
- package/python3.4.2/lib/python3.4/plat-linux/CDROM.py +207 -0
- package/python3.4.2/lib/python3.4/plat-linux/DLFCN.py +83 -0
- package/python3.4.2/lib/python3.4/plat-linux/IN.py +615 -0
- package/python3.4.2/lib/python3.4/plat-linux/TYPES.py +170 -0
- package/python3.4.2/lib/python3.4/plat-linux/regen +8 -0
- package/python3.4.2/lib/python3.4/platform.py +1476 -0
- package/python3.4.2/lib/python3.4/plistlib.py +1025 -0
- package/python3.4.2/lib/python3.4/poplib.py +461 -0
- package/python3.4.2/lib/python3.4/posixpath.py +457 -0
- package/python3.4.2/lib/python3.4/pprint.py +416 -0
- package/python3.4.2/lib/python3.4/profile.py +589 -0
- package/python3.4.2/lib/python3.4/pstats.py +691 -0
- package/python3.4.2/lib/python3.4/pty.py +170 -0
- package/python3.4.2/lib/python3.4/py_compile.py +185 -0
- package/python3.4.2/lib/python3.4/pyclbr.py +351 -0
- package/python3.4.2/lib/python3.4/pydoc.py +2622 -0
- package/python3.4.2/lib/python3.4/pydoc_data/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/pydoc_data/_pydoc.css +6 -0
- package/python3.4.2/lib/python3.4/pydoc_data/topics.py +79 -0
- package/python3.4.2/lib/python3.4/queue.py +249 -0
- package/python3.4.2/lib/python3.4/quopri.py +242 -0
- package/python3.4.2/lib/python3.4/random.py +742 -0
- package/python3.4.2/lib/python3.4/re.py +368 -0
- package/python3.4.2/lib/python3.4/reprlib.py +157 -0
- package/python3.4.2/lib/python3.4/rlcompleter.py +165 -0
- package/python3.4.2/lib/python3.4/runpy.py +271 -0
- package/python3.4.2/lib/python3.4/sched.py +167 -0
- package/python3.4.2/lib/python3.4/selectors.py +525 -0
- package/python3.4.2/lib/python3.4/shelve.py +239 -0
- package/python3.4.2/lib/python3.4/shlex.py +304 -0
- package/python3.4.2/lib/python3.4/shutil.py +1127 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/PKG-INFO +55 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/SOURCES.txt +126 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/entry_points.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/requires.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_compat.py +150 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_stringdefs.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/bccache.py +344 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/compiler.py +1640 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/constants.py +32 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/debug.py +337 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/defaults.py +43 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/environment.py +1191 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/exceptions.py +146 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/ext.py +636 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/filters.py +987 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/lexer.py +733 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/loaders.py +471 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/meta.py +103 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/nodes.py +914 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/optimizer.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/parser.py +895 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/runtime.py +581 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/sandbox.py +368 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/tests.py +149 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/__init__.py +156 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/api.py +261 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/bytecode_cache.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/core_tags.py +305 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/debug.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/doctests.py +29 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/ext.py +459 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/filters.py +515 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/imports.py +141 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/inheritance.py +250 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/lexnparse.py +593 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/loader.py +226 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/regression.py +279 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/broken.html +3 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/foo/test.html +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/syntaxerror.html +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/test.html +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/security.py +166 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/tests.py +93 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/utils.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/utils.py +520 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/visitor.py +87 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/PKG-INFO +119 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/SOURCES.txt +17 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/__init__.py +298 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_compat.py +26 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_constants.py +267 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_native.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_speedups.c +239 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/tests.py +179 -0
- package/python3.4.2/lib/python3.4/site-packages/README +2 -0
- package/python3.4.2/lib/python3.4/site-packages/_markerlib/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/_markerlib/markers.py +119 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/PKG-INFO +68 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/SOURCES.txt +23 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/entry_points.txt +3 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/requires.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/scripts/android-debian-builder +6 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__main__.py +26 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/build.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/config.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/deb.sh +106 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/default-config +42 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/first-time-setup.sh +94 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/init.sh +27 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/examples/jessie-armhf.cfg +26 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/run_tests.py +38 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/script.py +110 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/util.py +177 -0
- package/python3.4.2/lib/python3.4/site-packages/easy-install.pth +4 -0
- package/python3.4.2/lib/python3.4/site-packages/easy_install.py +5 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +277 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +8 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +119 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +50 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +56 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +137 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1064 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1301 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +488 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +364 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1026 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +317 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +323 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1575 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +721 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +958 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +3104 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/_base.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +20 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +65 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +205 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2713 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/ihatexml.py +285 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/inputstream.py +881 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +271 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +320 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/tokenizer.py +1731 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/_base.py +377 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +227 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +337 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +369 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +57 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/_base.py +200 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py +208 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/__init__.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/_base.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/datrie.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/py.py +67 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/utils.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py +2762 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +34 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +77 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +388 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem +5026 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +24 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +115 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +454 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +75 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +45 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +803 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/__init__.py +32 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +925 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py +231 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +62 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +61 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/compat.py +34 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +39 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +86 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +242 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +90 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +596 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py +428 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py +472 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py +283 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py +569 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py +219 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py +225 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py +200 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py +139 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +575 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +91 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +170 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +205 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +204 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py +710 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +422 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +126 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/fields.py +177 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py +100 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py +260 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +385 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +258 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/request.py +141 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +308 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +27 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +45 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +133 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py +234 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py +162 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +637 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +127 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +673 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +646 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +201 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/baseparser.py +224 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +371 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +114 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/help.py +33 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +314 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +162 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +80 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +195 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +351 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/download.py +644 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/index.py +990 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +172 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/log.py +276 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +102 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/req.py +1931 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +18 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/status_codes.py +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/util.py +720 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +251 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +131 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +151 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +273 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +560 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst +71 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/METADATA +98 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/RECORD +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/WHEEL +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/entry_points.txt +5 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/metadata.json +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pkg_resources.py +2719 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/__init__.py +98 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/archive_util.py +210 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-arm-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/alias.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_egg.py +553 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_rpm.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_wininst.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_ext.py +298 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_py.py +221 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/develop.py +167 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py +1915 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/egg_info.py +392 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install.py +103 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_egg_info.py +125 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_lib.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_scripts.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/launcher manifest.xml +15 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/register.py +10 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/rotate.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/saveopts.py +24 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/sdist.py +238 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/setopt.py +164 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/test.py +198 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/upload_docs.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/compat.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/depends.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/dist.py +796 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/extension.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-arm-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/lib2to3_ex.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/package_index.py +1057 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py26compat.py +19 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py27compat.py +15 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py31compat.py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py +322 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/script template (dev).py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/script template.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/site-patch.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/ssl_support.py +234 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/svn_utils.py +564 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/__init__.py +352 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/doctest.py +2683 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/environment.py +165 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/py26compat.py +14 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/script-with-bom.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/server.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_bdist_egg.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_build_ext.py +20 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_develop.py +122 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_dist_info.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_easy_install.py +394 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_egg_info.py +173 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_markerlib.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_packageindex.py +203 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_resources.py +620 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sandbox.py +79 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sdist.py +535 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_svn.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_test.py +124 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_upload_docs.py +72 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/version.py +1 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/DESCRIPTION.rst +1742 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/METADATA +1772 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/RECORD +149 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/WHEEL +6 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/dependency_links.txt +2 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt +62 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt.orig +62 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/pydist.json +1 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/requires.txt.orig +7 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/top_level.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site.py +616 -0
- package/python3.4.2/lib/python3.4/smtpd.py +861 -0
- package/python3.4.2/lib/python3.4/smtplib.py +999 -0
- package/python3.4.2/lib/python3.4/sndhdr.py +240 -0
- package/python3.4.2/lib/python3.4/socket.py +535 -0
- package/python3.4.2/lib/python3.4/socketserver.py +748 -0
- package/python3.4.2/lib/python3.4/sqlite3/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/sqlite3/dbapi2.py +89 -0
- package/python3.4.2/lib/python3.4/sqlite3/dump.py +70 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/dbapi.py +911 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/dump.py +81 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/factory.py +253 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/hooks.py +258 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/regression.py +358 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/transactions.py +204 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/types.py +403 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/userfunctions.py +468 -0
- package/python3.4.2/lib/python3.4/sre_compile.py +489 -0
- package/python3.4.2/lib/python3.4/sre_constants.py +261 -0
- package/python3.4.2/lib/python3.4/sre_parse.py +859 -0
- package/python3.4.2/lib/python3.4/ssl.py +945 -0
- package/python3.4.2/lib/python3.4/stat.py +155 -0
- package/python3.4.2/lib/python3.4/statistics.py +595 -0
- package/python3.4.2/lib/python3.4/string.py +282 -0
- package/python3.4.2/lib/python3.4/stringprep.py +272 -0
- package/python3.4.2/lib/python3.4/struct.py +15 -0
- package/python3.4.2/lib/python3.4/subprocess.py +1690 -0
- package/python3.4.2/lib/python3.4/sunau.py +525 -0
- package/python3.4.2/lib/python3.4/symbol.py +111 -0
- package/python3.4.2/lib/python3.4/symtable.py +240 -0
- package/python3.4.2/lib/python3.4/sysconfig.py +709 -0
- package/python3.4.2/lib/python3.4/tabnanny.py +332 -0
- package/python3.4.2/lib/python3.4/tarfile.py +2519 -0
- package/python3.4.2/lib/python3.4/telnetlib.py +672 -0
- package/python3.4.2/lib/python3.4/tempfile.py +698 -0
- package/python3.4.2/lib/python3.4/test/185test.db +0 -0
- package/python3.4.2/lib/python3.4/test/Sine-1000Hz-300ms.aif +0 -0
- package/python3.4.2/lib/python3.4/test/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/test/__main__.py +3 -0
- package/python3.4.2/lib/python3.4/test/_test_multiprocessing.py +3841 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-alaw.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiotest.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiotests.py +329 -0
- package/python3.4.2/lib/python3.4/test/autotest.py +6 -0
- package/python3.4.2/lib/python3.4/test/bad_coding.py +1 -0
- package/python3.4.2/lib/python3.4/test/bad_coding2.py +2 -0
- package/python3.4.2/lib/python3.4/test/badcert.pem +36 -0
- package/python3.4.2/lib/python3.4/test/badkey.pem +40 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_3131.py +2 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future10.py +3 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future3.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future4.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future5.py +12 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future6.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future7.py +11 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future8.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future9.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_pep3120.py +1 -0
- package/python3.4.2/lib/python3.4/test/buffer_tests.py +218 -0
- package/python3.4.2/lib/python3.4/test/bytecode_helper.py +41 -0
- package/python3.4.2/lib/python3.4/test/capath/4e1295a3.0 +14 -0
- package/python3.4.2/lib/python3.4/test/capath/5ed36f99.0 +41 -0
- package/python3.4.2/lib/python3.4/test/capath/6e88d7b8.0 +14 -0
- package/python3.4.2/lib/python3.4/test/capath/99d0fa06.0 +41 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.1 +2 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.2 +537 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.3 +69 -0
- package/python3.4.2/lib/python3.4/test/check_soundcard.vbs +13 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs-utf8.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/cp949-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/cp949.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213-utf8.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030-utf8.txt +15 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030.txt +15 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312-utf8.txt +6 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312.txt +6 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gbk-utf8.txt +14 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gbk.txt +14 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/hz-utf8.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/hz.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/johab-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/johab.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213-utf8.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cmath_testcases.txt +2370 -0
- package/python3.4.2/lib/python3.4/test/coding20731.py +4 -0
- package/python3.4.2/lib/python3.4/test/curses_tests.py +46 -0
- package/python3.4.2/lib/python3.4/test/data/README +2 -0
- package/python3.4.2/lib/python3.4/test/datetimetester.py +3786 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/abs.decTest +161 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/add.decTest +2716 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/and.decTest +338 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/base.decTest +1411 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/clamp.decTest +211 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/class.decTest +131 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/compare.decTest +758 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotal.decTest +798 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotmag.decTest +790 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copy.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copyabs.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copynegate.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copysign.decTest +177 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAbs.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAdd.decTest +1328 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAnd.decTest +347 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddBase.decTest +1104 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCanonical.decTest +357 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddClass.decTest +76 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompare.decTest +744 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareSig.decTest +647 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotal.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotalMag.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopy.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyAbs.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyNegate.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopySign.decTest +175 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivide.decTest +863 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivideInt.decTest +449 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddEncode.decTest +495 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddFMA.decTest +1698 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddInvert.decTest +202 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddLogB.decTest +159 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMax.decTest +322 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMaxMag.decTest +304 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMin.decTest +309 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinMag.decTest +293 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMultiply.decTest +553 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextMinus.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextPlus.decTest +124 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextToward.decTest +374 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddOr.decTest +292 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddPlus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddQuantize.decTest +833 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddReduce.decTest +182 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainder.decTest +600 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainderNear.decTest +629 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRotate.decTest +262 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSameQuantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddScaleB.decTest +243 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddShift.decTest +262 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSubtract.decTest +629 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddToIntegral.decTest +257 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddXor.decTest +337 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decDouble.decTest +65 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decQuad.decTest +65 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decSingle.decTest +25 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/divide.decTest +854 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/divideint.decTest +486 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAbs.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAdd.decTest +1215 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAnd.decTest +420 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqBase.decTest +1081 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCanonical.decTest +372 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqClass.decTest +77 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompare.decTest +753 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareSig.decTest +647 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotal.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotalMag.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopy.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyAbs.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyNegate.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopySign.decTest +175 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivide.decTest +808 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivideInt.decTest +453 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqEncode.decTest +477 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqFMA.decTest +1786 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqInvert.decTest +245 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqLogB.decTest +160 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMax.decTest +322 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMaxMag.decTest +304 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMin.decTest +309 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinMag.decTest +293 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMultiply.decTest +589 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextMinus.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextPlus.decTest +124 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextToward.decTest +375 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqOr.decTest +401 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqPlus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqQuantize.decTest +836 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqReduce.decTest +183 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainder.decTest +597 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainderNear.decTest +631 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRotate.decTest +298 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSameQuantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqScaleB.decTest +260 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqShift.decTest +298 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSubtract.decTest +635 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqToIntegral.decTest +257 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqXor.decTest +410 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dsBase.decTest +1062 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dsEncode.decTest +372 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/exp.decTest +674 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/extra.decTest +2830 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/fma.decTest +3426 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/inexact.decTest +215 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/invert.decTest +176 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ln.decTest +611 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/log10.decTest +551 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/logb.decTest +188 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/max.decTest +424 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/maxmag.decTest +404 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/min.decTest +407 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/minmag.decTest +390 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/minus.decTest +182 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/multiply.decTest +731 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nextminus.decTest +148 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nextplus.decTest +150 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nexttoward.decTest +426 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/or.decTest +334 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/plus.decTest +195 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/power.decTest +1624 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/powersqrt.decTest +2970 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/quantize.decTest +948 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/randomBound32.decTest +2443 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/randoms.decTest +4030 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/reduce.decTest +234 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/remainder.decTest +640 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/remainderNear.decTest +572 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rescale.decTest +764 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rotate.decTest +247 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rounding.decTest +1303 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/samequantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/scaleb.decTest +209 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/shift.decTest +250 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/squareroot.decTest +3834 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/subtract.decTest +873 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/testall.decTest +87 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegral.decTest +241 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegralx.decTest +255 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/xor.decTest +335 -0
- package/python3.4.2/lib/python3.4/test/dh512.pem +9 -0
- package/python3.4.2/lib/python3.4/test/dis_module.py +5 -0
- package/python3.4.2/lib/python3.4/test/doctest_aliases.py +13 -0
- package/python3.4.2/lib/python3.4/test/double_const.py +30 -0
- package/python3.4.2/lib/python3.4/test/empty.vbs +1 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/module_iso_8859_1.py +5 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/module_koi8_r.py +3 -0
- package/python3.4.2/lib/python3.4/test/exception_hierarchy.txt +61 -0
- package/python3.4.2/lib/python3.4/test/final_a.py +19 -0
- package/python3.4.2/lib/python3.4/test/final_b.py +19 -0
- package/python3.4.2/lib/python3.4/test/floating_points.txt +1028 -0
- package/python3.4.2/lib/python3.4/test/fork_wait.py +77 -0
- package/python3.4.2/lib/python3.4/test/formatfloat_testcases.txt +355 -0
- package/python3.4.2/lib/python3.4/test/future_test1.py +11 -0
- package/python3.4.2/lib/python3.4/test/future_test2.py +10 -0
- package/python3.4.2/lib/python3.4/test/gdb_sample.py +12 -0
- package/python3.4.2/lib/python3.4/test/https_svn_python_org_root.pem +41 -0
- package/python3.4.2/lib/python3.4/test/ieee754.txt +185 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.bmp +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.gif +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.jpg +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.pbm +3 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.pgm +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.png +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.ppm +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.ras +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.sgi +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.tiff +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.xbm +6 -0
- package/python3.4.2/lib/python3.4/test/inspect_fodder.py +58 -0
- package/python3.4.2/lib/python3.4/test/inspect_fodder2.py +111 -0
- package/python3.4.2/lib/python3.4/test/keycert.passwd.pem +33 -0
- package/python3.4.2/lib/python3.4/test/keycert.pem +31 -0
- package/python3.4.2/lib/python3.4/test/keycert2.pem +31 -0
- package/python3.4.2/lib/python3.4/test/keycert3.pem +73 -0
- package/python3.4.2/lib/python3.4/test/keycert4.pem +73 -0
- package/python3.4.2/lib/python3.4/test/list_tests.py +585 -0
- package/python3.4.2/lib/python3.4/test/lock_tests.py +896 -0
- package/python3.4.2/lib/python3.4/test/mailcap.txt +39 -0
- package/python3.4.2/lib/python3.4/test/make_ssl_certs.py +176 -0
- package/python3.4.2/lib/python3.4/test/mapping_tests.py +657 -0
- package/python3.4.2/lib/python3.4/test/math_testcases.txt +633 -0
- package/python3.4.2/lib/python3.4/test/memory_watchdog.py +28 -0
- package/python3.4.2/lib/python3.4/test/mime.types +1445 -0
- package/python3.4.2/lib/python3.4/test/mock_socket.py +156 -0
- package/python3.4.2/lib/python3.4/test/mp_fork_bomb.py +18 -0
- package/python3.4.2/lib/python3.4/test/multibytecodec_support.py +377 -0
- package/python3.4.2/lib/python3.4/test/nokia.pem +31 -0
- package/python3.4.2/lib/python3.4/test/nullbytecert.pem +90 -0
- package/python3.4.2/lib/python3.4/test/nullcert.pem +0 -0
- package/python3.4.2/lib/python3.4/test/outstanding_bugs.py +18 -0
- package/python3.4.2/lib/python3.4/test/pickletester.py +2253 -0
- package/python3.4.2/lib/python3.4/test/profilee.py +115 -0
- package/python3.4.2/lib/python3.4/test/pstats.pck +0 -0
- package/python3.4.2/lib/python3.4/test/pycacert.pem +78 -0
- package/python3.4.2/lib/python3.4/test/pycakey.pem +28 -0
- package/python3.4.2/lib/python3.4/test/pyclbr_input.py +33 -0
- package/python3.4.2/lib/python3.4/test/pydoc_mod.py +37 -0
- package/python3.4.2/lib/python3.4/test/pydocfodder.py +216 -0
- package/python3.4.2/lib/python3.4/test/pystone.py +277 -0
- package/python3.4.2/lib/python3.4/test/randv2_32.pck +633 -0
- package/python3.4.2/lib/python3.4/test/randv2_64.pck +633 -0
- package/python3.4.2/lib/python3.4/test/randv3.pck +633 -0
- package/python3.4.2/lib/python3.4/test/re_tests.py +670 -0
- package/python3.4.2/lib/python3.4/test/regrtest.py +1589 -0
- package/python3.4.2/lib/python3.4/test/relimport.py +1 -0
- package/python3.4.2/lib/python3.4/test/reperf.py +23 -0
- package/python3.4.2/lib/python3.4/test/revocation.crl +11 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest.py +76 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest_no_docstrings.py +12 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest_no_doctests.py +15 -0
- package/python3.4.2/lib/python3.4/test/script_helper.py +178 -0
- package/python3.4.2/lib/python3.4/test/seq_tests.py +397 -0
- package/python3.4.2/lib/python3.4/test/sgml_input.html +212 -0
- package/python3.4.2/lib/python3.4/test/sha256.pem +128 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/README +12 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.8svx +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.au +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.hcom +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.sndt +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.voc +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.wav +0 -0
- package/python3.4.2/lib/python3.4/test/sortperf.py +169 -0
- package/python3.4.2/lib/python3.4/test/ssl_cert.pem +15 -0
- package/python3.4.2/lib/python3.4/test/ssl_key.passwd.pem +18 -0
- package/python3.4.2/lib/python3.4/test/ssl_key.pem +16 -0
- package/python3.4.2/lib/python3.4/test/ssl_servers.py +205 -0
- package/python3.4.2/lib/python3.4/test/ssltests.py +22 -0
- package/python3.4.2/lib/python3.4/test/string_tests.py +1385 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/fd_status.py +34 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/input_reader.py +7 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/qcat.py +7 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/qgrep.py +10 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/sigchild_ignore.py +15 -0
- package/python3.4.2/lib/python3.4/test/support/__init__.py +2241 -0
- package/python3.4.2/lib/python3.4/test/test___all__.py +117 -0
- package/python3.4.2/lib/python3.4/test/test___future__.py +65 -0
- package/python3.4.2/lib/python3.4/test/test__locale.py +170 -0
- package/python3.4.2/lib/python3.4/test/test__opcode.py +23 -0
- package/python3.4.2/lib/python3.4/test/test__osx_support.py +281 -0
- package/python3.4.2/lib/python3.4/test/test_abc.py +408 -0
- package/python3.4.2/lib/python3.4/test/test_abstract_numbers.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_aifc.py +384 -0
- package/python3.4.2/lib/python3.4/test/test_argparse.py +4979 -0
- package/python3.4.2/lib/python3.4/test/test_array.py +1323 -0
- package/python3.4.2/lib/python3.4/test/test_ast.py +1038 -0
- package/python3.4.2/lib/python3.4/test/test_asynchat.py +333 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/__init__.py +10 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo.py +8 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo2.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo3.py +11 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/keycert3.pem +73 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/pycacert.pem +78 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_cert.pem +15 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_key.pem +16 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_base_events.py +1064 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_events.py +2240 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_futures.py +442 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_locks.py +858 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_proactor_events.py +492 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_queues.py +476 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_selector_events.py +1737 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_streams.py +628 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_subprocess.py +217 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_tasks.py +1977 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_transports.py +90 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_unix_events.py +1582 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_events.py +141 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_utils.py +171 -0
- package/python3.4.2/lib/python3.4/test/test_asyncore.py +859 -0
- package/python3.4.2/lib/python3.4/test/test_atexit.py +185 -0
- package/python3.4.2/lib/python3.4/test/test_audioop.py +534 -0
- package/python3.4.2/lib/python3.4/test/test_augassign.py +315 -0
- package/python3.4.2/lib/python3.4/test/test_base64.py +666 -0
- package/python3.4.2/lib/python3.4/test/test_bigaddrspace.py +101 -0
- package/python3.4.2/lib/python3.4/test/test_bigmem.py +1257 -0
- package/python3.4.2/lib/python3.4/test/test_binascii.py +270 -0
- package/python3.4.2/lib/python3.4/test/test_binhex.py +56 -0
- package/python3.4.2/lib/python3.4/test/test_binop.py +380 -0
- package/python3.4.2/lib/python3.4/test/test_bisect.py +328 -0
- package/python3.4.2/lib/python3.4/test/test_bool.py +347 -0
- package/python3.4.2/lib/python3.4/test/test_buffer.py +4294 -0
- package/python3.4.2/lib/python3.4/test/test_bufio.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_builtin.py +1637 -0
- package/python3.4.2/lib/python3.4/test/test_bytes.py +1433 -0
- package/python3.4.2/lib/python3.4/test/test_bz2.py +880 -0
- package/python3.4.2/lib/python3.4/test/test_calendar.py +714 -0
- package/python3.4.2/lib/python3.4/test/test_call.py +131 -0
- package/python3.4.2/lib/python3.4/test/test_capi.py +469 -0
- package/python3.4.2/lib/python3.4/test/test_cgi.py +489 -0
- package/python3.4.2/lib/python3.4/test/test_cgitb.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_charmapcodec.py +56 -0
- package/python3.4.2/lib/python3.4/test/test_class.py +552 -0
- package/python3.4.2/lib/python3.4/test/test_cmath.py +536 -0
- package/python3.4.2/lib/python3.4/test/test_cmd.py +243 -0
- package/python3.4.2/lib/python3.4/test/test_cmd_line.py +473 -0
- package/python3.4.2/lib/python3.4/test/test_cmd_line_script.py +481 -0
- package/python3.4.2/lib/python3.4/test/test_code.py +170 -0
- package/python3.4.2/lib/python3.4/test/test_code_module.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_codeccallbacks.py +880 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_cn.py +90 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_hk.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_iso2022.py +45 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_jp.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_kr.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_tw.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_cn.py +29 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_hk.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_jp.py +63 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_kr.py +40 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_tw.py +30 -0
- package/python3.4.2/lib/python3.4/test/test_codecs.py +2901 -0
- package/python3.4.2/lib/python3.4/test/test_codeop.py +304 -0
- package/python3.4.2/lib/python3.4/test/test_collections.py +1552 -0
- package/python3.4.2/lib/python3.4/test/test_colorsys.py +100 -0
- package/python3.4.2/lib/python3.4/test/test_compare.py +67 -0
- package/python3.4.2/lib/python3.4/test/test_compile.py +561 -0
- package/python3.4.2/lib/python3.4/test/test_compileall.py +384 -0
- package/python3.4.2/lib/python3.4/test/test_complex.py +638 -0
- package/python3.4.2/lib/python3.4/test/test_concurrent_futures.py +685 -0
- package/python3.4.2/lib/python3.4/test/test_configparser.py +1768 -0
- package/python3.4.2/lib/python3.4/test/test_contains.py +93 -0
- package/python3.4.2/lib/python3.4/test/test_contextlib.py +828 -0
- package/python3.4.2/lib/python3.4/test/test_copy.py +759 -0
- package/python3.4.2/lib/python3.4/test/test_copyreg.py +121 -0
- package/python3.4.2/lib/python3.4/test/test_cprofile.py +98 -0
- package/python3.4.2/lib/python3.4/test/test_crashers.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_crypt.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_csv.py +1074 -0
- package/python3.4.2/lib/python3.4/test/test_ctypes.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_curses.py +395 -0
- package/python3.4.2/lib/python3.4/test/test_datetime.py +48 -0
- package/python3.4.2/lib/python3.4/test/test_dbm.py +193 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_dumb.py +228 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_gnu.py +97 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_ndbm.py +54 -0
- package/python3.4.2/lib/python3.4/test/test_decimal.py +5504 -0
- package/python3.4.2/lib/python3.4/test/test_decorators.py +309 -0
- package/python3.4.2/lib/python3.4/test/test_defaultdict.py +190 -0
- package/python3.4.2/lib/python3.4/test/test_deque.py +817 -0
- package/python3.4.2/lib/python3.4/test/test_descr.py +5006 -0
- package/python3.4.2/lib/python3.4/test/test_descrtut.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_devpoll.py +146 -0
- package/python3.4.2/lib/python3.4/test/test_dict.py +928 -0
- package/python3.4.2/lib/python3.4/test/test_dictcomps.py +88 -0
- package/python3.4.2/lib/python3.4/test/test_dictviews.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_difflib.py +298 -0
- package/python3.4.2/lib/python3.4/test/test_difflib_expect.html +526 -0
- package/python3.4.2/lib/python3.4/test/test_dis.py +832 -0
- package/python3.4.2/lib/python3.4/test/test_distutils.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_doctest.py +2921 -0
- package/python3.4.2/lib/python3.4/test/test_doctest.txt +17 -0
- package/python3.4.2/lib/python3.4/test/test_doctest2.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_doctest2.txt +14 -0
- package/python3.4.2/lib/python3.4/test/test_doctest3.txt +5 -0
- package/python3.4.2/lib/python3.4/test/test_doctest4.txt +11 -0
- package/python3.4.2/lib/python3.4/test/test_docxmlrpc.py +219 -0
- package/python3.4.2/lib/python3.4/test/test_dummy_thread.py +182 -0
- package/python3.4.2/lib/python3.4/test/test_dummy_threading.py +64 -0
- package/python3.4.2/lib/python3.4/test/test_dynamic.py +143 -0
- package/python3.4.2/lib/python3.4/test/test_dynamicclassattribute.py +304 -0
- package/python3.4.2/lib/python3.4/test/test_email/__init__.py +159 -0
- package/python3.4.2/lib/python3.4/test/test_email/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/PyBanner048.gif +0 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/audiotest.au +0 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_01.txt +19 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_02.txt +136 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_03.txt +16 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_04.txt +37 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_05.txt +28 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_06.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_07.txt +83 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_08.txt +24 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_09.txt +24 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_10.txt +39 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_11.txt +7 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_12.txt +36 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_12a.txt +38 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_13.txt +94 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_14.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_15.txt +52 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_16.txt +123 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_17.txt +12 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_18.txt +6 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_19.txt +43 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_20.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_21.txt +20 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_22.txt +46 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_23.txt +8 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_24.txt +10 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_25.txt +117 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_26.txt +46 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_27.txt +15 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_28.txt +25 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_29.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_30.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_31.txt +15 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_32.txt +14 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_33.txt +29 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_34.txt +19 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_35.txt +4 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_36.txt +40 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_37.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_38.txt +101 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_39.txt +83 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_40.txt +10 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_41.txt +8 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_42.txt +20 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_43.txt +217 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_44.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_45.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_46.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/test__encoded_words.py +192 -0
- package/python3.4.2/lib/python3.4/test/test_email/test__header_value_parser.py +2606 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_asian_codecs.py +82 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_contentmanager.py +796 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_defect_handling.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_email.py +5289 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_generator.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_headerregistry.py +1594 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_inversion.py +49 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_message.py +783 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_parser.py +36 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_pickleable.py +74 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_policy.py +332 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_utils.py +140 -0
- package/python3.4.2/lib/python3.4/test/test_email/torture_test.py +136 -0
- package/python3.4.2/lib/python3.4/test/test_ensurepip.py +345 -0
- package/python3.4.2/lib/python3.4/test/test_enum.py +1592 -0
- package/python3.4.2/lib/python3.4/test/test_enumerate.py +272 -0
- package/python3.4.2/lib/python3.4/test/test_eof.py +31 -0
- package/python3.4.2/lib/python3.4/test/test_epoll.py +259 -0
- package/python3.4.2/lib/python3.4/test/test_errno.py +40 -0
- package/python3.4.2/lib/python3.4/test/test_exception_variations.py +180 -0
- package/python3.4.2/lib/python3.4/test/test_exceptions.py +978 -0
- package/python3.4.2/lib/python3.4/test/test_extcall.py +349 -0
- package/python3.4.2/lib/python3.4/test/test_faulthandler.py +623 -0
- package/python3.4.2/lib/python3.4/test/test_fcntl.py +152 -0
- package/python3.4.2/lib/python3.4/test/test_file.py +329 -0
- package/python3.4.2/lib/python3.4/test/test_file_eintr.py +236 -0
- package/python3.4.2/lib/python3.4/test/test_filecmp.py +217 -0
- package/python3.4.2/lib/python3.4/test/test_fileinput.py +891 -0
- package/python3.4.2/lib/python3.4/test/test_fileio.py +480 -0
- package/python3.4.2/lib/python3.4/test/test_finalization.py +522 -0
- package/python3.4.2/lib/python3.4/test/test_float.py +1312 -0
- package/python3.4.2/lib/python3.4/test/test_flufl.py +27 -0
- package/python3.4.2/lib/python3.4/test/test_fnmatch.py +89 -0
- package/python3.4.2/lib/python3.4/test/test_fork1.py +111 -0
- package/python3.4.2/lib/python3.4/test/test_format.py +362 -0
- package/python3.4.2/lib/python3.4/test/test_fractions.py +612 -0
- package/python3.4.2/lib/python3.4/test/test_frame.py +168 -0
- package/python3.4.2/lib/python3.4/test/test_ftplib.py +1080 -0
- package/python3.4.2/lib/python3.4/test/test_funcattrs.py +385 -0
- package/python3.4.2/lib/python3.4/test/test_functools.py +1584 -0
- package/python3.4.2/lib/python3.4/test/test_future.py +125 -0
- package/python3.4.2/lib/python3.4/test/test_future3.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_future4.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_future5.py +21 -0
- package/python3.4.2/lib/python3.4/test/test_gc.py +1013 -0
- package/python3.4.2/lib/python3.4/test/test_gdb.py +870 -0
- package/python3.4.2/lib/python3.4/test/test_generators.py +1940 -0
- package/python3.4.2/lib/python3.4/test/test_genericpath.py +439 -0
- package/python3.4.2/lib/python3.4/test/test_genexps.py +285 -0
- package/python3.4.2/lib/python3.4/test/test_getargs2.py +615 -0
- package/python3.4.2/lib/python3.4/test/test_getopt.py +187 -0
- package/python3.4.2/lib/python3.4/test/test_getpass.py +163 -0
- package/python3.4.2/lib/python3.4/test/test_gettext.py +467 -0
- package/python3.4.2/lib/python3.4/test/test_glob.py +200 -0
- package/python3.4.2/lib/python3.4/test/test_global.py +61 -0
- package/python3.4.2/lib/python3.4/test/test_grammar.py +1024 -0
- package/python3.4.2/lib/python3.4/test/test_grp.py +99 -0
- package/python3.4.2/lib/python3.4/test/test_gzip.py +561 -0
- package/python3.4.2/lib/python3.4/test/test_hash.py +346 -0
- package/python3.4.2/lib/python3.4/test/test_hashlib.py +533 -0
- package/python3.4.2/lib/python3.4/test/test_heapq.py +417 -0
- package/python3.4.2/lib/python3.4/test/test_hmac.py +506 -0
- package/python3.4.2/lib/python3.4/test/test_html.py +104 -0
- package/python3.4.2/lib/python3.4/test/test_htmlparser.py +832 -0
- package/python3.4.2/lib/python3.4/test/test_http_cookiejar.py +1714 -0
- package/python3.4.2/lib/python3.4/test/test_http_cookies.py +243 -0
- package/python3.4.2/lib/python3.4/test/test_httplib.py +1025 -0
- package/python3.4.2/lib/python3.4/test/test_httpservers.py +770 -0
- package/python3.4.2/lib/python3.4/test/test_idle.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_imaplib.py +504 -0
- package/python3.4.2/lib/python3.4/test/test_imghdr.py +131 -0
- package/python3.4.2/lib/python3.4/test/test_imp.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_import.py +1072 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/abc.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_finder.py +85 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_loader.py +106 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/util.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_case_sensitivity.py +51 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_finder.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_loader.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_path_hook.py +32 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/util.py +19 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_finder.py +80 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_loader.py +222 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___loader__.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___package__.py +133 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_api.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_caching.py +92 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_fromlist.py +129 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_meta_path.py +119 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_packages.py +110 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_path.py +144 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_relative_imports.py +216 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/util.py +20 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/missing_directory.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/nested_portion1.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion1/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion2/foo/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project1/parent/child/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project2/parent/child/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project3/parent/child/three.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/top_level_portion1.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/regrtest.py +17 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_case_sensitivity.py +83 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_file_loader.py +588 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_finder.py +232 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_path_hook.py +30 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_source_encoding.py +165 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/util.py +96 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_abc.py +951 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_api.py +437 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_locks.py +156 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_namespace_pkgs.py +293 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_spec.py +957 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_util.py +592 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_windows.py +29 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/util.py +225 -0
- package/python3.4.2/lib/python3.4/test/test_index.py +275 -0
- package/python3.4.2/lib/python3.4/test/test_inspect.py +3103 -0
- package/python3.4.2/lib/python3.4/test/test_int.py +458 -0
- package/python3.4.2/lib/python3.4/test/test_int_literal.py +147 -0
- package/python3.4.2/lib/python3.4/test/test_io.py +3481 -0
- package/python3.4.2/lib/python3.4/test/test_ioctl.py +91 -0
- package/python3.4.2/lib/python3.4/test/test_ipaddress.py +1693 -0
- package/python3.4.2/lib/python3.4/test/test_isinstance.py +289 -0
- package/python3.4.2/lib/python3.4/test/test_iter.py +927 -0
- package/python3.4.2/lib/python3.4/test/test_iterlen.py +229 -0
- package/python3.4.2/lib/python3.4/test/test_itertools.py +2142 -0
- package/python3.4.2/lib/python3.4/test/test_json/__init__.py +53 -0
- package/python3.4.2/lib/python3.4/test/test_json/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_decode.py +99 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_default.py +12 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_dump.py +49 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_encode_basestring_ascii.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_enum.py +120 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_fail.py +194 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_float.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_indent.py +67 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass1.py +75 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass2.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass3.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_recursion.py +100 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_scanstring.py +141 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_separators.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_speedups.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_tool.py +69 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_unicode.py +75 -0
- package/python3.4.2/lib/python3.4/test/test_keyword.py +138 -0
- package/python3.4.2/lib/python3.4/test/test_keywordonlyarg.py +193 -0
- package/python3.4.2/lib/python3.4/test/test_kqueue.py +219 -0
- package/python3.4.2/lib/python3.4/test/test_largefile.py +180 -0
- package/python3.4.2/lib/python3.4/test/test_lib2to3.py +22 -0
- package/python3.4.2/lib/python3.4/test/test_linecache.py +133 -0
- package/python3.4.2/lib/python3.4/test/test_list.py +125 -0
- package/python3.4.2/lib/python3.4/test/test_listcomps.py +148 -0
- package/python3.4.2/lib/python3.4/test/test_locale.py +528 -0
- package/python3.4.2/lib/python3.4/test/test_logging.py +4179 -0
- package/python3.4.2/lib/python3.4/test/test_long.py +1250 -0
- package/python3.4.2/lib/python3.4/test/test_longexp.py +14 -0
- package/python3.4.2/lib/python3.4/test/test_lzma.py +1592 -0
- package/python3.4.2/lib/python3.4/test/test_macpath.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_macurl2path.py +31 -0
- package/python3.4.2/lib/python3.4/test/test_mailbox.py +2287 -0
- package/python3.4.2/lib/python3.4/test/test_mailcap.py +221 -0
- package/python3.4.2/lib/python3.4/test/test_marshal.py +451 -0
- package/python3.4.2/lib/python3.4/test/test_math.py +1107 -0
- package/python3.4.2/lib/python3.4/test/test_memoryio.py +784 -0
- package/python3.4.2/lib/python3.4/test/test_memoryview.py +478 -0
- package/python3.4.2/lib/python3.4/test/test_metaclass.py +265 -0
- package/python3.4.2/lib/python3.4/test/test_mimetypes.py +111 -0
- package/python3.4.2/lib/python3.4/test/test_minidom.py +1545 -0
- package/python3.4.2/lib/python3.4/test/test_mmap.py +774 -0
- package/python3.4.2/lib/python3.4/test/test_module.py +222 -0
- package/python3.4.2/lib/python3.4/test/test_modulefinder.py +324 -0
- package/python3.4.2/lib/python3.4/test/test_msilib.py +46 -0
- package/python3.4.2/lib/python3.4/test/test_multibytecodec.py +263 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_fork.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_forkserver.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_main_handling.py +289 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_spawn.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_netrc.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_nis.py +43 -0
- package/python3.4.2/lib/python3.4/test/test_nntplib.py +1429 -0
- package/python3.4.2/lib/python3.4/test/test_normalization.py +104 -0
- package/python3.4.2/lib/python3.4/test/test_ntpath.py +385 -0
- package/python3.4.2/lib/python3.4/test/test_numeric_tower.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_opcodes.py +112 -0
- package/python3.4.2/lib/python3.4/test/test_openpty.py +25 -0
- package/python3.4.2/lib/python3.4/test/test_operator.py +484 -0
- package/python3.4.2/lib/python3.4/test/test_optparse.py +1657 -0
- package/python3.4.2/lib/python3.4/test/test_os.py +2550 -0
- package/python3.4.2/lib/python3.4/test/test_ossaudiodev.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_osx_env.py +34 -0
- package/python3.4.2/lib/python3.4/test/test_parser.py +745 -0
- package/python3.4.2/lib/python3.4/test/test_pathlib.py +1884 -0
- package/python3.4.2/lib/python3.4/test/test_pdb.py +1052 -0
- package/python3.4.2/lib/python3.4/test/test_peepholer.py +339 -0
- package/python3.4.2/lib/python3.4/test/test_pep247.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_pep277.py +201 -0
- package/python3.4.2/lib/python3.4/test/test_pep292.py +247 -0
- package/python3.4.2/lib/python3.4/test/test_pep3120.py +47 -0
- package/python3.4.2/lib/python3.4/test/test_pep3131.py +35 -0
- package/python3.4.2/lib/python3.4/test/test_pep3151.py +209 -0
- package/python3.4.2/lib/python3.4/test/test_pep352.py +184 -0
- package/python3.4.2/lib/python3.4/test/test_pep380.py +1023 -0
- package/python3.4.2/lib/python3.4/test/test_pickle.py +156 -0
- package/python3.4.2/lib/python3.4/test/test_pickletools.py +25 -0
- package/python3.4.2/lib/python3.4/test/test_pipes.py +196 -0
- package/python3.4.2/lib/python3.4/test/test_pkg.py +299 -0
- package/python3.4.2/lib/python3.4/test/test_pkgimport.py +84 -0
- package/python3.4.2/lib/python3.4/test/test_pkgutil.py +410 -0
- package/python3.4.2/lib/python3.4/test/test_platform.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_plistlib.py +526 -0
- package/python3.4.2/lib/python3.4/test/test_poll.py +215 -0
- package/python3.4.2/lib/python3.4/test/test_popen.py +64 -0
- package/python3.4.2/lib/python3.4/test/test_poplib.py +507 -0
- package/python3.4.2/lib/python3.4/test/test_posix.py +1183 -0
- package/python3.4.2/lib/python3.4/test/test_posixpath.py +544 -0
- package/python3.4.2/lib/python3.4/test/test_pow.py +129 -0
- package/python3.4.2/lib/python3.4/test/test_pprint.py +602 -0
- package/python3.4.2/lib/python3.4/test/test_print.py +132 -0
- package/python3.4.2/lib/python3.4/test/test_profile.py +187 -0
- package/python3.4.2/lib/python3.4/test/test_property.py +254 -0
- package/python3.4.2/lib/python3.4/test/test_pstats.py +45 -0
- package/python3.4.2/lib/python3.4/test/test_pty.py +302 -0
- package/python3.4.2/lib/python3.4/test/test_pulldom.py +347 -0
- package/python3.4.2/lib/python3.4/test/test_pwd.py +114 -0
- package/python3.4.2/lib/python3.4/test/test_py_compile.py +103 -0
- package/python3.4.2/lib/python3.4/test/test_pyclbr.py +181 -0
- package/python3.4.2/lib/python3.4/test/test_pydoc.py +1003 -0
- package/python3.4.2/lib/python3.4/test/test_pyexpat.py +708 -0
- package/python3.4.2/lib/python3.4/test/test_queue.py +363 -0
- package/python3.4.2/lib/python3.4/test/test_quopri.py +208 -0
- package/python3.4.2/lib/python3.4/test/test_raise.py +422 -0
- package/python3.4.2/lib/python3.4/test/test_random.py +759 -0
- package/python3.4.2/lib/python3.4/test/test_range.py +652 -0
- package/python3.4.2/lib/python3.4/test/test_re.py +1451 -0
- package/python3.4.2/lib/python3.4/test/test_readline.py +60 -0
- package/python3.4.2/lib/python3.4/test/test_regrtest.py +275 -0
- package/python3.4.2/lib/python3.4/test/test_reprlib.py +383 -0
- package/python3.4.2/lib/python3.4/test/test_resource.py +166 -0
- package/python3.4.2/lib/python3.4/test/test_richcmp.py +333 -0
- package/python3.4.2/lib/python3.4/test/test_rlcompleter.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_robotparser.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_runpy.py +691 -0
- package/python3.4.2/lib/python3.4/test/test_sax.py +1007 -0
- package/python3.4.2/lib/python3.4/test/test_sched.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_scope.py +764 -0
- package/python3.4.2/lib/python3.4/test/test_select.py +83 -0
- package/python3.4.2/lib/python3.4/test/test_selectors.py +453 -0
- package/python3.4.2/lib/python3.4/test/test_set.py +1839 -0
- package/python3.4.2/lib/python3.4/test/test_setcomps.py +151 -0
- package/python3.4.2/lib/python3.4/test/test_shelve.py +224 -0
- package/python3.4.2/lib/python3.4/test/test_shlex.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_shutil.py +1766 -0
- package/python3.4.2/lib/python3.4/test/test_signal.py +940 -0
- package/python3.4.2/lib/python3.4/test/test_site.py +468 -0
- package/python3.4.2/lib/python3.4/test/test_slice.py +247 -0
- package/python3.4.2/lib/python3.4/test/test_smtpd.py +557 -0
- package/python3.4.2/lib/python3.4/test/test_smtplib.py +950 -0
- package/python3.4.2/lib/python3.4/test/test_smtpnet.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_sndhdr.py +23 -0
- package/python3.4.2/lib/python3.4/test/test_socket.py +5163 -0
- package/python3.4.2/lib/python3.4/test/test_socketserver.py +314 -0
- package/python3.4.2/lib/python3.4/test/test_sort.py +285 -0
- package/python3.4.2/lib/python3.4/test/test_source_encoding.py +145 -0
- package/python3.4.2/lib/python3.4/test/test_spwd.py +60 -0
- package/python3.4.2/lib/python3.4/test/test_sqlite.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_ssl.py +2908 -0
- package/python3.4.2/lib/python3.4/test/test_startfile.py +37 -0
- package/python3.4.2/lib/python3.4/test/test_stat.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_statistics.py +1574 -0
- package/python3.4.2/lib/python3.4/test/test_strftime.py +204 -0
- package/python3.4.2/lib/python3.4/test/test_string.py +174 -0
- package/python3.4.2/lib/python3.4/test/test_stringprep.py +96 -0
- package/python3.4.2/lib/python3.4/test/test_strlit.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_strptime.py +577 -0
- package/python3.4.2/lib/python3.4/test/test_strtod.py +436 -0
- package/python3.4.2/lib/python3.4/test/test_struct.py +667 -0
- package/python3.4.2/lib/python3.4/test/test_structmembers.py +147 -0
- package/python3.4.2/lib/python3.4/test/test_structseq.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_subprocess.py +2474 -0
- package/python3.4.2/lib/python3.4/test/test_sunau.py +122 -0
- package/python3.4.2/lib/python3.4/test/test_sundry.py +59 -0
- package/python3.4.2/lib/python3.4/test/test_super.py +181 -0
- package/python3.4.2/lib/python3.4/test/test_support.py +315 -0
- package/python3.4.2/lib/python3.4/test/test_symtable.py +176 -0
- package/python3.4.2/lib/python3.4/test/test_syntax.py +593 -0
- package/python3.4.2/lib/python3.4/test/test_sys.py +1000 -0
- package/python3.4.2/lib/python3.4/test/test_sys_setprofile.py +386 -0
- package/python3.4.2/lib/python3.4/test/test_sys_settrace.py +834 -0
- package/python3.4.2/lib/python3.4/test/test_sysconfig.py +423 -0
- package/python3.4.2/lib/python3.4/test/test_syslog.py +43 -0
- package/python3.4.2/lib/python3.4/test/test_tarfile.py +2180 -0
- package/python3.4.2/lib/python3.4/test/test_tcl.py +642 -0
- package/python3.4.2/lib/python3.4/test/test_telnetlib.py +401 -0
- package/python3.4.2/lib/python3.4/test/test_tempfile.py +1248 -0
- package/python3.4.2/lib/python3.4/test/test_textwrap.py +929 -0
- package/python3.4.2/lib/python3.4/test/test_thread.py +260 -0
- package/python3.4.2/lib/python3.4/test/test_threaded_import.py +244 -0
- package/python3.4.2/lib/python3.4/test/test_threadedtempfile.py +78 -0
- package/python3.4.2/lib/python3.4/test/test_threading.py +1021 -0
- package/python3.4.2/lib/python3.4/test/test_threading_local.py +225 -0
- package/python3.4.2/lib/python3.4/test/test_threadsignals.py +227 -0
- package/python3.4.2/lib/python3.4/test/test_time.py +763 -0
- package/python3.4.2/lib/python3.4/test/test_timeit.py +306 -0
- package/python3.4.2/lib/python3.4/test/test_timeout.py +303 -0
- package/python3.4.2/lib/python3.4/test/test_tk.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_tokenize.py +1233 -0
- package/python3.4.2/lib/python3.4/test/test_trace.py +415 -0
- package/python3.4.2/lib/python3.4/test/test_traceback.py +451 -0
- package/python3.4.2/lib/python3.4/test/test_tracemalloc.py +826 -0
- package/python3.4.2/lib/python3.4/test/test_ttk_guionly.py +37 -0
- package/python3.4.2/lib/python3.4/test/test_ttk_textonly.py +17 -0
- package/python3.4.2/lib/python3.4/test/test_tuple.py +208 -0
- package/python3.4.2/lib/python3.4/test/test_typechecks.py +76 -0
- package/python3.4.2/lib/python3.4/test/test_types.py +1178 -0
- package/python3.4.2/lib/python3.4/test/test_ucn.py +240 -0
- package/python3.4.2/lib/python3.4/test/test_unary.py +58 -0
- package/python3.4.2/lib/python3.4/test/test_unicode.py +2596 -0
- package/python3.4.2/lib/python3.4/test/test_unicode_file.py +144 -0
- package/python3.4.2/lib/python3.4/test/test_unicodedata.py +323 -0
- package/python3.4.2/lib/python3.4/test/test_unittest.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_univnewlines.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_unpack.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_unpack_ex.py +174 -0
- package/python3.4.2/lib/python3.4/test/test_urllib.py +1486 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2.py +1646 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2_localnet.py +690 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2net.py +342 -0
- package/python3.4.2/lib/python3.4/test/test_urllib_response.py +59 -0
- package/python3.4.2/lib/python3.4/test/test_urllibnet.py +212 -0
- package/python3.4.2/lib/python3.4/test/test_urlparse.py +879 -0
- package/python3.4.2/lib/python3.4/test/test_userdict.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_userlist.py +65 -0
- package/python3.4.2/lib/python3.4/test/test_userstring.py +47 -0
- package/python3.4.2/lib/python3.4/test/test_uu.py +239 -0
- package/python3.4.2/lib/python3.4/test/test_uuid.py +498 -0
- package/python3.4.2/lib/python3.4/test/test_venv.py +406 -0
- package/python3.4.2/lib/python3.4/test/test_wait3.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_wait4.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_warnings.py +873 -0
- package/python3.4.2/lib/python3.4/test/test_wave.py +107 -0
- package/python3.4.2/lib/python3.4/test/test_weakref.py +1801 -0
- package/python3.4.2/lib/python3.4/test/test_weakset.py +450 -0
- package/python3.4.2/lib/python3.4/test/test_webbrowser.py +192 -0
- package/python3.4.2/lib/python3.4/test/test_winreg.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_winsound.py +253 -0
- package/python3.4.2/lib/python3.4/test/test_with.py +750 -0
- package/python3.4.2/lib/python3.4/test/test_wsgiref.py +640 -0
- package/python3.4.2/lib/python3.4/test/test_xdrlib.py +58 -0
- package/python3.4.2/lib/python3.4/test/test_xml_dom_minicompat.py +101 -0
- package/python3.4.2/lib/python3.4/test/test_xml_etree.py +2587 -0
- package/python3.4.2/lib/python3.4/test/test_xml_etree_c.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_xmlrpc.py +1114 -0
- package/python3.4.2/lib/python3.4/test/test_xmlrpc_net.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_zipfile.py +1783 -0
- package/python3.4.2/lib/python3.4/test/test_zipfile64.py +118 -0
- package/python3.4.2/lib/python3.4/test/test_zipimport.py +507 -0
- package/python3.4.2/lib/python3.4/test/test_zipimport_support.py +246 -0
- package/python3.4.2/lib/python3.4/test/test_zlib.py +725 -0
- package/python3.4.2/lib/python3.4/test/testcodec.py +48 -0
- package/python3.4.2/lib/python3.4/test/testtar.tar +0 -0
- package/python3.4.2/lib/python3.4/test/tf_inherit_check.py +25 -0
- package/python3.4.2/lib/python3.4/test/threaded_import_hangers.py +45 -0
- package/python3.4.2/lib/python3.4/test/time_hashlib.py +87 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt +13 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt +11 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt +13 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt +12 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests.txt +189 -0
- package/python3.4.2/lib/python3.4/test/tracedmodules/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/test/tracedmodules/testmod.py +9 -0
- package/python3.4.2/lib/python3.4/test/warning_tests.py +9 -0
- package/python3.4.2/lib/python3.4/test/win_console_handler.py +49 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/simple-ns.xml +7 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/simple.xml +6 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml +115 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml.out +115 -0
- package/python3.4.2/lib/python3.4/test/xmltests.py +21 -0
- package/python3.4.2/lib/python3.4/test/zip_cp437_header.zip +0 -0
- package/python3.4.2/lib/python3.4/test/zipdir.zip +0 -0
- package/python3.4.2/lib/python3.4/textwrap.py +470 -0
- package/python3.4.2/lib/python3.4/this.py +28 -0
- package/python3.4.2/lib/python3.4/threading.py +1359 -0
- package/python3.4.2/lib/python3.4/timeit.py +322 -0
- package/python3.4.2/lib/python3.4/tkinter/__init__.py +3898 -0
- package/python3.4.2/lib/python3.4/tkinter/__main__.py +7 -0
- package/python3.4.2/lib/python3.4/tkinter/_fix.py +78 -0
- package/python3.4.2/lib/python3.4/tkinter/colorchooser.py +72 -0
- package/python3.4.2/lib/python3.4/tkinter/commondialog.py +60 -0
- package/python3.4.2/lib/python3.4/tkinter/constants.py +110 -0
- package/python3.4.2/lib/python3.4/tkinter/dialog.py +49 -0
- package/python3.4.2/lib/python3.4/tkinter/dnd.py +321 -0
- package/python3.4.2/lib/python3.4/tkinter/filedialog.py +479 -0
- package/python3.4.2/lib/python3.4/tkinter/font.py +234 -0
- package/python3.4.2/lib/python3.4/tkinter/messagebox.py +134 -0
- package/python3.4.2/lib/python3.4/tkinter/scrolledtext.py +54 -0
- package/python3.4.2/lib/python3.4/tkinter/simpledialog.py +423 -0
- package/python3.4.2/lib/python3.4/tkinter/test/README +14 -0
- package/python3.4.2/lib/python3.4/tkinter/test/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/runtktests.py +71 -0
- package/python3.4.2/lib/python3.4/tkinter/test/support.py +104 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_font.py +27 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py +900 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_images.py +327 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_loadtk.py +46 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_misc.py +42 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_text.py +47 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_variables.py +186 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py +1193 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_extensions.py +291 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_functions.py +462 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_style.py +92 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_widgets.py +1598 -0
- package/python3.4.2/lib/python3.4/tkinter/test/widget_tests.py +521 -0
- package/python3.4.2/lib/python3.4/tkinter/tix.py +1944 -0
- package/python3.4.2/lib/python3.4/tkinter/ttk.py +1616 -0
- package/python3.4.2/lib/python3.4/token.py +140 -0
- package/python3.4.2/lib/python3.4/tokenize.py +691 -0
- package/python3.4.2/lib/python3.4/trace.py +858 -0
- package/python3.4.2/lib/python3.4/traceback.py +313 -0
- package/python3.4.2/lib/python3.4/tracemalloc.py +487 -0
- package/python3.4.2/lib/python3.4/tty.py +36 -0
- package/python3.4.2/lib/python3.4/turtle.py +4140 -0
- package/python3.4.2/lib/python3.4/turtledemo/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/turtledemo/__main__.py +380 -0
- package/python3.4.2/lib/python3.4/turtledemo/bytedesign.py +162 -0
- package/python3.4.2/lib/python3.4/turtledemo/chaos.py +59 -0
- package/python3.4.2/lib/python3.4/turtledemo/clock.py +132 -0
- package/python3.4.2/lib/python3.4/turtledemo/colormixer.py +58 -0
- package/python3.4.2/lib/python3.4/turtledemo/forest.py +108 -0
- package/python3.4.2/lib/python3.4/turtledemo/fractalcurves.py +138 -0
- package/python3.4.2/lib/python3.4/turtledemo/lindenmayer.py +119 -0
- package/python3.4.2/lib/python3.4/turtledemo/minimal_hanoi.py +79 -0
- package/python3.4.2/lib/python3.4/turtledemo/nim.py +226 -0
- package/python3.4.2/lib/python3.4/turtledemo/paint.py +54 -0
- package/python3.4.2/lib/python3.4/turtledemo/peace.py +61 -0
- package/python3.4.2/lib/python3.4/turtledemo/penrose.py +181 -0
- package/python3.4.2/lib/python3.4/turtledemo/planet_and_moon.py +112 -0
- package/python3.4.2/lib/python3.4/turtledemo/round_dance.py +86 -0
- package/python3.4.2/lib/python3.4/turtledemo/tree.py +63 -0
- package/python3.4.2/lib/python3.4/turtledemo/turtle.cfg +10 -0
- package/python3.4.2/lib/python3.4/turtledemo/two_canvases.py +54 -0
- package/python3.4.2/lib/python3.4/turtledemo/wikipedia.py +65 -0
- package/python3.4.2/lib/python3.4/turtledemo/yinyang.py +49 -0
- package/python3.4.2/lib/python3.4/types.py +158 -0
- package/python3.4.2/lib/python3.4/unittest/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/unittest/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/case.py +1400 -0
- package/python3.4.2/lib/python3.4/unittest/loader.py +379 -0
- package/python3.4.2/lib/python3.4/unittest/main.py +248 -0
- package/python3.4.2/lib/python3.4/unittest/mock.py +2330 -0
- package/python3.4.2/lib/python3.4/unittest/result.py +212 -0
- package/python3.4.2/lib/python3.4/unittest/runner.py +213 -0
- package/python3.4.2/lib/python3.4/unittest/signals.py +71 -0
- package/python3.4.2/lib/python3.4/unittest/suite.py +324 -0
- package/python3.4.2/lib/python3.4/unittest/test/__init__.py +22 -0
- package/python3.4.2/lib/python3.4/unittest/test/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/test/_test_warnings.py +73 -0
- package/python3.4.2/lib/python3.4/unittest/test/dummy.py +1 -0
- package/python3.4.2/lib/python3.4/unittest/test/support.py +142 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_assertions.py +398 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_break.py +288 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_case.py +1574 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_discovery.py +527 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_functiontestcase.py +148 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_loader.py +1312 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_program.py +396 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_result.py +660 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_runner.py +346 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_setups.py +506 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_skipping.py +227 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_suite.py +447 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/support.py +23 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testcallable.py +151 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testhelpers.py +908 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testmagicmethods.py +428 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testmock.py +1412 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testpatch.py +1801 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testsentinel.py +28 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testwith.py +259 -0
- package/python3.4.2/lib/python3.4/unittest/util.py +177 -0
- package/python3.4.2/lib/python3.4/urllib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/urllib/error.py +76 -0
- package/python3.4.2/lib/python3.4/urllib/parse.py +973 -0
- package/python3.4.2/lib/python3.4/urllib/request.py +2559 -0
- package/python3.4.2/lib/python3.4/urllib/response.py +76 -0
- package/python3.4.2/lib/python3.4/urllib/robotparser.py +212 -0
- package/python3.4.2/lib/python3.4/uu.py +199 -0
- package/python3.4.2/lib/python3.4/uuid.py +591 -0
- package/python3.4.2/lib/python3.4/venv/__init__.py +449 -0
- package/python3.4.2/lib/python3.4/venv/__main__.py +10 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate +76 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.csh +37 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.fish +74 -0
- package/python3.4.2/lib/python3.4/warnings.py +407 -0
- package/python3.4.2/lib/python3.4/wave.py +503 -0
- package/python3.4.2/lib/python3.4/weakref.py +577 -0
- package/python3.4.2/lib/python3.4/webbrowser.py +651 -0
- package/python3.4.2/lib/python3.4/wsgiref/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/wsgiref/handlers.py +547 -0
- package/python3.4.2/lib/python3.4/wsgiref/headers.py +184 -0
- package/python3.4.2/lib/python3.4/wsgiref/simple_server.py +165 -0
- package/python3.4.2/lib/python3.4/wsgiref/util.py +165 -0
- package/python3.4.2/lib/python3.4/wsgiref/validate.py +443 -0
- package/python3.4.2/lib/python3.4/xdrlib.py +224 -0
- package/python3.4.2/lib/python3.4/xml/__init__.py +20 -0
- package/python3.4.2/lib/python3.4/xml/dom/NodeFilter.py +27 -0
- package/python3.4.2/lib/python3.4/xml/dom/__init__.py +140 -0
- package/python3.4.2/lib/python3.4/xml/dom/domreg.py +97 -0
- package/python3.4.2/lib/python3.4/xml/dom/expatbuilder.py +965 -0
- package/python3.4.2/lib/python3.4/xml/dom/minicompat.py +109 -0
- package/python3.4.2/lib/python3.4/xml/dom/minidom.py +1983 -0
- package/python3.4.2/lib/python3.4/xml/dom/pulldom.py +342 -0
- package/python3.4.2/lib/python3.4/xml/dom/xmlbuilder.py +386 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementInclude.py +143 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementPath.py +308 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementTree.py +1667 -0
- package/python3.4.2/lib/python3.4/xml/etree/__init__.py +33 -0
- package/python3.4.2/lib/python3.4/xml/etree/cElementTree.py +3 -0
- package/python3.4.2/lib/python3.4/xml/parsers/__init__.py +8 -0
- package/python3.4.2/lib/python3.4/xml/parsers/expat.py +8 -0
- package/python3.4.2/lib/python3.4/xml/sax/__init__.py +105 -0
- package/python3.4.2/lib/python3.4/xml/sax/_exceptions.py +131 -0
- package/python3.4.2/lib/python3.4/xml/sax/expatreader.py +417 -0
- package/python3.4.2/lib/python3.4/xml/sax/handler.py +342 -0
- package/python3.4.2/lib/python3.4/xml/sax/saxutils.py +365 -0
- package/python3.4.2/lib/python3.4/xml/sax/xmlreader.py +378 -0
- package/python3.4.2/lib/python3.4/xmlrpc/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/xmlrpc/client.py +1479 -0
- package/python3.4.2/lib/python3.4/xmlrpc/server.py +986 -0
- package/python3.4.2/lib/python3.4/zipfile.py +1788 -0
- package/python3.4.2/share/man/man1/python3.1 +460 -0
- package/python3.4.2/share/man/man1/python3.4.1 +460 -0
|
@@ -0,0 +1,4687 @@
|
|
|
1
|
+
""" Test suite for the fixer modules """
|
|
2
|
+
|
|
3
|
+
# Python imports
|
|
4
|
+
import os
|
|
5
|
+
import unittest
|
|
6
|
+
from itertools import chain
|
|
7
|
+
from operator import itemgetter
|
|
8
|
+
|
|
9
|
+
# Local imports
|
|
10
|
+
from lib2to3 import pygram, pytree, refactor, fixer_util
|
|
11
|
+
from lib2to3.tests import support
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class FixerTestCase(support.TestCase):
|
|
15
|
+
|
|
16
|
+
# Other test cases can subclass this class and replace "fixer_pkg" with
|
|
17
|
+
# their own.
|
|
18
|
+
def setUp(self, fix_list=None, fixer_pkg="lib2to3", options=None):
|
|
19
|
+
if fix_list is None:
|
|
20
|
+
fix_list = [self.fixer]
|
|
21
|
+
self.refactor = support.get_refactorer(fixer_pkg, fix_list, options)
|
|
22
|
+
self.fixer_log = []
|
|
23
|
+
self.filename = "<string>"
|
|
24
|
+
|
|
25
|
+
for fixer in chain(self.refactor.pre_order,
|
|
26
|
+
self.refactor.post_order):
|
|
27
|
+
fixer.log = self.fixer_log
|
|
28
|
+
|
|
29
|
+
def _check(self, before, after):
|
|
30
|
+
before = support.reformat(before)
|
|
31
|
+
after = support.reformat(after)
|
|
32
|
+
tree = self.refactor.refactor_string(before, self.filename)
|
|
33
|
+
self.assertEqual(after, str(tree))
|
|
34
|
+
return tree
|
|
35
|
+
|
|
36
|
+
def check(self, before, after, ignore_warnings=False):
|
|
37
|
+
tree = self._check(before, after)
|
|
38
|
+
self.assertTrue(tree.was_changed)
|
|
39
|
+
if not ignore_warnings:
|
|
40
|
+
self.assertEqual(self.fixer_log, [])
|
|
41
|
+
|
|
42
|
+
def warns(self, before, after, message, unchanged=False):
|
|
43
|
+
tree = self._check(before, after)
|
|
44
|
+
self.assertIn(message, "".join(self.fixer_log))
|
|
45
|
+
if not unchanged:
|
|
46
|
+
self.assertTrue(tree.was_changed)
|
|
47
|
+
|
|
48
|
+
def warns_unchanged(self, before, message):
|
|
49
|
+
self.warns(before, before, message, unchanged=True)
|
|
50
|
+
|
|
51
|
+
def unchanged(self, before, ignore_warnings=False):
|
|
52
|
+
self._check(before, before)
|
|
53
|
+
if not ignore_warnings:
|
|
54
|
+
self.assertEqual(self.fixer_log, [])
|
|
55
|
+
|
|
56
|
+
def assert_runs_after(self, *names):
|
|
57
|
+
fixes = [self.fixer]
|
|
58
|
+
fixes.extend(names)
|
|
59
|
+
r = support.get_refactorer("lib2to3", fixes)
|
|
60
|
+
(pre, post) = r.get_fixers()
|
|
61
|
+
n = "fix_" + self.fixer
|
|
62
|
+
if post and post[-1].__class__.__module__.endswith(n):
|
|
63
|
+
# We're the last fixer to run
|
|
64
|
+
return
|
|
65
|
+
if pre and pre[-1].__class__.__module__.endswith(n) and not post:
|
|
66
|
+
# We're the last in pre and post is empty
|
|
67
|
+
return
|
|
68
|
+
self.fail("Fixer run order (%s) is incorrect; %s should be last."\
|
|
69
|
+
%(", ".join([x.__class__.__module__ for x in (pre+post)]), n))
|
|
70
|
+
|
|
71
|
+
class Test_ne(FixerTestCase):
|
|
72
|
+
fixer = "ne"
|
|
73
|
+
|
|
74
|
+
def test_basic(self):
|
|
75
|
+
b = """if x <> y:
|
|
76
|
+
pass"""
|
|
77
|
+
|
|
78
|
+
a = """if x != y:
|
|
79
|
+
pass"""
|
|
80
|
+
self.check(b, a)
|
|
81
|
+
|
|
82
|
+
def test_no_spaces(self):
|
|
83
|
+
b = """if x<>y:
|
|
84
|
+
pass"""
|
|
85
|
+
|
|
86
|
+
a = """if x!=y:
|
|
87
|
+
pass"""
|
|
88
|
+
self.check(b, a)
|
|
89
|
+
|
|
90
|
+
def test_chained(self):
|
|
91
|
+
b = """if x<>y<>z:
|
|
92
|
+
pass"""
|
|
93
|
+
|
|
94
|
+
a = """if x!=y!=z:
|
|
95
|
+
pass"""
|
|
96
|
+
self.check(b, a)
|
|
97
|
+
|
|
98
|
+
class Test_has_key(FixerTestCase):
|
|
99
|
+
fixer = "has_key"
|
|
100
|
+
|
|
101
|
+
def test_1(self):
|
|
102
|
+
b = """x = d.has_key("x") or d.has_key("y")"""
|
|
103
|
+
a = """x = "x" in d or "y" in d"""
|
|
104
|
+
self.check(b, a)
|
|
105
|
+
|
|
106
|
+
def test_2(self):
|
|
107
|
+
b = """x = a.b.c.d.has_key("x") ** 3"""
|
|
108
|
+
a = """x = ("x" in a.b.c.d) ** 3"""
|
|
109
|
+
self.check(b, a)
|
|
110
|
+
|
|
111
|
+
def test_3(self):
|
|
112
|
+
b = """x = a.b.has_key(1 + 2).__repr__()"""
|
|
113
|
+
a = """x = (1 + 2 in a.b).__repr__()"""
|
|
114
|
+
self.check(b, a)
|
|
115
|
+
|
|
116
|
+
def test_4(self):
|
|
117
|
+
b = """x = a.b.has_key(1 + 2).__repr__() ** -3 ** 4"""
|
|
118
|
+
a = """x = (1 + 2 in a.b).__repr__() ** -3 ** 4"""
|
|
119
|
+
self.check(b, a)
|
|
120
|
+
|
|
121
|
+
def test_5(self):
|
|
122
|
+
b = """x = a.has_key(f or g)"""
|
|
123
|
+
a = """x = (f or g) in a"""
|
|
124
|
+
self.check(b, a)
|
|
125
|
+
|
|
126
|
+
def test_6(self):
|
|
127
|
+
b = """x = a + b.has_key(c)"""
|
|
128
|
+
a = """x = a + (c in b)"""
|
|
129
|
+
self.check(b, a)
|
|
130
|
+
|
|
131
|
+
def test_7(self):
|
|
132
|
+
b = """x = a.has_key(lambda: 12)"""
|
|
133
|
+
a = """x = (lambda: 12) in a"""
|
|
134
|
+
self.check(b, a)
|
|
135
|
+
|
|
136
|
+
def test_8(self):
|
|
137
|
+
b = """x = a.has_key(a for a in b)"""
|
|
138
|
+
a = """x = (a for a in b) in a"""
|
|
139
|
+
self.check(b, a)
|
|
140
|
+
|
|
141
|
+
def test_9(self):
|
|
142
|
+
b = """if not a.has_key(b): pass"""
|
|
143
|
+
a = """if b not in a: pass"""
|
|
144
|
+
self.check(b, a)
|
|
145
|
+
|
|
146
|
+
def test_10(self):
|
|
147
|
+
b = """if not a.has_key(b).__repr__(): pass"""
|
|
148
|
+
a = """if not (b in a).__repr__(): pass"""
|
|
149
|
+
self.check(b, a)
|
|
150
|
+
|
|
151
|
+
def test_11(self):
|
|
152
|
+
b = """if not a.has_key(b) ** 2: pass"""
|
|
153
|
+
a = """if not (b in a) ** 2: pass"""
|
|
154
|
+
self.check(b, a)
|
|
155
|
+
|
|
156
|
+
class Test_apply(FixerTestCase):
|
|
157
|
+
fixer = "apply"
|
|
158
|
+
|
|
159
|
+
def test_1(self):
|
|
160
|
+
b = """x = apply(f, g + h)"""
|
|
161
|
+
a = """x = f(*g + h)"""
|
|
162
|
+
self.check(b, a)
|
|
163
|
+
|
|
164
|
+
def test_2(self):
|
|
165
|
+
b = """y = apply(f, g, h)"""
|
|
166
|
+
a = """y = f(*g, **h)"""
|
|
167
|
+
self.check(b, a)
|
|
168
|
+
|
|
169
|
+
def test_3(self):
|
|
170
|
+
b = """z = apply(fs[0], g or h, h or g)"""
|
|
171
|
+
a = """z = fs[0](*g or h, **h or g)"""
|
|
172
|
+
self.check(b, a)
|
|
173
|
+
|
|
174
|
+
def test_4(self):
|
|
175
|
+
b = """apply(f, (x, y) + t)"""
|
|
176
|
+
a = """f(*(x, y) + t)"""
|
|
177
|
+
self.check(b, a)
|
|
178
|
+
|
|
179
|
+
def test_5(self):
|
|
180
|
+
b = """apply(f, args,)"""
|
|
181
|
+
a = """f(*args)"""
|
|
182
|
+
self.check(b, a)
|
|
183
|
+
|
|
184
|
+
def test_6(self):
|
|
185
|
+
b = """apply(f, args, kwds,)"""
|
|
186
|
+
a = """f(*args, **kwds)"""
|
|
187
|
+
self.check(b, a)
|
|
188
|
+
|
|
189
|
+
# Test that complex functions are parenthesized
|
|
190
|
+
|
|
191
|
+
def test_complex_1(self):
|
|
192
|
+
b = """x = apply(f+g, args)"""
|
|
193
|
+
a = """x = (f+g)(*args)"""
|
|
194
|
+
self.check(b, a)
|
|
195
|
+
|
|
196
|
+
def test_complex_2(self):
|
|
197
|
+
b = """x = apply(f*g, args)"""
|
|
198
|
+
a = """x = (f*g)(*args)"""
|
|
199
|
+
self.check(b, a)
|
|
200
|
+
|
|
201
|
+
def test_complex_3(self):
|
|
202
|
+
b = """x = apply(f**g, args)"""
|
|
203
|
+
a = """x = (f**g)(*args)"""
|
|
204
|
+
self.check(b, a)
|
|
205
|
+
|
|
206
|
+
# But dotted names etc. not
|
|
207
|
+
|
|
208
|
+
def test_dotted_name(self):
|
|
209
|
+
b = """x = apply(f.g, args)"""
|
|
210
|
+
a = """x = f.g(*args)"""
|
|
211
|
+
self.check(b, a)
|
|
212
|
+
|
|
213
|
+
def test_subscript(self):
|
|
214
|
+
b = """x = apply(f[x], args)"""
|
|
215
|
+
a = """x = f[x](*args)"""
|
|
216
|
+
self.check(b, a)
|
|
217
|
+
|
|
218
|
+
def test_call(self):
|
|
219
|
+
b = """x = apply(f(), args)"""
|
|
220
|
+
a = """x = f()(*args)"""
|
|
221
|
+
self.check(b, a)
|
|
222
|
+
|
|
223
|
+
# Extreme case
|
|
224
|
+
def test_extreme(self):
|
|
225
|
+
b = """x = apply(a.b.c.d.e.f, args, kwds)"""
|
|
226
|
+
a = """x = a.b.c.d.e.f(*args, **kwds)"""
|
|
227
|
+
self.check(b, a)
|
|
228
|
+
|
|
229
|
+
# XXX Comments in weird places still get lost
|
|
230
|
+
def test_weird_comments(self):
|
|
231
|
+
b = """apply( # foo
|
|
232
|
+
f, # bar
|
|
233
|
+
args)"""
|
|
234
|
+
a = """f(*args)"""
|
|
235
|
+
self.check(b, a)
|
|
236
|
+
|
|
237
|
+
# These should *not* be touched
|
|
238
|
+
|
|
239
|
+
def test_unchanged_1(self):
|
|
240
|
+
s = """apply()"""
|
|
241
|
+
self.unchanged(s)
|
|
242
|
+
|
|
243
|
+
def test_unchanged_2(self):
|
|
244
|
+
s = """apply(f)"""
|
|
245
|
+
self.unchanged(s)
|
|
246
|
+
|
|
247
|
+
def test_unchanged_3(self):
|
|
248
|
+
s = """apply(f,)"""
|
|
249
|
+
self.unchanged(s)
|
|
250
|
+
|
|
251
|
+
def test_unchanged_4(self):
|
|
252
|
+
s = """apply(f, args, kwds, extras)"""
|
|
253
|
+
self.unchanged(s)
|
|
254
|
+
|
|
255
|
+
def test_unchanged_5(self):
|
|
256
|
+
s = """apply(f, *args, **kwds)"""
|
|
257
|
+
self.unchanged(s)
|
|
258
|
+
|
|
259
|
+
def test_unchanged_6(self):
|
|
260
|
+
s = """apply(f, *args)"""
|
|
261
|
+
self.unchanged(s)
|
|
262
|
+
|
|
263
|
+
def test_unchanged_7(self):
|
|
264
|
+
s = """apply(func=f, args=args, kwds=kwds)"""
|
|
265
|
+
self.unchanged(s)
|
|
266
|
+
|
|
267
|
+
def test_unchanged_8(self):
|
|
268
|
+
s = """apply(f, args=args, kwds=kwds)"""
|
|
269
|
+
self.unchanged(s)
|
|
270
|
+
|
|
271
|
+
def test_unchanged_9(self):
|
|
272
|
+
s = """apply(f, args, kwds=kwds)"""
|
|
273
|
+
self.unchanged(s)
|
|
274
|
+
|
|
275
|
+
def test_space_1(self):
|
|
276
|
+
a = """apply( f, args, kwds)"""
|
|
277
|
+
b = """f(*args, **kwds)"""
|
|
278
|
+
self.check(a, b)
|
|
279
|
+
|
|
280
|
+
def test_space_2(self):
|
|
281
|
+
a = """apply( f ,args,kwds )"""
|
|
282
|
+
b = """f(*args, **kwds)"""
|
|
283
|
+
self.check(a, b)
|
|
284
|
+
|
|
285
|
+
class Test_reload(FixerTestCase):
|
|
286
|
+
fixer = "reload"
|
|
287
|
+
|
|
288
|
+
def test(self):
|
|
289
|
+
b = """reload(a)"""
|
|
290
|
+
a = """import imp\nimp.reload(a)"""
|
|
291
|
+
self.check(b, a)
|
|
292
|
+
|
|
293
|
+
def test_comment(self):
|
|
294
|
+
b = """reload( a ) # comment"""
|
|
295
|
+
a = """import imp\nimp.reload( a ) # comment"""
|
|
296
|
+
self.check(b, a)
|
|
297
|
+
|
|
298
|
+
# PEP 8 comments
|
|
299
|
+
b = """reload( a ) # comment"""
|
|
300
|
+
a = """import imp\nimp.reload( a ) # comment"""
|
|
301
|
+
self.check(b, a)
|
|
302
|
+
|
|
303
|
+
def test_space(self):
|
|
304
|
+
b = """reload( a )"""
|
|
305
|
+
a = """import imp\nimp.reload( a )"""
|
|
306
|
+
self.check(b, a)
|
|
307
|
+
|
|
308
|
+
b = """reload( a)"""
|
|
309
|
+
a = """import imp\nimp.reload( a)"""
|
|
310
|
+
self.check(b, a)
|
|
311
|
+
|
|
312
|
+
b = """reload(a )"""
|
|
313
|
+
a = """import imp\nimp.reload(a )"""
|
|
314
|
+
self.check(b, a)
|
|
315
|
+
|
|
316
|
+
def test_unchanged(self):
|
|
317
|
+
s = """reload(a=1)"""
|
|
318
|
+
self.unchanged(s)
|
|
319
|
+
|
|
320
|
+
s = """reload(f, g)"""
|
|
321
|
+
self.unchanged(s)
|
|
322
|
+
|
|
323
|
+
s = """reload(f, *h)"""
|
|
324
|
+
self.unchanged(s)
|
|
325
|
+
|
|
326
|
+
s = """reload(f, *h, **i)"""
|
|
327
|
+
self.unchanged(s)
|
|
328
|
+
|
|
329
|
+
s = """reload(f, **i)"""
|
|
330
|
+
self.unchanged(s)
|
|
331
|
+
|
|
332
|
+
s = """reload(*h, **i)"""
|
|
333
|
+
self.unchanged(s)
|
|
334
|
+
|
|
335
|
+
s = """reload(*h)"""
|
|
336
|
+
self.unchanged(s)
|
|
337
|
+
|
|
338
|
+
s = """reload(**i)"""
|
|
339
|
+
self.unchanged(s)
|
|
340
|
+
|
|
341
|
+
s = """reload()"""
|
|
342
|
+
self.unchanged(s)
|
|
343
|
+
|
|
344
|
+
class Test_intern(FixerTestCase):
|
|
345
|
+
fixer = "intern"
|
|
346
|
+
|
|
347
|
+
def test_prefix_preservation(self):
|
|
348
|
+
b = """x = intern( a )"""
|
|
349
|
+
a = """import sys\nx = sys.intern( a )"""
|
|
350
|
+
self.check(b, a)
|
|
351
|
+
|
|
352
|
+
b = """y = intern("b" # test
|
|
353
|
+
)"""
|
|
354
|
+
a = """import sys\ny = sys.intern("b" # test
|
|
355
|
+
)"""
|
|
356
|
+
self.check(b, a)
|
|
357
|
+
|
|
358
|
+
b = """z = intern(a+b+c.d, )"""
|
|
359
|
+
a = """import sys\nz = sys.intern(a+b+c.d, )"""
|
|
360
|
+
self.check(b, a)
|
|
361
|
+
|
|
362
|
+
def test(self):
|
|
363
|
+
b = """x = intern(a)"""
|
|
364
|
+
a = """import sys\nx = sys.intern(a)"""
|
|
365
|
+
self.check(b, a)
|
|
366
|
+
|
|
367
|
+
b = """z = intern(a+b+c.d,)"""
|
|
368
|
+
a = """import sys\nz = sys.intern(a+b+c.d,)"""
|
|
369
|
+
self.check(b, a)
|
|
370
|
+
|
|
371
|
+
b = """intern("y%s" % 5).replace("y", "")"""
|
|
372
|
+
a = """import sys\nsys.intern("y%s" % 5).replace("y", "")"""
|
|
373
|
+
self.check(b, a)
|
|
374
|
+
|
|
375
|
+
# These should not be refactored
|
|
376
|
+
|
|
377
|
+
def test_unchanged(self):
|
|
378
|
+
s = """intern(a=1)"""
|
|
379
|
+
self.unchanged(s)
|
|
380
|
+
|
|
381
|
+
s = """intern(f, g)"""
|
|
382
|
+
self.unchanged(s)
|
|
383
|
+
|
|
384
|
+
s = """intern(*h)"""
|
|
385
|
+
self.unchanged(s)
|
|
386
|
+
|
|
387
|
+
s = """intern(**i)"""
|
|
388
|
+
self.unchanged(s)
|
|
389
|
+
|
|
390
|
+
s = """intern()"""
|
|
391
|
+
self.unchanged(s)
|
|
392
|
+
|
|
393
|
+
class Test_reduce(FixerTestCase):
|
|
394
|
+
fixer = "reduce"
|
|
395
|
+
|
|
396
|
+
def test_simple_call(self):
|
|
397
|
+
b = "reduce(a, b, c)"
|
|
398
|
+
a = "from functools import reduce\nreduce(a, b, c)"
|
|
399
|
+
self.check(b, a)
|
|
400
|
+
|
|
401
|
+
def test_bug_7253(self):
|
|
402
|
+
# fix_tuple_params was being bad and orphaning nodes in the tree.
|
|
403
|
+
b = "def x(arg): reduce(sum, [])"
|
|
404
|
+
a = "from functools import reduce\ndef x(arg): reduce(sum, [])"
|
|
405
|
+
self.check(b, a)
|
|
406
|
+
|
|
407
|
+
def test_call_with_lambda(self):
|
|
408
|
+
b = "reduce(lambda x, y: x + y, seq)"
|
|
409
|
+
a = "from functools import reduce\nreduce(lambda x, y: x + y, seq)"
|
|
410
|
+
self.check(b, a)
|
|
411
|
+
|
|
412
|
+
def test_unchanged(self):
|
|
413
|
+
s = "reduce(a)"
|
|
414
|
+
self.unchanged(s)
|
|
415
|
+
|
|
416
|
+
s = "reduce(a, b=42)"
|
|
417
|
+
self.unchanged(s)
|
|
418
|
+
|
|
419
|
+
s = "reduce(a, b, c, d)"
|
|
420
|
+
self.unchanged(s)
|
|
421
|
+
|
|
422
|
+
s = "reduce(**c)"
|
|
423
|
+
self.unchanged(s)
|
|
424
|
+
|
|
425
|
+
s = "reduce()"
|
|
426
|
+
self.unchanged(s)
|
|
427
|
+
|
|
428
|
+
class Test_print(FixerTestCase):
|
|
429
|
+
fixer = "print"
|
|
430
|
+
|
|
431
|
+
def test_prefix_preservation(self):
|
|
432
|
+
b = """print 1, 1+1, 1+1+1"""
|
|
433
|
+
a = """print(1, 1+1, 1+1+1)"""
|
|
434
|
+
self.check(b, a)
|
|
435
|
+
|
|
436
|
+
def test_idempotency(self):
|
|
437
|
+
s = """print()"""
|
|
438
|
+
self.unchanged(s)
|
|
439
|
+
|
|
440
|
+
s = """print('')"""
|
|
441
|
+
self.unchanged(s)
|
|
442
|
+
|
|
443
|
+
def test_idempotency_print_as_function(self):
|
|
444
|
+
self.refactor.driver.grammar = pygram.python_grammar_no_print_statement
|
|
445
|
+
s = """print(1, 1+1, 1+1+1)"""
|
|
446
|
+
self.unchanged(s)
|
|
447
|
+
|
|
448
|
+
s = """print()"""
|
|
449
|
+
self.unchanged(s)
|
|
450
|
+
|
|
451
|
+
s = """print('')"""
|
|
452
|
+
self.unchanged(s)
|
|
453
|
+
|
|
454
|
+
def test_1(self):
|
|
455
|
+
b = """print 1, 1+1, 1+1+1"""
|
|
456
|
+
a = """print(1, 1+1, 1+1+1)"""
|
|
457
|
+
self.check(b, a)
|
|
458
|
+
|
|
459
|
+
def test_2(self):
|
|
460
|
+
b = """print 1, 2"""
|
|
461
|
+
a = """print(1, 2)"""
|
|
462
|
+
self.check(b, a)
|
|
463
|
+
|
|
464
|
+
def test_3(self):
|
|
465
|
+
b = """print"""
|
|
466
|
+
a = """print()"""
|
|
467
|
+
self.check(b, a)
|
|
468
|
+
|
|
469
|
+
def test_4(self):
|
|
470
|
+
# from bug 3000
|
|
471
|
+
b = """print whatever; print"""
|
|
472
|
+
a = """print(whatever); print()"""
|
|
473
|
+
self.check(b, a)
|
|
474
|
+
|
|
475
|
+
def test_5(self):
|
|
476
|
+
b = """print; print whatever;"""
|
|
477
|
+
a = """print(); print(whatever);"""
|
|
478
|
+
self.check(b, a)
|
|
479
|
+
|
|
480
|
+
def test_tuple(self):
|
|
481
|
+
b = """print (a, b, c)"""
|
|
482
|
+
a = """print((a, b, c))"""
|
|
483
|
+
self.check(b, a)
|
|
484
|
+
|
|
485
|
+
# trailing commas
|
|
486
|
+
|
|
487
|
+
def test_trailing_comma_1(self):
|
|
488
|
+
b = """print 1, 2, 3,"""
|
|
489
|
+
a = """print(1, 2, 3, end=' ')"""
|
|
490
|
+
self.check(b, a)
|
|
491
|
+
|
|
492
|
+
def test_trailing_comma_2(self):
|
|
493
|
+
b = """print 1, 2,"""
|
|
494
|
+
a = """print(1, 2, end=' ')"""
|
|
495
|
+
self.check(b, a)
|
|
496
|
+
|
|
497
|
+
def test_trailing_comma_3(self):
|
|
498
|
+
b = """print 1,"""
|
|
499
|
+
a = """print(1, end=' ')"""
|
|
500
|
+
self.check(b, a)
|
|
501
|
+
|
|
502
|
+
# >> stuff
|
|
503
|
+
|
|
504
|
+
def test_vargs_without_trailing_comma(self):
|
|
505
|
+
b = """print >>sys.stderr, 1, 2, 3"""
|
|
506
|
+
a = """print(1, 2, 3, file=sys.stderr)"""
|
|
507
|
+
self.check(b, a)
|
|
508
|
+
|
|
509
|
+
def test_with_trailing_comma(self):
|
|
510
|
+
b = """print >>sys.stderr, 1, 2,"""
|
|
511
|
+
a = """print(1, 2, end=' ', file=sys.stderr)"""
|
|
512
|
+
self.check(b, a)
|
|
513
|
+
|
|
514
|
+
def test_no_trailing_comma(self):
|
|
515
|
+
b = """print >>sys.stderr, 1+1"""
|
|
516
|
+
a = """print(1+1, file=sys.stderr)"""
|
|
517
|
+
self.check(b, a)
|
|
518
|
+
|
|
519
|
+
def test_spaces_before_file(self):
|
|
520
|
+
b = """print >> sys.stderr"""
|
|
521
|
+
a = """print(file=sys.stderr)"""
|
|
522
|
+
self.check(b, a)
|
|
523
|
+
|
|
524
|
+
def test_with_future_print_function(self):
|
|
525
|
+
s = "from __future__ import print_function\n" \
|
|
526
|
+
"print('Hai!', end=' ')"
|
|
527
|
+
self.unchanged(s)
|
|
528
|
+
|
|
529
|
+
b = "print 'Hello, world!'"
|
|
530
|
+
a = "print('Hello, world!')"
|
|
531
|
+
self.check(b, a)
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
class Test_exec(FixerTestCase):
|
|
535
|
+
fixer = "exec"
|
|
536
|
+
|
|
537
|
+
def test_prefix_preservation(self):
|
|
538
|
+
b = """ exec code in ns1, ns2"""
|
|
539
|
+
a = """ exec(code, ns1, ns2)"""
|
|
540
|
+
self.check(b, a)
|
|
541
|
+
|
|
542
|
+
def test_basic(self):
|
|
543
|
+
b = """exec code"""
|
|
544
|
+
a = """exec(code)"""
|
|
545
|
+
self.check(b, a)
|
|
546
|
+
|
|
547
|
+
def test_with_globals(self):
|
|
548
|
+
b = """exec code in ns"""
|
|
549
|
+
a = """exec(code, ns)"""
|
|
550
|
+
self.check(b, a)
|
|
551
|
+
|
|
552
|
+
def test_with_globals_locals(self):
|
|
553
|
+
b = """exec code in ns1, ns2"""
|
|
554
|
+
a = """exec(code, ns1, ns2)"""
|
|
555
|
+
self.check(b, a)
|
|
556
|
+
|
|
557
|
+
def test_complex_1(self):
|
|
558
|
+
b = """exec (a.b()) in ns"""
|
|
559
|
+
a = """exec((a.b()), ns)"""
|
|
560
|
+
self.check(b, a)
|
|
561
|
+
|
|
562
|
+
def test_complex_2(self):
|
|
563
|
+
b = """exec a.b() + c in ns"""
|
|
564
|
+
a = """exec(a.b() + c, ns)"""
|
|
565
|
+
self.check(b, a)
|
|
566
|
+
|
|
567
|
+
# These should not be touched
|
|
568
|
+
|
|
569
|
+
def test_unchanged_1(self):
|
|
570
|
+
s = """exec(code)"""
|
|
571
|
+
self.unchanged(s)
|
|
572
|
+
|
|
573
|
+
def test_unchanged_2(self):
|
|
574
|
+
s = """exec (code)"""
|
|
575
|
+
self.unchanged(s)
|
|
576
|
+
|
|
577
|
+
def test_unchanged_3(self):
|
|
578
|
+
s = """exec(code, ns)"""
|
|
579
|
+
self.unchanged(s)
|
|
580
|
+
|
|
581
|
+
def test_unchanged_4(self):
|
|
582
|
+
s = """exec(code, ns1, ns2)"""
|
|
583
|
+
self.unchanged(s)
|
|
584
|
+
|
|
585
|
+
class Test_repr(FixerTestCase):
|
|
586
|
+
fixer = "repr"
|
|
587
|
+
|
|
588
|
+
def test_prefix_preservation(self):
|
|
589
|
+
b = """x = `1 + 2`"""
|
|
590
|
+
a = """x = repr(1 + 2)"""
|
|
591
|
+
self.check(b, a)
|
|
592
|
+
|
|
593
|
+
def test_simple_1(self):
|
|
594
|
+
b = """x = `1 + 2`"""
|
|
595
|
+
a = """x = repr(1 + 2)"""
|
|
596
|
+
self.check(b, a)
|
|
597
|
+
|
|
598
|
+
def test_simple_2(self):
|
|
599
|
+
b = """y = `x`"""
|
|
600
|
+
a = """y = repr(x)"""
|
|
601
|
+
self.check(b, a)
|
|
602
|
+
|
|
603
|
+
def test_complex(self):
|
|
604
|
+
b = """z = `y`.__repr__()"""
|
|
605
|
+
a = """z = repr(y).__repr__()"""
|
|
606
|
+
self.check(b, a)
|
|
607
|
+
|
|
608
|
+
def test_tuple(self):
|
|
609
|
+
b = """x = `1, 2, 3`"""
|
|
610
|
+
a = """x = repr((1, 2, 3))"""
|
|
611
|
+
self.check(b, a)
|
|
612
|
+
|
|
613
|
+
def test_nested(self):
|
|
614
|
+
b = """x = `1 + `2``"""
|
|
615
|
+
a = """x = repr(1 + repr(2))"""
|
|
616
|
+
self.check(b, a)
|
|
617
|
+
|
|
618
|
+
def test_nested_tuples(self):
|
|
619
|
+
b = """x = `1, 2 + `3, 4``"""
|
|
620
|
+
a = """x = repr((1, 2 + repr((3, 4))))"""
|
|
621
|
+
self.check(b, a)
|
|
622
|
+
|
|
623
|
+
class Test_except(FixerTestCase):
|
|
624
|
+
fixer = "except"
|
|
625
|
+
|
|
626
|
+
def test_prefix_preservation(self):
|
|
627
|
+
b = """
|
|
628
|
+
try:
|
|
629
|
+
pass
|
|
630
|
+
except (RuntimeError, ImportError), e:
|
|
631
|
+
pass"""
|
|
632
|
+
a = """
|
|
633
|
+
try:
|
|
634
|
+
pass
|
|
635
|
+
except (RuntimeError, ImportError) as e:
|
|
636
|
+
pass"""
|
|
637
|
+
self.check(b, a)
|
|
638
|
+
|
|
639
|
+
def test_simple(self):
|
|
640
|
+
b = """
|
|
641
|
+
try:
|
|
642
|
+
pass
|
|
643
|
+
except Foo, e:
|
|
644
|
+
pass"""
|
|
645
|
+
a = """
|
|
646
|
+
try:
|
|
647
|
+
pass
|
|
648
|
+
except Foo as e:
|
|
649
|
+
pass"""
|
|
650
|
+
self.check(b, a)
|
|
651
|
+
|
|
652
|
+
def test_simple_no_space_before_target(self):
|
|
653
|
+
b = """
|
|
654
|
+
try:
|
|
655
|
+
pass
|
|
656
|
+
except Foo,e:
|
|
657
|
+
pass"""
|
|
658
|
+
a = """
|
|
659
|
+
try:
|
|
660
|
+
pass
|
|
661
|
+
except Foo as e:
|
|
662
|
+
pass"""
|
|
663
|
+
self.check(b, a)
|
|
664
|
+
|
|
665
|
+
def test_tuple_unpack(self):
|
|
666
|
+
b = """
|
|
667
|
+
def foo():
|
|
668
|
+
try:
|
|
669
|
+
pass
|
|
670
|
+
except Exception, (f, e):
|
|
671
|
+
pass
|
|
672
|
+
except ImportError, e:
|
|
673
|
+
pass"""
|
|
674
|
+
|
|
675
|
+
a = """
|
|
676
|
+
def foo():
|
|
677
|
+
try:
|
|
678
|
+
pass
|
|
679
|
+
except Exception as xxx_todo_changeme:
|
|
680
|
+
(f, e) = xxx_todo_changeme.args
|
|
681
|
+
pass
|
|
682
|
+
except ImportError as e:
|
|
683
|
+
pass"""
|
|
684
|
+
self.check(b, a)
|
|
685
|
+
|
|
686
|
+
def test_multi_class(self):
|
|
687
|
+
b = """
|
|
688
|
+
try:
|
|
689
|
+
pass
|
|
690
|
+
except (RuntimeError, ImportError), e:
|
|
691
|
+
pass"""
|
|
692
|
+
|
|
693
|
+
a = """
|
|
694
|
+
try:
|
|
695
|
+
pass
|
|
696
|
+
except (RuntimeError, ImportError) as e:
|
|
697
|
+
pass"""
|
|
698
|
+
self.check(b, a)
|
|
699
|
+
|
|
700
|
+
def test_list_unpack(self):
|
|
701
|
+
b = """
|
|
702
|
+
try:
|
|
703
|
+
pass
|
|
704
|
+
except Exception, [a, b]:
|
|
705
|
+
pass"""
|
|
706
|
+
|
|
707
|
+
a = """
|
|
708
|
+
try:
|
|
709
|
+
pass
|
|
710
|
+
except Exception as xxx_todo_changeme:
|
|
711
|
+
[a, b] = xxx_todo_changeme.args
|
|
712
|
+
pass"""
|
|
713
|
+
self.check(b, a)
|
|
714
|
+
|
|
715
|
+
def test_weird_target_1(self):
|
|
716
|
+
b = """
|
|
717
|
+
try:
|
|
718
|
+
pass
|
|
719
|
+
except Exception, d[5]:
|
|
720
|
+
pass"""
|
|
721
|
+
|
|
722
|
+
a = """
|
|
723
|
+
try:
|
|
724
|
+
pass
|
|
725
|
+
except Exception as xxx_todo_changeme:
|
|
726
|
+
d[5] = xxx_todo_changeme
|
|
727
|
+
pass"""
|
|
728
|
+
self.check(b, a)
|
|
729
|
+
|
|
730
|
+
def test_weird_target_2(self):
|
|
731
|
+
b = """
|
|
732
|
+
try:
|
|
733
|
+
pass
|
|
734
|
+
except Exception, a.foo:
|
|
735
|
+
pass"""
|
|
736
|
+
|
|
737
|
+
a = """
|
|
738
|
+
try:
|
|
739
|
+
pass
|
|
740
|
+
except Exception as xxx_todo_changeme:
|
|
741
|
+
a.foo = xxx_todo_changeme
|
|
742
|
+
pass"""
|
|
743
|
+
self.check(b, a)
|
|
744
|
+
|
|
745
|
+
def test_weird_target_3(self):
|
|
746
|
+
b = """
|
|
747
|
+
try:
|
|
748
|
+
pass
|
|
749
|
+
except Exception, a().foo:
|
|
750
|
+
pass"""
|
|
751
|
+
|
|
752
|
+
a = """
|
|
753
|
+
try:
|
|
754
|
+
pass
|
|
755
|
+
except Exception as xxx_todo_changeme:
|
|
756
|
+
a().foo = xxx_todo_changeme
|
|
757
|
+
pass"""
|
|
758
|
+
self.check(b, a)
|
|
759
|
+
|
|
760
|
+
def test_bare_except(self):
|
|
761
|
+
b = """
|
|
762
|
+
try:
|
|
763
|
+
pass
|
|
764
|
+
except Exception, a:
|
|
765
|
+
pass
|
|
766
|
+
except:
|
|
767
|
+
pass"""
|
|
768
|
+
|
|
769
|
+
a = """
|
|
770
|
+
try:
|
|
771
|
+
pass
|
|
772
|
+
except Exception as a:
|
|
773
|
+
pass
|
|
774
|
+
except:
|
|
775
|
+
pass"""
|
|
776
|
+
self.check(b, a)
|
|
777
|
+
|
|
778
|
+
def test_bare_except_and_else_finally(self):
|
|
779
|
+
b = """
|
|
780
|
+
try:
|
|
781
|
+
pass
|
|
782
|
+
except Exception, a:
|
|
783
|
+
pass
|
|
784
|
+
except:
|
|
785
|
+
pass
|
|
786
|
+
else:
|
|
787
|
+
pass
|
|
788
|
+
finally:
|
|
789
|
+
pass"""
|
|
790
|
+
|
|
791
|
+
a = """
|
|
792
|
+
try:
|
|
793
|
+
pass
|
|
794
|
+
except Exception as a:
|
|
795
|
+
pass
|
|
796
|
+
except:
|
|
797
|
+
pass
|
|
798
|
+
else:
|
|
799
|
+
pass
|
|
800
|
+
finally:
|
|
801
|
+
pass"""
|
|
802
|
+
self.check(b, a)
|
|
803
|
+
|
|
804
|
+
def test_multi_fixed_excepts_before_bare_except(self):
|
|
805
|
+
b = """
|
|
806
|
+
try:
|
|
807
|
+
pass
|
|
808
|
+
except TypeError, b:
|
|
809
|
+
pass
|
|
810
|
+
except Exception, a:
|
|
811
|
+
pass
|
|
812
|
+
except:
|
|
813
|
+
pass"""
|
|
814
|
+
|
|
815
|
+
a = """
|
|
816
|
+
try:
|
|
817
|
+
pass
|
|
818
|
+
except TypeError as b:
|
|
819
|
+
pass
|
|
820
|
+
except Exception as a:
|
|
821
|
+
pass
|
|
822
|
+
except:
|
|
823
|
+
pass"""
|
|
824
|
+
self.check(b, a)
|
|
825
|
+
|
|
826
|
+
def test_one_line_suites(self):
|
|
827
|
+
b = """
|
|
828
|
+
try: raise TypeError
|
|
829
|
+
except TypeError, e:
|
|
830
|
+
pass
|
|
831
|
+
"""
|
|
832
|
+
a = """
|
|
833
|
+
try: raise TypeError
|
|
834
|
+
except TypeError as e:
|
|
835
|
+
pass
|
|
836
|
+
"""
|
|
837
|
+
self.check(b, a)
|
|
838
|
+
b = """
|
|
839
|
+
try:
|
|
840
|
+
raise TypeError
|
|
841
|
+
except TypeError, e: pass
|
|
842
|
+
"""
|
|
843
|
+
a = """
|
|
844
|
+
try:
|
|
845
|
+
raise TypeError
|
|
846
|
+
except TypeError as e: pass
|
|
847
|
+
"""
|
|
848
|
+
self.check(b, a)
|
|
849
|
+
b = """
|
|
850
|
+
try: raise TypeError
|
|
851
|
+
except TypeError, e: pass
|
|
852
|
+
"""
|
|
853
|
+
a = """
|
|
854
|
+
try: raise TypeError
|
|
855
|
+
except TypeError as e: pass
|
|
856
|
+
"""
|
|
857
|
+
self.check(b, a)
|
|
858
|
+
b = """
|
|
859
|
+
try: raise TypeError
|
|
860
|
+
except TypeError, e: pass
|
|
861
|
+
else: function()
|
|
862
|
+
finally: done()
|
|
863
|
+
"""
|
|
864
|
+
a = """
|
|
865
|
+
try: raise TypeError
|
|
866
|
+
except TypeError as e: pass
|
|
867
|
+
else: function()
|
|
868
|
+
finally: done()
|
|
869
|
+
"""
|
|
870
|
+
self.check(b, a)
|
|
871
|
+
|
|
872
|
+
# These should not be touched:
|
|
873
|
+
|
|
874
|
+
def test_unchanged_1(self):
|
|
875
|
+
s = """
|
|
876
|
+
try:
|
|
877
|
+
pass
|
|
878
|
+
except:
|
|
879
|
+
pass"""
|
|
880
|
+
self.unchanged(s)
|
|
881
|
+
|
|
882
|
+
def test_unchanged_2(self):
|
|
883
|
+
s = """
|
|
884
|
+
try:
|
|
885
|
+
pass
|
|
886
|
+
except Exception:
|
|
887
|
+
pass"""
|
|
888
|
+
self.unchanged(s)
|
|
889
|
+
|
|
890
|
+
def test_unchanged_3(self):
|
|
891
|
+
s = """
|
|
892
|
+
try:
|
|
893
|
+
pass
|
|
894
|
+
except (Exception, SystemExit):
|
|
895
|
+
pass"""
|
|
896
|
+
self.unchanged(s)
|
|
897
|
+
|
|
898
|
+
class Test_raise(FixerTestCase):
|
|
899
|
+
fixer = "raise"
|
|
900
|
+
|
|
901
|
+
def test_basic(self):
|
|
902
|
+
b = """raise Exception, 5"""
|
|
903
|
+
a = """raise Exception(5)"""
|
|
904
|
+
self.check(b, a)
|
|
905
|
+
|
|
906
|
+
def test_prefix_preservation(self):
|
|
907
|
+
b = """raise Exception,5"""
|
|
908
|
+
a = """raise Exception(5)"""
|
|
909
|
+
self.check(b, a)
|
|
910
|
+
|
|
911
|
+
b = """raise Exception, 5"""
|
|
912
|
+
a = """raise Exception(5)"""
|
|
913
|
+
self.check(b, a)
|
|
914
|
+
|
|
915
|
+
def test_with_comments(self):
|
|
916
|
+
b = """raise Exception, 5 # foo"""
|
|
917
|
+
a = """raise Exception(5) # foo"""
|
|
918
|
+
self.check(b, a)
|
|
919
|
+
|
|
920
|
+
b = """raise E, (5, 6) % (a, b) # foo"""
|
|
921
|
+
a = """raise E((5, 6) % (a, b)) # foo"""
|
|
922
|
+
self.check(b, a)
|
|
923
|
+
|
|
924
|
+
b = """def foo():
|
|
925
|
+
raise Exception, 5, 6 # foo"""
|
|
926
|
+
a = """def foo():
|
|
927
|
+
raise Exception(5).with_traceback(6) # foo"""
|
|
928
|
+
self.check(b, a)
|
|
929
|
+
|
|
930
|
+
def test_None_value(self):
|
|
931
|
+
b = """raise Exception(5), None, tb"""
|
|
932
|
+
a = """raise Exception(5).with_traceback(tb)"""
|
|
933
|
+
self.check(b, a)
|
|
934
|
+
|
|
935
|
+
def test_tuple_value(self):
|
|
936
|
+
b = """raise Exception, (5, 6, 7)"""
|
|
937
|
+
a = """raise Exception(5, 6, 7)"""
|
|
938
|
+
self.check(b, a)
|
|
939
|
+
|
|
940
|
+
def test_tuple_detection(self):
|
|
941
|
+
b = """raise E, (5, 6) % (a, b)"""
|
|
942
|
+
a = """raise E((5, 6) % (a, b))"""
|
|
943
|
+
self.check(b, a)
|
|
944
|
+
|
|
945
|
+
def test_tuple_exc_1(self):
|
|
946
|
+
b = """raise (((E1, E2), E3), E4), V"""
|
|
947
|
+
a = """raise E1(V)"""
|
|
948
|
+
self.check(b, a)
|
|
949
|
+
|
|
950
|
+
def test_tuple_exc_2(self):
|
|
951
|
+
b = """raise (E1, (E2, E3), E4), V"""
|
|
952
|
+
a = """raise E1(V)"""
|
|
953
|
+
self.check(b, a)
|
|
954
|
+
|
|
955
|
+
# These should produce a warning
|
|
956
|
+
|
|
957
|
+
def test_string_exc(self):
|
|
958
|
+
s = """raise 'foo'"""
|
|
959
|
+
self.warns_unchanged(s, "Python 3 does not support string exceptions")
|
|
960
|
+
|
|
961
|
+
def test_string_exc_val(self):
|
|
962
|
+
s = """raise "foo", 5"""
|
|
963
|
+
self.warns_unchanged(s, "Python 3 does not support string exceptions")
|
|
964
|
+
|
|
965
|
+
def test_string_exc_val_tb(self):
|
|
966
|
+
s = """raise "foo", 5, 6"""
|
|
967
|
+
self.warns_unchanged(s, "Python 3 does not support string exceptions")
|
|
968
|
+
|
|
969
|
+
# These should result in traceback-assignment
|
|
970
|
+
|
|
971
|
+
def test_tb_1(self):
|
|
972
|
+
b = """def foo():
|
|
973
|
+
raise Exception, 5, 6"""
|
|
974
|
+
a = """def foo():
|
|
975
|
+
raise Exception(5).with_traceback(6)"""
|
|
976
|
+
self.check(b, a)
|
|
977
|
+
|
|
978
|
+
def test_tb_2(self):
|
|
979
|
+
b = """def foo():
|
|
980
|
+
a = 5
|
|
981
|
+
raise Exception, 5, 6
|
|
982
|
+
b = 6"""
|
|
983
|
+
a = """def foo():
|
|
984
|
+
a = 5
|
|
985
|
+
raise Exception(5).with_traceback(6)
|
|
986
|
+
b = 6"""
|
|
987
|
+
self.check(b, a)
|
|
988
|
+
|
|
989
|
+
def test_tb_3(self):
|
|
990
|
+
b = """def foo():
|
|
991
|
+
raise Exception,5,6"""
|
|
992
|
+
a = """def foo():
|
|
993
|
+
raise Exception(5).with_traceback(6)"""
|
|
994
|
+
self.check(b, a)
|
|
995
|
+
|
|
996
|
+
def test_tb_4(self):
|
|
997
|
+
b = """def foo():
|
|
998
|
+
a = 5
|
|
999
|
+
raise Exception,5,6
|
|
1000
|
+
b = 6"""
|
|
1001
|
+
a = """def foo():
|
|
1002
|
+
a = 5
|
|
1003
|
+
raise Exception(5).with_traceback(6)
|
|
1004
|
+
b = 6"""
|
|
1005
|
+
self.check(b, a)
|
|
1006
|
+
|
|
1007
|
+
def test_tb_5(self):
|
|
1008
|
+
b = """def foo():
|
|
1009
|
+
raise Exception, (5, 6, 7), 6"""
|
|
1010
|
+
a = """def foo():
|
|
1011
|
+
raise Exception(5, 6, 7).with_traceback(6)"""
|
|
1012
|
+
self.check(b, a)
|
|
1013
|
+
|
|
1014
|
+
def test_tb_6(self):
|
|
1015
|
+
b = """def foo():
|
|
1016
|
+
a = 5
|
|
1017
|
+
raise Exception, (5, 6, 7), 6
|
|
1018
|
+
b = 6"""
|
|
1019
|
+
a = """def foo():
|
|
1020
|
+
a = 5
|
|
1021
|
+
raise Exception(5, 6, 7).with_traceback(6)
|
|
1022
|
+
b = 6"""
|
|
1023
|
+
self.check(b, a)
|
|
1024
|
+
|
|
1025
|
+
class Test_throw(FixerTestCase):
|
|
1026
|
+
fixer = "throw"
|
|
1027
|
+
|
|
1028
|
+
def test_1(self):
|
|
1029
|
+
b = """g.throw(Exception, 5)"""
|
|
1030
|
+
a = """g.throw(Exception(5))"""
|
|
1031
|
+
self.check(b, a)
|
|
1032
|
+
|
|
1033
|
+
def test_2(self):
|
|
1034
|
+
b = """g.throw(Exception,5)"""
|
|
1035
|
+
a = """g.throw(Exception(5))"""
|
|
1036
|
+
self.check(b, a)
|
|
1037
|
+
|
|
1038
|
+
def test_3(self):
|
|
1039
|
+
b = """g.throw(Exception, (5, 6, 7))"""
|
|
1040
|
+
a = """g.throw(Exception(5, 6, 7))"""
|
|
1041
|
+
self.check(b, a)
|
|
1042
|
+
|
|
1043
|
+
def test_4(self):
|
|
1044
|
+
b = """5 + g.throw(Exception, 5)"""
|
|
1045
|
+
a = """5 + g.throw(Exception(5))"""
|
|
1046
|
+
self.check(b, a)
|
|
1047
|
+
|
|
1048
|
+
# These should produce warnings
|
|
1049
|
+
|
|
1050
|
+
def test_warn_1(self):
|
|
1051
|
+
s = """g.throw("foo")"""
|
|
1052
|
+
self.warns_unchanged(s, "Python 3 does not support string exceptions")
|
|
1053
|
+
|
|
1054
|
+
def test_warn_2(self):
|
|
1055
|
+
s = """g.throw("foo", 5)"""
|
|
1056
|
+
self.warns_unchanged(s, "Python 3 does not support string exceptions")
|
|
1057
|
+
|
|
1058
|
+
def test_warn_3(self):
|
|
1059
|
+
s = """g.throw("foo", 5, 6)"""
|
|
1060
|
+
self.warns_unchanged(s, "Python 3 does not support string exceptions")
|
|
1061
|
+
|
|
1062
|
+
# These should not be touched
|
|
1063
|
+
|
|
1064
|
+
def test_untouched_1(self):
|
|
1065
|
+
s = """g.throw(Exception)"""
|
|
1066
|
+
self.unchanged(s)
|
|
1067
|
+
|
|
1068
|
+
def test_untouched_2(self):
|
|
1069
|
+
s = """g.throw(Exception(5, 6))"""
|
|
1070
|
+
self.unchanged(s)
|
|
1071
|
+
|
|
1072
|
+
def test_untouched_3(self):
|
|
1073
|
+
s = """5 + g.throw(Exception(5, 6))"""
|
|
1074
|
+
self.unchanged(s)
|
|
1075
|
+
|
|
1076
|
+
# These should result in traceback-assignment
|
|
1077
|
+
|
|
1078
|
+
def test_tb_1(self):
|
|
1079
|
+
b = """def foo():
|
|
1080
|
+
g.throw(Exception, 5, 6)"""
|
|
1081
|
+
a = """def foo():
|
|
1082
|
+
g.throw(Exception(5).with_traceback(6))"""
|
|
1083
|
+
self.check(b, a)
|
|
1084
|
+
|
|
1085
|
+
def test_tb_2(self):
|
|
1086
|
+
b = """def foo():
|
|
1087
|
+
a = 5
|
|
1088
|
+
g.throw(Exception, 5, 6)
|
|
1089
|
+
b = 6"""
|
|
1090
|
+
a = """def foo():
|
|
1091
|
+
a = 5
|
|
1092
|
+
g.throw(Exception(5).with_traceback(6))
|
|
1093
|
+
b = 6"""
|
|
1094
|
+
self.check(b, a)
|
|
1095
|
+
|
|
1096
|
+
def test_tb_3(self):
|
|
1097
|
+
b = """def foo():
|
|
1098
|
+
g.throw(Exception,5,6)"""
|
|
1099
|
+
a = """def foo():
|
|
1100
|
+
g.throw(Exception(5).with_traceback(6))"""
|
|
1101
|
+
self.check(b, a)
|
|
1102
|
+
|
|
1103
|
+
def test_tb_4(self):
|
|
1104
|
+
b = """def foo():
|
|
1105
|
+
a = 5
|
|
1106
|
+
g.throw(Exception,5,6)
|
|
1107
|
+
b = 6"""
|
|
1108
|
+
a = """def foo():
|
|
1109
|
+
a = 5
|
|
1110
|
+
g.throw(Exception(5).with_traceback(6))
|
|
1111
|
+
b = 6"""
|
|
1112
|
+
self.check(b, a)
|
|
1113
|
+
|
|
1114
|
+
def test_tb_5(self):
|
|
1115
|
+
b = """def foo():
|
|
1116
|
+
g.throw(Exception, (5, 6, 7), 6)"""
|
|
1117
|
+
a = """def foo():
|
|
1118
|
+
g.throw(Exception(5, 6, 7).with_traceback(6))"""
|
|
1119
|
+
self.check(b, a)
|
|
1120
|
+
|
|
1121
|
+
def test_tb_6(self):
|
|
1122
|
+
b = """def foo():
|
|
1123
|
+
a = 5
|
|
1124
|
+
g.throw(Exception, (5, 6, 7), 6)
|
|
1125
|
+
b = 6"""
|
|
1126
|
+
a = """def foo():
|
|
1127
|
+
a = 5
|
|
1128
|
+
g.throw(Exception(5, 6, 7).with_traceback(6))
|
|
1129
|
+
b = 6"""
|
|
1130
|
+
self.check(b, a)
|
|
1131
|
+
|
|
1132
|
+
def test_tb_7(self):
|
|
1133
|
+
b = """def foo():
|
|
1134
|
+
a + g.throw(Exception, 5, 6)"""
|
|
1135
|
+
a = """def foo():
|
|
1136
|
+
a + g.throw(Exception(5).with_traceback(6))"""
|
|
1137
|
+
self.check(b, a)
|
|
1138
|
+
|
|
1139
|
+
def test_tb_8(self):
|
|
1140
|
+
b = """def foo():
|
|
1141
|
+
a = 5
|
|
1142
|
+
a + g.throw(Exception, 5, 6)
|
|
1143
|
+
b = 6"""
|
|
1144
|
+
a = """def foo():
|
|
1145
|
+
a = 5
|
|
1146
|
+
a + g.throw(Exception(5).with_traceback(6))
|
|
1147
|
+
b = 6"""
|
|
1148
|
+
self.check(b, a)
|
|
1149
|
+
|
|
1150
|
+
class Test_long(FixerTestCase):
|
|
1151
|
+
fixer = "long"
|
|
1152
|
+
|
|
1153
|
+
def test_1(self):
|
|
1154
|
+
b = """x = long(x)"""
|
|
1155
|
+
a = """x = int(x)"""
|
|
1156
|
+
self.check(b, a)
|
|
1157
|
+
|
|
1158
|
+
def test_2(self):
|
|
1159
|
+
b = """y = isinstance(x, long)"""
|
|
1160
|
+
a = """y = isinstance(x, int)"""
|
|
1161
|
+
self.check(b, a)
|
|
1162
|
+
|
|
1163
|
+
def test_3(self):
|
|
1164
|
+
b = """z = type(x) in (int, long)"""
|
|
1165
|
+
a = """z = type(x) in (int, int)"""
|
|
1166
|
+
self.check(b, a)
|
|
1167
|
+
|
|
1168
|
+
def test_unchanged(self):
|
|
1169
|
+
s = """long = True"""
|
|
1170
|
+
self.unchanged(s)
|
|
1171
|
+
|
|
1172
|
+
s = """s.long = True"""
|
|
1173
|
+
self.unchanged(s)
|
|
1174
|
+
|
|
1175
|
+
s = """def long(): pass"""
|
|
1176
|
+
self.unchanged(s)
|
|
1177
|
+
|
|
1178
|
+
s = """class long(): pass"""
|
|
1179
|
+
self.unchanged(s)
|
|
1180
|
+
|
|
1181
|
+
s = """def f(long): pass"""
|
|
1182
|
+
self.unchanged(s)
|
|
1183
|
+
|
|
1184
|
+
s = """def f(g, long): pass"""
|
|
1185
|
+
self.unchanged(s)
|
|
1186
|
+
|
|
1187
|
+
s = """def f(x, long=True): pass"""
|
|
1188
|
+
self.unchanged(s)
|
|
1189
|
+
|
|
1190
|
+
def test_prefix_preservation(self):
|
|
1191
|
+
b = """x = long( x )"""
|
|
1192
|
+
a = """x = int( x )"""
|
|
1193
|
+
self.check(b, a)
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
class Test_execfile(FixerTestCase):
|
|
1197
|
+
fixer = "execfile"
|
|
1198
|
+
|
|
1199
|
+
def test_conversion(self):
|
|
1200
|
+
b = """execfile("fn")"""
|
|
1201
|
+
a = """exec(compile(open("fn").read(), "fn", 'exec'))"""
|
|
1202
|
+
self.check(b, a)
|
|
1203
|
+
|
|
1204
|
+
b = """execfile("fn", glob)"""
|
|
1205
|
+
a = """exec(compile(open("fn").read(), "fn", 'exec'), glob)"""
|
|
1206
|
+
self.check(b, a)
|
|
1207
|
+
|
|
1208
|
+
b = """execfile("fn", glob, loc)"""
|
|
1209
|
+
a = """exec(compile(open("fn").read(), "fn", 'exec'), glob, loc)"""
|
|
1210
|
+
self.check(b, a)
|
|
1211
|
+
|
|
1212
|
+
b = """execfile("fn", globals=glob)"""
|
|
1213
|
+
a = """exec(compile(open("fn").read(), "fn", 'exec'), globals=glob)"""
|
|
1214
|
+
self.check(b, a)
|
|
1215
|
+
|
|
1216
|
+
b = """execfile("fn", locals=loc)"""
|
|
1217
|
+
a = """exec(compile(open("fn").read(), "fn", 'exec'), locals=loc)"""
|
|
1218
|
+
self.check(b, a)
|
|
1219
|
+
|
|
1220
|
+
b = """execfile("fn", globals=glob, locals=loc)"""
|
|
1221
|
+
a = """exec(compile(open("fn").read(), "fn", 'exec'), globals=glob, locals=loc)"""
|
|
1222
|
+
self.check(b, a)
|
|
1223
|
+
|
|
1224
|
+
def test_spacing(self):
|
|
1225
|
+
b = """execfile( "fn" )"""
|
|
1226
|
+
a = """exec(compile(open( "fn" ).read(), "fn", 'exec'))"""
|
|
1227
|
+
self.check(b, a)
|
|
1228
|
+
|
|
1229
|
+
b = """execfile("fn", globals = glob)"""
|
|
1230
|
+
a = """exec(compile(open("fn").read(), "fn", 'exec'), globals = glob)"""
|
|
1231
|
+
self.check(b, a)
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
class Test_isinstance(FixerTestCase):
|
|
1235
|
+
fixer = "isinstance"
|
|
1236
|
+
|
|
1237
|
+
def test_remove_multiple_items(self):
|
|
1238
|
+
b = """isinstance(x, (int, int, int))"""
|
|
1239
|
+
a = """isinstance(x, int)"""
|
|
1240
|
+
self.check(b, a)
|
|
1241
|
+
|
|
1242
|
+
b = """isinstance(x, (int, float, int, int, float))"""
|
|
1243
|
+
a = """isinstance(x, (int, float))"""
|
|
1244
|
+
self.check(b, a)
|
|
1245
|
+
|
|
1246
|
+
b = """isinstance(x, (int, float, int, int, float, str))"""
|
|
1247
|
+
a = """isinstance(x, (int, float, str))"""
|
|
1248
|
+
self.check(b, a)
|
|
1249
|
+
|
|
1250
|
+
b = """isinstance(foo() + bar(), (x(), y(), x(), int, int))"""
|
|
1251
|
+
a = """isinstance(foo() + bar(), (x(), y(), x(), int))"""
|
|
1252
|
+
self.check(b, a)
|
|
1253
|
+
|
|
1254
|
+
def test_prefix_preservation(self):
|
|
1255
|
+
b = """if isinstance( foo(), ( bar, bar, baz )) : pass"""
|
|
1256
|
+
a = """if isinstance( foo(), ( bar, baz )) : pass"""
|
|
1257
|
+
self.check(b, a)
|
|
1258
|
+
|
|
1259
|
+
def test_unchanged(self):
|
|
1260
|
+
self.unchanged("isinstance(x, (str, int))")
|
|
1261
|
+
|
|
1262
|
+
class Test_dict(FixerTestCase):
|
|
1263
|
+
fixer = "dict"
|
|
1264
|
+
|
|
1265
|
+
def test_prefix_preservation(self):
|
|
1266
|
+
b = "if d. keys ( ) : pass"
|
|
1267
|
+
a = "if list(d. keys ( )) : pass"
|
|
1268
|
+
self.check(b, a)
|
|
1269
|
+
|
|
1270
|
+
b = "if d. items ( ) : pass"
|
|
1271
|
+
a = "if list(d. items ( )) : pass"
|
|
1272
|
+
self.check(b, a)
|
|
1273
|
+
|
|
1274
|
+
b = "if d. iterkeys ( ) : pass"
|
|
1275
|
+
a = "if iter(d. keys ( )) : pass"
|
|
1276
|
+
self.check(b, a)
|
|
1277
|
+
|
|
1278
|
+
b = "[i for i in d. iterkeys( ) ]"
|
|
1279
|
+
a = "[i for i in d. keys( ) ]"
|
|
1280
|
+
self.check(b, a)
|
|
1281
|
+
|
|
1282
|
+
b = "if d. viewkeys ( ) : pass"
|
|
1283
|
+
a = "if d. keys ( ) : pass"
|
|
1284
|
+
self.check(b, a)
|
|
1285
|
+
|
|
1286
|
+
b = "[i for i in d. viewkeys( ) ]"
|
|
1287
|
+
a = "[i for i in d. keys( ) ]"
|
|
1288
|
+
self.check(b, a)
|
|
1289
|
+
|
|
1290
|
+
def test_trailing_comment(self):
|
|
1291
|
+
b = "d.keys() # foo"
|
|
1292
|
+
a = "list(d.keys()) # foo"
|
|
1293
|
+
self.check(b, a)
|
|
1294
|
+
|
|
1295
|
+
b = "d.items() # foo"
|
|
1296
|
+
a = "list(d.items()) # foo"
|
|
1297
|
+
self.check(b, a)
|
|
1298
|
+
|
|
1299
|
+
b = "d.iterkeys() # foo"
|
|
1300
|
+
a = "iter(d.keys()) # foo"
|
|
1301
|
+
self.check(b, a)
|
|
1302
|
+
|
|
1303
|
+
b = """[i for i in d.iterkeys() # foo
|
|
1304
|
+
]"""
|
|
1305
|
+
a = """[i for i in d.keys() # foo
|
|
1306
|
+
]"""
|
|
1307
|
+
self.check(b, a)
|
|
1308
|
+
|
|
1309
|
+
b = """[i for i in d.iterkeys() # foo
|
|
1310
|
+
]"""
|
|
1311
|
+
a = """[i for i in d.keys() # foo
|
|
1312
|
+
]"""
|
|
1313
|
+
self.check(b, a)
|
|
1314
|
+
|
|
1315
|
+
b = "d.viewitems() # foo"
|
|
1316
|
+
a = "d.items() # foo"
|
|
1317
|
+
self.check(b, a)
|
|
1318
|
+
|
|
1319
|
+
def test_unchanged(self):
|
|
1320
|
+
for wrapper in fixer_util.consuming_calls:
|
|
1321
|
+
s = "s = %s(d.keys())" % wrapper
|
|
1322
|
+
self.unchanged(s)
|
|
1323
|
+
|
|
1324
|
+
s = "s = %s(d.values())" % wrapper
|
|
1325
|
+
self.unchanged(s)
|
|
1326
|
+
|
|
1327
|
+
s = "s = %s(d.items())" % wrapper
|
|
1328
|
+
self.unchanged(s)
|
|
1329
|
+
|
|
1330
|
+
def test_01(self):
|
|
1331
|
+
b = "d.keys()"
|
|
1332
|
+
a = "list(d.keys())"
|
|
1333
|
+
self.check(b, a)
|
|
1334
|
+
|
|
1335
|
+
b = "a[0].foo().keys()"
|
|
1336
|
+
a = "list(a[0].foo().keys())"
|
|
1337
|
+
self.check(b, a)
|
|
1338
|
+
|
|
1339
|
+
def test_02(self):
|
|
1340
|
+
b = "d.items()"
|
|
1341
|
+
a = "list(d.items())"
|
|
1342
|
+
self.check(b, a)
|
|
1343
|
+
|
|
1344
|
+
def test_03(self):
|
|
1345
|
+
b = "d.values()"
|
|
1346
|
+
a = "list(d.values())"
|
|
1347
|
+
self.check(b, a)
|
|
1348
|
+
|
|
1349
|
+
def test_04(self):
|
|
1350
|
+
b = "d.iterkeys()"
|
|
1351
|
+
a = "iter(d.keys())"
|
|
1352
|
+
self.check(b, a)
|
|
1353
|
+
|
|
1354
|
+
def test_05(self):
|
|
1355
|
+
b = "d.iteritems()"
|
|
1356
|
+
a = "iter(d.items())"
|
|
1357
|
+
self.check(b, a)
|
|
1358
|
+
|
|
1359
|
+
def test_06(self):
|
|
1360
|
+
b = "d.itervalues()"
|
|
1361
|
+
a = "iter(d.values())"
|
|
1362
|
+
self.check(b, a)
|
|
1363
|
+
|
|
1364
|
+
def test_07(self):
|
|
1365
|
+
s = "list(d.keys())"
|
|
1366
|
+
self.unchanged(s)
|
|
1367
|
+
|
|
1368
|
+
def test_08(self):
|
|
1369
|
+
s = "sorted(d.keys())"
|
|
1370
|
+
self.unchanged(s)
|
|
1371
|
+
|
|
1372
|
+
def test_09(self):
|
|
1373
|
+
b = "iter(d.keys())"
|
|
1374
|
+
a = "iter(list(d.keys()))"
|
|
1375
|
+
self.check(b, a)
|
|
1376
|
+
|
|
1377
|
+
def test_10(self):
|
|
1378
|
+
b = "foo(d.keys())"
|
|
1379
|
+
a = "foo(list(d.keys()))"
|
|
1380
|
+
self.check(b, a)
|
|
1381
|
+
|
|
1382
|
+
def test_11(self):
|
|
1383
|
+
b = "for i in d.keys(): print i"
|
|
1384
|
+
a = "for i in list(d.keys()): print i"
|
|
1385
|
+
self.check(b, a)
|
|
1386
|
+
|
|
1387
|
+
def test_12(self):
|
|
1388
|
+
b = "for i in d.iterkeys(): print i"
|
|
1389
|
+
a = "for i in d.keys(): print i"
|
|
1390
|
+
self.check(b, a)
|
|
1391
|
+
|
|
1392
|
+
def test_13(self):
|
|
1393
|
+
b = "[i for i in d.keys()]"
|
|
1394
|
+
a = "[i for i in list(d.keys())]"
|
|
1395
|
+
self.check(b, a)
|
|
1396
|
+
|
|
1397
|
+
def test_14(self):
|
|
1398
|
+
b = "[i for i in d.iterkeys()]"
|
|
1399
|
+
a = "[i for i in d.keys()]"
|
|
1400
|
+
self.check(b, a)
|
|
1401
|
+
|
|
1402
|
+
def test_15(self):
|
|
1403
|
+
b = "(i for i in d.keys())"
|
|
1404
|
+
a = "(i for i in list(d.keys()))"
|
|
1405
|
+
self.check(b, a)
|
|
1406
|
+
|
|
1407
|
+
def test_16(self):
|
|
1408
|
+
b = "(i for i in d.iterkeys())"
|
|
1409
|
+
a = "(i for i in d.keys())"
|
|
1410
|
+
self.check(b, a)
|
|
1411
|
+
|
|
1412
|
+
def test_17(self):
|
|
1413
|
+
b = "iter(d.iterkeys())"
|
|
1414
|
+
a = "iter(d.keys())"
|
|
1415
|
+
self.check(b, a)
|
|
1416
|
+
|
|
1417
|
+
def test_18(self):
|
|
1418
|
+
b = "list(d.iterkeys())"
|
|
1419
|
+
a = "list(d.keys())"
|
|
1420
|
+
self.check(b, a)
|
|
1421
|
+
|
|
1422
|
+
def test_19(self):
|
|
1423
|
+
b = "sorted(d.iterkeys())"
|
|
1424
|
+
a = "sorted(d.keys())"
|
|
1425
|
+
self.check(b, a)
|
|
1426
|
+
|
|
1427
|
+
def test_20(self):
|
|
1428
|
+
b = "foo(d.iterkeys())"
|
|
1429
|
+
a = "foo(iter(d.keys()))"
|
|
1430
|
+
self.check(b, a)
|
|
1431
|
+
|
|
1432
|
+
def test_21(self):
|
|
1433
|
+
b = "print h.iterkeys().next()"
|
|
1434
|
+
a = "print iter(h.keys()).next()"
|
|
1435
|
+
self.check(b, a)
|
|
1436
|
+
|
|
1437
|
+
def test_22(self):
|
|
1438
|
+
b = "print h.keys()[0]"
|
|
1439
|
+
a = "print list(h.keys())[0]"
|
|
1440
|
+
self.check(b, a)
|
|
1441
|
+
|
|
1442
|
+
def test_23(self):
|
|
1443
|
+
b = "print list(h.iterkeys().next())"
|
|
1444
|
+
a = "print list(iter(h.keys()).next())"
|
|
1445
|
+
self.check(b, a)
|
|
1446
|
+
|
|
1447
|
+
def test_24(self):
|
|
1448
|
+
b = "for x in h.keys()[0]: print x"
|
|
1449
|
+
a = "for x in list(h.keys())[0]: print x"
|
|
1450
|
+
self.check(b, a)
|
|
1451
|
+
|
|
1452
|
+
def test_25(self):
|
|
1453
|
+
b = "d.viewkeys()"
|
|
1454
|
+
a = "d.keys()"
|
|
1455
|
+
self.check(b, a)
|
|
1456
|
+
|
|
1457
|
+
def test_26(self):
|
|
1458
|
+
b = "d.viewitems()"
|
|
1459
|
+
a = "d.items()"
|
|
1460
|
+
self.check(b, a)
|
|
1461
|
+
|
|
1462
|
+
def test_27(self):
|
|
1463
|
+
b = "d.viewvalues()"
|
|
1464
|
+
a = "d.values()"
|
|
1465
|
+
self.check(b, a)
|
|
1466
|
+
|
|
1467
|
+
def test_28(self):
|
|
1468
|
+
b = "[i for i in d.viewkeys()]"
|
|
1469
|
+
a = "[i for i in d.keys()]"
|
|
1470
|
+
self.check(b, a)
|
|
1471
|
+
|
|
1472
|
+
def test_29(self):
|
|
1473
|
+
b = "(i for i in d.viewkeys())"
|
|
1474
|
+
a = "(i for i in d.keys())"
|
|
1475
|
+
self.check(b, a)
|
|
1476
|
+
|
|
1477
|
+
def test_30(self):
|
|
1478
|
+
b = "iter(d.viewkeys())"
|
|
1479
|
+
a = "iter(d.keys())"
|
|
1480
|
+
self.check(b, a)
|
|
1481
|
+
|
|
1482
|
+
def test_31(self):
|
|
1483
|
+
b = "list(d.viewkeys())"
|
|
1484
|
+
a = "list(d.keys())"
|
|
1485
|
+
self.check(b, a)
|
|
1486
|
+
|
|
1487
|
+
def test_32(self):
|
|
1488
|
+
b = "sorted(d.viewkeys())"
|
|
1489
|
+
a = "sorted(d.keys())"
|
|
1490
|
+
self.check(b, a)
|
|
1491
|
+
|
|
1492
|
+
class Test_xrange(FixerTestCase):
|
|
1493
|
+
fixer = "xrange"
|
|
1494
|
+
|
|
1495
|
+
def test_prefix_preservation(self):
|
|
1496
|
+
b = """x = xrange( 10 )"""
|
|
1497
|
+
a = """x = range( 10 )"""
|
|
1498
|
+
self.check(b, a)
|
|
1499
|
+
|
|
1500
|
+
b = """x = xrange( 1 , 10 )"""
|
|
1501
|
+
a = """x = range( 1 , 10 )"""
|
|
1502
|
+
self.check(b, a)
|
|
1503
|
+
|
|
1504
|
+
b = """x = xrange( 0 , 10 , 2 )"""
|
|
1505
|
+
a = """x = range( 0 , 10 , 2 )"""
|
|
1506
|
+
self.check(b, a)
|
|
1507
|
+
|
|
1508
|
+
def test_single_arg(self):
|
|
1509
|
+
b = """x = xrange(10)"""
|
|
1510
|
+
a = """x = range(10)"""
|
|
1511
|
+
self.check(b, a)
|
|
1512
|
+
|
|
1513
|
+
def test_two_args(self):
|
|
1514
|
+
b = """x = xrange(1, 10)"""
|
|
1515
|
+
a = """x = range(1, 10)"""
|
|
1516
|
+
self.check(b, a)
|
|
1517
|
+
|
|
1518
|
+
def test_three_args(self):
|
|
1519
|
+
b = """x = xrange(0, 10, 2)"""
|
|
1520
|
+
a = """x = range(0, 10, 2)"""
|
|
1521
|
+
self.check(b, a)
|
|
1522
|
+
|
|
1523
|
+
def test_wrap_in_list(self):
|
|
1524
|
+
b = """x = range(10, 3, 9)"""
|
|
1525
|
+
a = """x = list(range(10, 3, 9))"""
|
|
1526
|
+
self.check(b, a)
|
|
1527
|
+
|
|
1528
|
+
b = """x = foo(range(10, 3, 9))"""
|
|
1529
|
+
a = """x = foo(list(range(10, 3, 9)))"""
|
|
1530
|
+
self.check(b, a)
|
|
1531
|
+
|
|
1532
|
+
b = """x = range(10, 3, 9) + [4]"""
|
|
1533
|
+
a = """x = list(range(10, 3, 9)) + [4]"""
|
|
1534
|
+
self.check(b, a)
|
|
1535
|
+
|
|
1536
|
+
b = """x = range(10)[::-1]"""
|
|
1537
|
+
a = """x = list(range(10))[::-1]"""
|
|
1538
|
+
self.check(b, a)
|
|
1539
|
+
|
|
1540
|
+
b = """x = range(10) [3]"""
|
|
1541
|
+
a = """x = list(range(10)) [3]"""
|
|
1542
|
+
self.check(b, a)
|
|
1543
|
+
|
|
1544
|
+
def test_xrange_in_for(self):
|
|
1545
|
+
b = """for i in xrange(10):\n j=i"""
|
|
1546
|
+
a = """for i in range(10):\n j=i"""
|
|
1547
|
+
self.check(b, a)
|
|
1548
|
+
|
|
1549
|
+
b = """[i for i in xrange(10)]"""
|
|
1550
|
+
a = """[i for i in range(10)]"""
|
|
1551
|
+
self.check(b, a)
|
|
1552
|
+
|
|
1553
|
+
def test_range_in_for(self):
|
|
1554
|
+
self.unchanged("for i in range(10): pass")
|
|
1555
|
+
self.unchanged("[i for i in range(10)]")
|
|
1556
|
+
|
|
1557
|
+
def test_in_contains_test(self):
|
|
1558
|
+
self.unchanged("x in range(10, 3, 9)")
|
|
1559
|
+
|
|
1560
|
+
def test_in_consuming_context(self):
|
|
1561
|
+
for call in fixer_util.consuming_calls:
|
|
1562
|
+
self.unchanged("a = %s(range(10))" % call)
|
|
1563
|
+
|
|
1564
|
+
class Test_xrange_with_reduce(FixerTestCase):
|
|
1565
|
+
|
|
1566
|
+
def setUp(self):
|
|
1567
|
+
super(Test_xrange_with_reduce, self).setUp(["xrange", "reduce"])
|
|
1568
|
+
|
|
1569
|
+
def test_double_transform(self):
|
|
1570
|
+
b = """reduce(x, xrange(5))"""
|
|
1571
|
+
a = """from functools import reduce
|
|
1572
|
+
reduce(x, range(5))"""
|
|
1573
|
+
self.check(b, a)
|
|
1574
|
+
|
|
1575
|
+
class Test_raw_input(FixerTestCase):
|
|
1576
|
+
fixer = "raw_input"
|
|
1577
|
+
|
|
1578
|
+
def test_prefix_preservation(self):
|
|
1579
|
+
b = """x = raw_input( )"""
|
|
1580
|
+
a = """x = input( )"""
|
|
1581
|
+
self.check(b, a)
|
|
1582
|
+
|
|
1583
|
+
b = """x = raw_input( '' )"""
|
|
1584
|
+
a = """x = input( '' )"""
|
|
1585
|
+
self.check(b, a)
|
|
1586
|
+
|
|
1587
|
+
def test_1(self):
|
|
1588
|
+
b = """x = raw_input()"""
|
|
1589
|
+
a = """x = input()"""
|
|
1590
|
+
self.check(b, a)
|
|
1591
|
+
|
|
1592
|
+
def test_2(self):
|
|
1593
|
+
b = """x = raw_input('')"""
|
|
1594
|
+
a = """x = input('')"""
|
|
1595
|
+
self.check(b, a)
|
|
1596
|
+
|
|
1597
|
+
def test_3(self):
|
|
1598
|
+
b = """x = raw_input('prompt')"""
|
|
1599
|
+
a = """x = input('prompt')"""
|
|
1600
|
+
self.check(b, a)
|
|
1601
|
+
|
|
1602
|
+
def test_4(self):
|
|
1603
|
+
b = """x = raw_input(foo(a) + 6)"""
|
|
1604
|
+
a = """x = input(foo(a) + 6)"""
|
|
1605
|
+
self.check(b, a)
|
|
1606
|
+
|
|
1607
|
+
def test_5(self):
|
|
1608
|
+
b = """x = raw_input(invite).split()"""
|
|
1609
|
+
a = """x = input(invite).split()"""
|
|
1610
|
+
self.check(b, a)
|
|
1611
|
+
|
|
1612
|
+
def test_6(self):
|
|
1613
|
+
b = """x = raw_input(invite) . split ()"""
|
|
1614
|
+
a = """x = input(invite) . split ()"""
|
|
1615
|
+
self.check(b, a)
|
|
1616
|
+
|
|
1617
|
+
def test_8(self):
|
|
1618
|
+
b = "x = int(raw_input())"
|
|
1619
|
+
a = "x = int(input())"
|
|
1620
|
+
self.check(b, a)
|
|
1621
|
+
|
|
1622
|
+
class Test_funcattrs(FixerTestCase):
|
|
1623
|
+
fixer = "funcattrs"
|
|
1624
|
+
|
|
1625
|
+
attrs = ["closure", "doc", "name", "defaults", "code", "globals", "dict"]
|
|
1626
|
+
|
|
1627
|
+
def test(self):
|
|
1628
|
+
for attr in self.attrs:
|
|
1629
|
+
b = "a.func_%s" % attr
|
|
1630
|
+
a = "a.__%s__" % attr
|
|
1631
|
+
self.check(b, a)
|
|
1632
|
+
|
|
1633
|
+
b = "self.foo.func_%s.foo_bar" % attr
|
|
1634
|
+
a = "self.foo.__%s__.foo_bar" % attr
|
|
1635
|
+
self.check(b, a)
|
|
1636
|
+
|
|
1637
|
+
def test_unchanged(self):
|
|
1638
|
+
for attr in self.attrs:
|
|
1639
|
+
s = "foo(func_%s + 5)" % attr
|
|
1640
|
+
self.unchanged(s)
|
|
1641
|
+
|
|
1642
|
+
s = "f(foo.__%s__)" % attr
|
|
1643
|
+
self.unchanged(s)
|
|
1644
|
+
|
|
1645
|
+
s = "f(foo.__%s__.foo)" % attr
|
|
1646
|
+
self.unchanged(s)
|
|
1647
|
+
|
|
1648
|
+
class Test_xreadlines(FixerTestCase):
|
|
1649
|
+
fixer = "xreadlines"
|
|
1650
|
+
|
|
1651
|
+
def test_call(self):
|
|
1652
|
+
b = "for x in f.xreadlines(): pass"
|
|
1653
|
+
a = "for x in f: pass"
|
|
1654
|
+
self.check(b, a)
|
|
1655
|
+
|
|
1656
|
+
b = "for x in foo().xreadlines(): pass"
|
|
1657
|
+
a = "for x in foo(): pass"
|
|
1658
|
+
self.check(b, a)
|
|
1659
|
+
|
|
1660
|
+
b = "for x in (5 + foo()).xreadlines(): pass"
|
|
1661
|
+
a = "for x in (5 + foo()): pass"
|
|
1662
|
+
self.check(b, a)
|
|
1663
|
+
|
|
1664
|
+
def test_attr_ref(self):
|
|
1665
|
+
b = "foo(f.xreadlines + 5)"
|
|
1666
|
+
a = "foo(f.__iter__ + 5)"
|
|
1667
|
+
self.check(b, a)
|
|
1668
|
+
|
|
1669
|
+
b = "foo(f().xreadlines + 5)"
|
|
1670
|
+
a = "foo(f().__iter__ + 5)"
|
|
1671
|
+
self.check(b, a)
|
|
1672
|
+
|
|
1673
|
+
b = "foo((5 + f()).xreadlines + 5)"
|
|
1674
|
+
a = "foo((5 + f()).__iter__ + 5)"
|
|
1675
|
+
self.check(b, a)
|
|
1676
|
+
|
|
1677
|
+
def test_unchanged(self):
|
|
1678
|
+
s = "for x in f.xreadlines(5): pass"
|
|
1679
|
+
self.unchanged(s)
|
|
1680
|
+
|
|
1681
|
+
s = "for x in f.xreadlines(k=5): pass"
|
|
1682
|
+
self.unchanged(s)
|
|
1683
|
+
|
|
1684
|
+
s = "for x in f.xreadlines(*k, **v): pass"
|
|
1685
|
+
self.unchanged(s)
|
|
1686
|
+
|
|
1687
|
+
s = "foo(xreadlines)"
|
|
1688
|
+
self.unchanged(s)
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
class ImportsFixerTests:
|
|
1692
|
+
|
|
1693
|
+
def test_import_module(self):
|
|
1694
|
+
for old, new in self.modules.items():
|
|
1695
|
+
b = "import %s" % old
|
|
1696
|
+
a = "import %s" % new
|
|
1697
|
+
self.check(b, a)
|
|
1698
|
+
|
|
1699
|
+
b = "import foo, %s, bar" % old
|
|
1700
|
+
a = "import foo, %s, bar" % new
|
|
1701
|
+
self.check(b, a)
|
|
1702
|
+
|
|
1703
|
+
def test_import_from(self):
|
|
1704
|
+
for old, new in self.modules.items():
|
|
1705
|
+
b = "from %s import foo" % old
|
|
1706
|
+
a = "from %s import foo" % new
|
|
1707
|
+
self.check(b, a)
|
|
1708
|
+
|
|
1709
|
+
b = "from %s import foo, bar" % old
|
|
1710
|
+
a = "from %s import foo, bar" % new
|
|
1711
|
+
self.check(b, a)
|
|
1712
|
+
|
|
1713
|
+
b = "from %s import (yes, no)" % old
|
|
1714
|
+
a = "from %s import (yes, no)" % new
|
|
1715
|
+
self.check(b, a)
|
|
1716
|
+
|
|
1717
|
+
def test_import_module_as(self):
|
|
1718
|
+
for old, new in self.modules.items():
|
|
1719
|
+
b = "import %s as foo_bar" % old
|
|
1720
|
+
a = "import %s as foo_bar" % new
|
|
1721
|
+
self.check(b, a)
|
|
1722
|
+
|
|
1723
|
+
b = "import %s as foo_bar" % old
|
|
1724
|
+
a = "import %s as foo_bar" % new
|
|
1725
|
+
self.check(b, a)
|
|
1726
|
+
|
|
1727
|
+
def test_import_from_as(self):
|
|
1728
|
+
for old, new in self.modules.items():
|
|
1729
|
+
b = "from %s import foo as bar" % old
|
|
1730
|
+
a = "from %s import foo as bar" % new
|
|
1731
|
+
self.check(b, a)
|
|
1732
|
+
|
|
1733
|
+
def test_star(self):
|
|
1734
|
+
for old, new in self.modules.items():
|
|
1735
|
+
b = "from %s import *" % old
|
|
1736
|
+
a = "from %s import *" % new
|
|
1737
|
+
self.check(b, a)
|
|
1738
|
+
|
|
1739
|
+
def test_import_module_usage(self):
|
|
1740
|
+
for old, new in self.modules.items():
|
|
1741
|
+
b = """
|
|
1742
|
+
import %s
|
|
1743
|
+
foo(%s.bar)
|
|
1744
|
+
""" % (old, old)
|
|
1745
|
+
a = """
|
|
1746
|
+
import %s
|
|
1747
|
+
foo(%s.bar)
|
|
1748
|
+
""" % (new, new)
|
|
1749
|
+
self.check(b, a)
|
|
1750
|
+
|
|
1751
|
+
b = """
|
|
1752
|
+
from %s import x
|
|
1753
|
+
%s = 23
|
|
1754
|
+
""" % (old, old)
|
|
1755
|
+
a = """
|
|
1756
|
+
from %s import x
|
|
1757
|
+
%s = 23
|
|
1758
|
+
""" % (new, old)
|
|
1759
|
+
self.check(b, a)
|
|
1760
|
+
|
|
1761
|
+
s = """
|
|
1762
|
+
def f():
|
|
1763
|
+
%s.method()
|
|
1764
|
+
""" % (old,)
|
|
1765
|
+
self.unchanged(s)
|
|
1766
|
+
|
|
1767
|
+
# test nested usage
|
|
1768
|
+
b = """
|
|
1769
|
+
import %s
|
|
1770
|
+
%s.bar(%s.foo)
|
|
1771
|
+
""" % (old, old, old)
|
|
1772
|
+
a = """
|
|
1773
|
+
import %s
|
|
1774
|
+
%s.bar(%s.foo)
|
|
1775
|
+
""" % (new, new, new)
|
|
1776
|
+
self.check(b, a)
|
|
1777
|
+
|
|
1778
|
+
b = """
|
|
1779
|
+
import %s
|
|
1780
|
+
x.%s
|
|
1781
|
+
""" % (old, old)
|
|
1782
|
+
a = """
|
|
1783
|
+
import %s
|
|
1784
|
+
x.%s
|
|
1785
|
+
""" % (new, old)
|
|
1786
|
+
self.check(b, a)
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
class Test_imports(FixerTestCase, ImportsFixerTests):
|
|
1790
|
+
fixer = "imports"
|
|
1791
|
+
from ..fixes.fix_imports import MAPPING as modules
|
|
1792
|
+
|
|
1793
|
+
def test_multiple_imports(self):
|
|
1794
|
+
b = """import urlparse, cStringIO"""
|
|
1795
|
+
a = """import urllib.parse, io"""
|
|
1796
|
+
self.check(b, a)
|
|
1797
|
+
|
|
1798
|
+
def test_multiple_imports_as(self):
|
|
1799
|
+
b = """
|
|
1800
|
+
import copy_reg as bar, HTMLParser as foo, urlparse
|
|
1801
|
+
s = urlparse.spam(bar.foo())
|
|
1802
|
+
"""
|
|
1803
|
+
a = """
|
|
1804
|
+
import copyreg as bar, html.parser as foo, urllib.parse
|
|
1805
|
+
s = urllib.parse.spam(bar.foo())
|
|
1806
|
+
"""
|
|
1807
|
+
self.check(b, a)
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
class Test_imports2(FixerTestCase, ImportsFixerTests):
|
|
1811
|
+
fixer = "imports2"
|
|
1812
|
+
from ..fixes.fix_imports2 import MAPPING as modules
|
|
1813
|
+
|
|
1814
|
+
|
|
1815
|
+
class Test_imports_fixer_order(FixerTestCase, ImportsFixerTests):
|
|
1816
|
+
|
|
1817
|
+
def setUp(self):
|
|
1818
|
+
super(Test_imports_fixer_order, self).setUp(['imports', 'imports2'])
|
|
1819
|
+
from ..fixes.fix_imports2 import MAPPING as mapping2
|
|
1820
|
+
self.modules = mapping2.copy()
|
|
1821
|
+
from ..fixes.fix_imports import MAPPING as mapping1
|
|
1822
|
+
for key in ('dbhash', 'dumbdbm', 'dbm', 'gdbm'):
|
|
1823
|
+
self.modules[key] = mapping1[key]
|
|
1824
|
+
|
|
1825
|
+
def test_after_local_imports_refactoring(self):
|
|
1826
|
+
for fix in ("imports", "imports2"):
|
|
1827
|
+
self.fixer = fix
|
|
1828
|
+
self.assert_runs_after("import")
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
class Test_urllib(FixerTestCase):
|
|
1832
|
+
fixer = "urllib"
|
|
1833
|
+
from ..fixes.fix_urllib import MAPPING as modules
|
|
1834
|
+
|
|
1835
|
+
def test_import_module(self):
|
|
1836
|
+
for old, changes in self.modules.items():
|
|
1837
|
+
b = "import %s" % old
|
|
1838
|
+
a = "import %s" % ", ".join(map(itemgetter(0), changes))
|
|
1839
|
+
self.check(b, a)
|
|
1840
|
+
|
|
1841
|
+
def test_import_from(self):
|
|
1842
|
+
for old, changes in self.modules.items():
|
|
1843
|
+
all_members = []
|
|
1844
|
+
for new, members in changes:
|
|
1845
|
+
for member in members:
|
|
1846
|
+
all_members.append(member)
|
|
1847
|
+
b = "from %s import %s" % (old, member)
|
|
1848
|
+
a = "from %s import %s" % (new, member)
|
|
1849
|
+
self.check(b, a)
|
|
1850
|
+
|
|
1851
|
+
s = "from foo import %s" % member
|
|
1852
|
+
self.unchanged(s)
|
|
1853
|
+
|
|
1854
|
+
b = "from %s import %s" % (old, ", ".join(members))
|
|
1855
|
+
a = "from %s import %s" % (new, ", ".join(members))
|
|
1856
|
+
self.check(b, a)
|
|
1857
|
+
|
|
1858
|
+
s = "from foo import %s" % ", ".join(members)
|
|
1859
|
+
self.unchanged(s)
|
|
1860
|
+
|
|
1861
|
+
# test the breaking of a module into multiple replacements
|
|
1862
|
+
b = "from %s import %s" % (old, ", ".join(all_members))
|
|
1863
|
+
a = "\n".join(["from %s import %s" % (new, ", ".join(members))
|
|
1864
|
+
for (new, members) in changes])
|
|
1865
|
+
self.check(b, a)
|
|
1866
|
+
|
|
1867
|
+
def test_import_module_as(self):
|
|
1868
|
+
for old in self.modules:
|
|
1869
|
+
s = "import %s as foo" % old
|
|
1870
|
+
self.warns_unchanged(s, "This module is now multiple modules")
|
|
1871
|
+
|
|
1872
|
+
def test_import_from_as(self):
|
|
1873
|
+
for old, changes in self.modules.items():
|
|
1874
|
+
for new, members in changes:
|
|
1875
|
+
for member in members:
|
|
1876
|
+
b = "from %s import %s as foo_bar" % (old, member)
|
|
1877
|
+
a = "from %s import %s as foo_bar" % (new, member)
|
|
1878
|
+
self.check(b, a)
|
|
1879
|
+
b = "from %s import %s as blah, %s" % (old, member, member)
|
|
1880
|
+
a = "from %s import %s as blah, %s" % (new, member, member)
|
|
1881
|
+
self.check(b, a)
|
|
1882
|
+
|
|
1883
|
+
def test_star(self):
|
|
1884
|
+
for old in self.modules:
|
|
1885
|
+
s = "from %s import *" % old
|
|
1886
|
+
self.warns_unchanged(s, "Cannot handle star imports")
|
|
1887
|
+
|
|
1888
|
+
def test_indented(self):
|
|
1889
|
+
b = """
|
|
1890
|
+
def foo():
|
|
1891
|
+
from urllib import urlencode, urlopen
|
|
1892
|
+
"""
|
|
1893
|
+
a = """
|
|
1894
|
+
def foo():
|
|
1895
|
+
from urllib.parse import urlencode
|
|
1896
|
+
from urllib.request import urlopen
|
|
1897
|
+
"""
|
|
1898
|
+
self.check(b, a)
|
|
1899
|
+
|
|
1900
|
+
b = """
|
|
1901
|
+
def foo():
|
|
1902
|
+
other()
|
|
1903
|
+
from urllib import urlencode, urlopen
|
|
1904
|
+
"""
|
|
1905
|
+
a = """
|
|
1906
|
+
def foo():
|
|
1907
|
+
other()
|
|
1908
|
+
from urllib.parse import urlencode
|
|
1909
|
+
from urllib.request import urlopen
|
|
1910
|
+
"""
|
|
1911
|
+
self.check(b, a)
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
def test_import_module_usage(self):
|
|
1916
|
+
for old, changes in self.modules.items():
|
|
1917
|
+
for new, members in changes:
|
|
1918
|
+
for member in members:
|
|
1919
|
+
new_import = ", ".join([n for (n, mems)
|
|
1920
|
+
in self.modules[old]])
|
|
1921
|
+
b = """
|
|
1922
|
+
import %s
|
|
1923
|
+
foo(%s.%s)
|
|
1924
|
+
""" % (old, old, member)
|
|
1925
|
+
a = """
|
|
1926
|
+
import %s
|
|
1927
|
+
foo(%s.%s)
|
|
1928
|
+
""" % (new_import, new, member)
|
|
1929
|
+
self.check(b, a)
|
|
1930
|
+
b = """
|
|
1931
|
+
import %s
|
|
1932
|
+
%s.%s(%s.%s)
|
|
1933
|
+
""" % (old, old, member, old, member)
|
|
1934
|
+
a = """
|
|
1935
|
+
import %s
|
|
1936
|
+
%s.%s(%s.%s)
|
|
1937
|
+
""" % (new_import, new, member, new, member)
|
|
1938
|
+
self.check(b, a)
|
|
1939
|
+
|
|
1940
|
+
|
|
1941
|
+
class Test_input(FixerTestCase):
|
|
1942
|
+
fixer = "input"
|
|
1943
|
+
|
|
1944
|
+
def test_prefix_preservation(self):
|
|
1945
|
+
b = """x = input( )"""
|
|
1946
|
+
a = """x = eval(input( ))"""
|
|
1947
|
+
self.check(b, a)
|
|
1948
|
+
|
|
1949
|
+
b = """x = input( '' )"""
|
|
1950
|
+
a = """x = eval(input( '' ))"""
|
|
1951
|
+
self.check(b, a)
|
|
1952
|
+
|
|
1953
|
+
def test_trailing_comment(self):
|
|
1954
|
+
b = """x = input() # foo"""
|
|
1955
|
+
a = """x = eval(input()) # foo"""
|
|
1956
|
+
self.check(b, a)
|
|
1957
|
+
|
|
1958
|
+
def test_idempotency(self):
|
|
1959
|
+
s = """x = eval(input())"""
|
|
1960
|
+
self.unchanged(s)
|
|
1961
|
+
|
|
1962
|
+
s = """x = eval(input(''))"""
|
|
1963
|
+
self.unchanged(s)
|
|
1964
|
+
|
|
1965
|
+
s = """x = eval(input(foo(5) + 9))"""
|
|
1966
|
+
self.unchanged(s)
|
|
1967
|
+
|
|
1968
|
+
def test_1(self):
|
|
1969
|
+
b = """x = input()"""
|
|
1970
|
+
a = """x = eval(input())"""
|
|
1971
|
+
self.check(b, a)
|
|
1972
|
+
|
|
1973
|
+
def test_2(self):
|
|
1974
|
+
b = """x = input('')"""
|
|
1975
|
+
a = """x = eval(input(''))"""
|
|
1976
|
+
self.check(b, a)
|
|
1977
|
+
|
|
1978
|
+
def test_3(self):
|
|
1979
|
+
b = """x = input('prompt')"""
|
|
1980
|
+
a = """x = eval(input('prompt'))"""
|
|
1981
|
+
self.check(b, a)
|
|
1982
|
+
|
|
1983
|
+
def test_4(self):
|
|
1984
|
+
b = """x = input(foo(5) + 9)"""
|
|
1985
|
+
a = """x = eval(input(foo(5) + 9))"""
|
|
1986
|
+
self.check(b, a)
|
|
1987
|
+
|
|
1988
|
+
class Test_tuple_params(FixerTestCase):
|
|
1989
|
+
fixer = "tuple_params"
|
|
1990
|
+
|
|
1991
|
+
def test_unchanged_1(self):
|
|
1992
|
+
s = """def foo(): pass"""
|
|
1993
|
+
self.unchanged(s)
|
|
1994
|
+
|
|
1995
|
+
def test_unchanged_2(self):
|
|
1996
|
+
s = """def foo(a, b, c): pass"""
|
|
1997
|
+
self.unchanged(s)
|
|
1998
|
+
|
|
1999
|
+
def test_unchanged_3(self):
|
|
2000
|
+
s = """def foo(a=3, b=4, c=5): pass"""
|
|
2001
|
+
self.unchanged(s)
|
|
2002
|
+
|
|
2003
|
+
def test_1(self):
|
|
2004
|
+
b = """
|
|
2005
|
+
def foo(((a, b), c)):
|
|
2006
|
+
x = 5"""
|
|
2007
|
+
|
|
2008
|
+
a = """
|
|
2009
|
+
def foo(xxx_todo_changeme):
|
|
2010
|
+
((a, b), c) = xxx_todo_changeme
|
|
2011
|
+
x = 5"""
|
|
2012
|
+
self.check(b, a)
|
|
2013
|
+
|
|
2014
|
+
def test_2(self):
|
|
2015
|
+
b = """
|
|
2016
|
+
def foo(((a, b), c), d):
|
|
2017
|
+
x = 5"""
|
|
2018
|
+
|
|
2019
|
+
a = """
|
|
2020
|
+
def foo(xxx_todo_changeme, d):
|
|
2021
|
+
((a, b), c) = xxx_todo_changeme
|
|
2022
|
+
x = 5"""
|
|
2023
|
+
self.check(b, a)
|
|
2024
|
+
|
|
2025
|
+
def test_3(self):
|
|
2026
|
+
b = """
|
|
2027
|
+
def foo(((a, b), c), d) -> e:
|
|
2028
|
+
x = 5"""
|
|
2029
|
+
|
|
2030
|
+
a = """
|
|
2031
|
+
def foo(xxx_todo_changeme, d) -> e:
|
|
2032
|
+
((a, b), c) = xxx_todo_changeme
|
|
2033
|
+
x = 5"""
|
|
2034
|
+
self.check(b, a)
|
|
2035
|
+
|
|
2036
|
+
def test_semicolon(self):
|
|
2037
|
+
b = """
|
|
2038
|
+
def foo(((a, b), c)): x = 5; y = 7"""
|
|
2039
|
+
|
|
2040
|
+
a = """
|
|
2041
|
+
def foo(xxx_todo_changeme): ((a, b), c) = xxx_todo_changeme; x = 5; y = 7"""
|
|
2042
|
+
self.check(b, a)
|
|
2043
|
+
|
|
2044
|
+
def test_keywords(self):
|
|
2045
|
+
b = """
|
|
2046
|
+
def foo(((a, b), c), d, e=5) -> z:
|
|
2047
|
+
x = 5"""
|
|
2048
|
+
|
|
2049
|
+
a = """
|
|
2050
|
+
def foo(xxx_todo_changeme, d, e=5) -> z:
|
|
2051
|
+
((a, b), c) = xxx_todo_changeme
|
|
2052
|
+
x = 5"""
|
|
2053
|
+
self.check(b, a)
|
|
2054
|
+
|
|
2055
|
+
def test_varargs(self):
|
|
2056
|
+
b = """
|
|
2057
|
+
def foo(((a, b), c), d, *vargs, **kwargs) -> z:
|
|
2058
|
+
x = 5"""
|
|
2059
|
+
|
|
2060
|
+
a = """
|
|
2061
|
+
def foo(xxx_todo_changeme, d, *vargs, **kwargs) -> z:
|
|
2062
|
+
((a, b), c) = xxx_todo_changeme
|
|
2063
|
+
x = 5"""
|
|
2064
|
+
self.check(b, a)
|
|
2065
|
+
|
|
2066
|
+
def test_multi_1(self):
|
|
2067
|
+
b = """
|
|
2068
|
+
def foo(((a, b), c), (d, e, f)) -> z:
|
|
2069
|
+
x = 5"""
|
|
2070
|
+
|
|
2071
|
+
a = """
|
|
2072
|
+
def foo(xxx_todo_changeme, xxx_todo_changeme1) -> z:
|
|
2073
|
+
((a, b), c) = xxx_todo_changeme
|
|
2074
|
+
(d, e, f) = xxx_todo_changeme1
|
|
2075
|
+
x = 5"""
|
|
2076
|
+
self.check(b, a)
|
|
2077
|
+
|
|
2078
|
+
def test_multi_2(self):
|
|
2079
|
+
b = """
|
|
2080
|
+
def foo(x, ((a, b), c), d, (e, f, g), y) -> z:
|
|
2081
|
+
x = 5"""
|
|
2082
|
+
|
|
2083
|
+
a = """
|
|
2084
|
+
def foo(x, xxx_todo_changeme, d, xxx_todo_changeme1, y) -> z:
|
|
2085
|
+
((a, b), c) = xxx_todo_changeme
|
|
2086
|
+
(e, f, g) = xxx_todo_changeme1
|
|
2087
|
+
x = 5"""
|
|
2088
|
+
self.check(b, a)
|
|
2089
|
+
|
|
2090
|
+
def test_docstring(self):
|
|
2091
|
+
b = """
|
|
2092
|
+
def foo(((a, b), c), (d, e, f)) -> z:
|
|
2093
|
+
"foo foo foo foo"
|
|
2094
|
+
x = 5"""
|
|
2095
|
+
|
|
2096
|
+
a = """
|
|
2097
|
+
def foo(xxx_todo_changeme, xxx_todo_changeme1) -> z:
|
|
2098
|
+
"foo foo foo foo"
|
|
2099
|
+
((a, b), c) = xxx_todo_changeme
|
|
2100
|
+
(d, e, f) = xxx_todo_changeme1
|
|
2101
|
+
x = 5"""
|
|
2102
|
+
self.check(b, a)
|
|
2103
|
+
|
|
2104
|
+
def test_lambda_no_change(self):
|
|
2105
|
+
s = """lambda x: x + 5"""
|
|
2106
|
+
self.unchanged(s)
|
|
2107
|
+
|
|
2108
|
+
def test_lambda_parens_single_arg(self):
|
|
2109
|
+
b = """lambda (x): x + 5"""
|
|
2110
|
+
a = """lambda x: x + 5"""
|
|
2111
|
+
self.check(b, a)
|
|
2112
|
+
|
|
2113
|
+
b = """lambda(x): x + 5"""
|
|
2114
|
+
a = """lambda x: x + 5"""
|
|
2115
|
+
self.check(b, a)
|
|
2116
|
+
|
|
2117
|
+
b = """lambda ((((x)))): x + 5"""
|
|
2118
|
+
a = """lambda x: x + 5"""
|
|
2119
|
+
self.check(b, a)
|
|
2120
|
+
|
|
2121
|
+
b = """lambda((((x)))): x + 5"""
|
|
2122
|
+
a = """lambda x: x + 5"""
|
|
2123
|
+
self.check(b, a)
|
|
2124
|
+
|
|
2125
|
+
def test_lambda_simple(self):
|
|
2126
|
+
b = """lambda (x, y): x + f(y)"""
|
|
2127
|
+
a = """lambda x_y: x_y[0] + f(x_y[1])"""
|
|
2128
|
+
self.check(b, a)
|
|
2129
|
+
|
|
2130
|
+
b = """lambda(x, y): x + f(y)"""
|
|
2131
|
+
a = """lambda x_y: x_y[0] + f(x_y[1])"""
|
|
2132
|
+
self.check(b, a)
|
|
2133
|
+
|
|
2134
|
+
b = """lambda (((x, y))): x + f(y)"""
|
|
2135
|
+
a = """lambda x_y: x_y[0] + f(x_y[1])"""
|
|
2136
|
+
self.check(b, a)
|
|
2137
|
+
|
|
2138
|
+
b = """lambda(((x, y))): x + f(y)"""
|
|
2139
|
+
a = """lambda x_y: x_y[0] + f(x_y[1])"""
|
|
2140
|
+
self.check(b, a)
|
|
2141
|
+
|
|
2142
|
+
def test_lambda_one_tuple(self):
|
|
2143
|
+
b = """lambda (x,): x + f(x)"""
|
|
2144
|
+
a = """lambda x1: x1[0] + f(x1[0])"""
|
|
2145
|
+
self.check(b, a)
|
|
2146
|
+
|
|
2147
|
+
b = """lambda (((x,))): x + f(x)"""
|
|
2148
|
+
a = """lambda x1: x1[0] + f(x1[0])"""
|
|
2149
|
+
self.check(b, a)
|
|
2150
|
+
|
|
2151
|
+
def test_lambda_simple_multi_use(self):
|
|
2152
|
+
b = """lambda (x, y): x + x + f(x) + x"""
|
|
2153
|
+
a = """lambda x_y: x_y[0] + x_y[0] + f(x_y[0]) + x_y[0]"""
|
|
2154
|
+
self.check(b, a)
|
|
2155
|
+
|
|
2156
|
+
def test_lambda_simple_reverse(self):
|
|
2157
|
+
b = """lambda (x, y): y + x"""
|
|
2158
|
+
a = """lambda x_y: x_y[1] + x_y[0]"""
|
|
2159
|
+
self.check(b, a)
|
|
2160
|
+
|
|
2161
|
+
def test_lambda_nested(self):
|
|
2162
|
+
b = """lambda (x, (y, z)): x + y + z"""
|
|
2163
|
+
a = """lambda x_y_z: x_y_z[0] + x_y_z[1][0] + x_y_z[1][1]"""
|
|
2164
|
+
self.check(b, a)
|
|
2165
|
+
|
|
2166
|
+
b = """lambda (((x, (y, z)))): x + y + z"""
|
|
2167
|
+
a = """lambda x_y_z: x_y_z[0] + x_y_z[1][0] + x_y_z[1][1]"""
|
|
2168
|
+
self.check(b, a)
|
|
2169
|
+
|
|
2170
|
+
def test_lambda_nested_multi_use(self):
|
|
2171
|
+
b = """lambda (x, (y, z)): x + y + f(y)"""
|
|
2172
|
+
a = """lambda x_y_z: x_y_z[0] + x_y_z[1][0] + f(x_y_z[1][0])"""
|
|
2173
|
+
self.check(b, a)
|
|
2174
|
+
|
|
2175
|
+
class Test_methodattrs(FixerTestCase):
|
|
2176
|
+
fixer = "methodattrs"
|
|
2177
|
+
|
|
2178
|
+
attrs = ["func", "self", "class"]
|
|
2179
|
+
|
|
2180
|
+
def test(self):
|
|
2181
|
+
for attr in self.attrs:
|
|
2182
|
+
b = "a.im_%s" % attr
|
|
2183
|
+
if attr == "class":
|
|
2184
|
+
a = "a.__self__.__class__"
|
|
2185
|
+
else:
|
|
2186
|
+
a = "a.__%s__" % attr
|
|
2187
|
+
self.check(b, a)
|
|
2188
|
+
|
|
2189
|
+
b = "self.foo.im_%s.foo_bar" % attr
|
|
2190
|
+
if attr == "class":
|
|
2191
|
+
a = "self.foo.__self__.__class__.foo_bar"
|
|
2192
|
+
else:
|
|
2193
|
+
a = "self.foo.__%s__.foo_bar" % attr
|
|
2194
|
+
self.check(b, a)
|
|
2195
|
+
|
|
2196
|
+
def test_unchanged(self):
|
|
2197
|
+
for attr in self.attrs:
|
|
2198
|
+
s = "foo(im_%s + 5)" % attr
|
|
2199
|
+
self.unchanged(s)
|
|
2200
|
+
|
|
2201
|
+
s = "f(foo.__%s__)" % attr
|
|
2202
|
+
self.unchanged(s)
|
|
2203
|
+
|
|
2204
|
+
s = "f(foo.__%s__.foo)" % attr
|
|
2205
|
+
self.unchanged(s)
|
|
2206
|
+
|
|
2207
|
+
class Test_next(FixerTestCase):
|
|
2208
|
+
fixer = "next"
|
|
2209
|
+
|
|
2210
|
+
def test_1(self):
|
|
2211
|
+
b = """it.next()"""
|
|
2212
|
+
a = """next(it)"""
|
|
2213
|
+
self.check(b, a)
|
|
2214
|
+
|
|
2215
|
+
def test_2(self):
|
|
2216
|
+
b = """a.b.c.d.next()"""
|
|
2217
|
+
a = """next(a.b.c.d)"""
|
|
2218
|
+
self.check(b, a)
|
|
2219
|
+
|
|
2220
|
+
def test_3(self):
|
|
2221
|
+
b = """(a + b).next()"""
|
|
2222
|
+
a = """next((a + b))"""
|
|
2223
|
+
self.check(b, a)
|
|
2224
|
+
|
|
2225
|
+
def test_4(self):
|
|
2226
|
+
b = """a().next()"""
|
|
2227
|
+
a = """next(a())"""
|
|
2228
|
+
self.check(b, a)
|
|
2229
|
+
|
|
2230
|
+
def test_5(self):
|
|
2231
|
+
b = """a().next() + b"""
|
|
2232
|
+
a = """next(a()) + b"""
|
|
2233
|
+
self.check(b, a)
|
|
2234
|
+
|
|
2235
|
+
def test_6(self):
|
|
2236
|
+
b = """c( a().next() + b)"""
|
|
2237
|
+
a = """c( next(a()) + b)"""
|
|
2238
|
+
self.check(b, a)
|
|
2239
|
+
|
|
2240
|
+
def test_prefix_preservation_1(self):
|
|
2241
|
+
b = """
|
|
2242
|
+
for a in b:
|
|
2243
|
+
foo(a)
|
|
2244
|
+
a.next()
|
|
2245
|
+
"""
|
|
2246
|
+
a = """
|
|
2247
|
+
for a in b:
|
|
2248
|
+
foo(a)
|
|
2249
|
+
next(a)
|
|
2250
|
+
"""
|
|
2251
|
+
self.check(b, a)
|
|
2252
|
+
|
|
2253
|
+
def test_prefix_preservation_2(self):
|
|
2254
|
+
b = """
|
|
2255
|
+
for a in b:
|
|
2256
|
+
foo(a) # abc
|
|
2257
|
+
# def
|
|
2258
|
+
a.next()
|
|
2259
|
+
"""
|
|
2260
|
+
a = """
|
|
2261
|
+
for a in b:
|
|
2262
|
+
foo(a) # abc
|
|
2263
|
+
# def
|
|
2264
|
+
next(a)
|
|
2265
|
+
"""
|
|
2266
|
+
self.check(b, a)
|
|
2267
|
+
|
|
2268
|
+
def test_prefix_preservation_3(self):
|
|
2269
|
+
b = """
|
|
2270
|
+
next = 5
|
|
2271
|
+
for a in b:
|
|
2272
|
+
foo(a)
|
|
2273
|
+
a.next()
|
|
2274
|
+
"""
|
|
2275
|
+
a = """
|
|
2276
|
+
next = 5
|
|
2277
|
+
for a in b:
|
|
2278
|
+
foo(a)
|
|
2279
|
+
a.__next__()
|
|
2280
|
+
"""
|
|
2281
|
+
self.check(b, a, ignore_warnings=True)
|
|
2282
|
+
|
|
2283
|
+
def test_prefix_preservation_4(self):
|
|
2284
|
+
b = """
|
|
2285
|
+
next = 5
|
|
2286
|
+
for a in b:
|
|
2287
|
+
foo(a) # abc
|
|
2288
|
+
# def
|
|
2289
|
+
a.next()
|
|
2290
|
+
"""
|
|
2291
|
+
a = """
|
|
2292
|
+
next = 5
|
|
2293
|
+
for a in b:
|
|
2294
|
+
foo(a) # abc
|
|
2295
|
+
# def
|
|
2296
|
+
a.__next__()
|
|
2297
|
+
"""
|
|
2298
|
+
self.check(b, a, ignore_warnings=True)
|
|
2299
|
+
|
|
2300
|
+
def test_prefix_preservation_5(self):
|
|
2301
|
+
b = """
|
|
2302
|
+
next = 5
|
|
2303
|
+
for a in b:
|
|
2304
|
+
foo(foo(a), # abc
|
|
2305
|
+
a.next())
|
|
2306
|
+
"""
|
|
2307
|
+
a = """
|
|
2308
|
+
next = 5
|
|
2309
|
+
for a in b:
|
|
2310
|
+
foo(foo(a), # abc
|
|
2311
|
+
a.__next__())
|
|
2312
|
+
"""
|
|
2313
|
+
self.check(b, a, ignore_warnings=True)
|
|
2314
|
+
|
|
2315
|
+
def test_prefix_preservation_6(self):
|
|
2316
|
+
b = """
|
|
2317
|
+
for a in b:
|
|
2318
|
+
foo(foo(a), # abc
|
|
2319
|
+
a.next())
|
|
2320
|
+
"""
|
|
2321
|
+
a = """
|
|
2322
|
+
for a in b:
|
|
2323
|
+
foo(foo(a), # abc
|
|
2324
|
+
next(a))
|
|
2325
|
+
"""
|
|
2326
|
+
self.check(b, a)
|
|
2327
|
+
|
|
2328
|
+
def test_method_1(self):
|
|
2329
|
+
b = """
|
|
2330
|
+
class A:
|
|
2331
|
+
def next(self):
|
|
2332
|
+
pass
|
|
2333
|
+
"""
|
|
2334
|
+
a = """
|
|
2335
|
+
class A:
|
|
2336
|
+
def __next__(self):
|
|
2337
|
+
pass
|
|
2338
|
+
"""
|
|
2339
|
+
self.check(b, a)
|
|
2340
|
+
|
|
2341
|
+
def test_method_2(self):
|
|
2342
|
+
b = """
|
|
2343
|
+
class A(object):
|
|
2344
|
+
def next(self):
|
|
2345
|
+
pass
|
|
2346
|
+
"""
|
|
2347
|
+
a = """
|
|
2348
|
+
class A(object):
|
|
2349
|
+
def __next__(self):
|
|
2350
|
+
pass
|
|
2351
|
+
"""
|
|
2352
|
+
self.check(b, a)
|
|
2353
|
+
|
|
2354
|
+
def test_method_3(self):
|
|
2355
|
+
b = """
|
|
2356
|
+
class A:
|
|
2357
|
+
def next(x):
|
|
2358
|
+
pass
|
|
2359
|
+
"""
|
|
2360
|
+
a = """
|
|
2361
|
+
class A:
|
|
2362
|
+
def __next__(x):
|
|
2363
|
+
pass
|
|
2364
|
+
"""
|
|
2365
|
+
self.check(b, a)
|
|
2366
|
+
|
|
2367
|
+
def test_method_4(self):
|
|
2368
|
+
b = """
|
|
2369
|
+
class A:
|
|
2370
|
+
def __init__(self, foo):
|
|
2371
|
+
self.foo = foo
|
|
2372
|
+
|
|
2373
|
+
def next(self):
|
|
2374
|
+
pass
|
|
2375
|
+
|
|
2376
|
+
def __iter__(self):
|
|
2377
|
+
return self
|
|
2378
|
+
"""
|
|
2379
|
+
a = """
|
|
2380
|
+
class A:
|
|
2381
|
+
def __init__(self, foo):
|
|
2382
|
+
self.foo = foo
|
|
2383
|
+
|
|
2384
|
+
def __next__(self):
|
|
2385
|
+
pass
|
|
2386
|
+
|
|
2387
|
+
def __iter__(self):
|
|
2388
|
+
return self
|
|
2389
|
+
"""
|
|
2390
|
+
self.check(b, a)
|
|
2391
|
+
|
|
2392
|
+
def test_method_unchanged(self):
|
|
2393
|
+
s = """
|
|
2394
|
+
class A:
|
|
2395
|
+
def next(self, a, b):
|
|
2396
|
+
pass
|
|
2397
|
+
"""
|
|
2398
|
+
self.unchanged(s)
|
|
2399
|
+
|
|
2400
|
+
def test_shadowing_assign_simple(self):
|
|
2401
|
+
s = """
|
|
2402
|
+
next = foo
|
|
2403
|
+
|
|
2404
|
+
class A:
|
|
2405
|
+
def next(self, a, b):
|
|
2406
|
+
pass
|
|
2407
|
+
"""
|
|
2408
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2409
|
+
|
|
2410
|
+
def test_shadowing_assign_tuple_1(self):
|
|
2411
|
+
s = """
|
|
2412
|
+
(next, a) = foo
|
|
2413
|
+
|
|
2414
|
+
class A:
|
|
2415
|
+
def next(self, a, b):
|
|
2416
|
+
pass
|
|
2417
|
+
"""
|
|
2418
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2419
|
+
|
|
2420
|
+
def test_shadowing_assign_tuple_2(self):
|
|
2421
|
+
s = """
|
|
2422
|
+
(a, (b, (next, c)), a) = foo
|
|
2423
|
+
|
|
2424
|
+
class A:
|
|
2425
|
+
def next(self, a, b):
|
|
2426
|
+
pass
|
|
2427
|
+
"""
|
|
2428
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2429
|
+
|
|
2430
|
+
def test_shadowing_assign_list_1(self):
|
|
2431
|
+
s = """
|
|
2432
|
+
[next, a] = foo
|
|
2433
|
+
|
|
2434
|
+
class A:
|
|
2435
|
+
def next(self, a, b):
|
|
2436
|
+
pass
|
|
2437
|
+
"""
|
|
2438
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2439
|
+
|
|
2440
|
+
def test_shadowing_assign_list_2(self):
|
|
2441
|
+
s = """
|
|
2442
|
+
[a, [b, [next, c]], a] = foo
|
|
2443
|
+
|
|
2444
|
+
class A:
|
|
2445
|
+
def next(self, a, b):
|
|
2446
|
+
pass
|
|
2447
|
+
"""
|
|
2448
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2449
|
+
|
|
2450
|
+
def test_builtin_assign(self):
|
|
2451
|
+
s = """
|
|
2452
|
+
def foo():
|
|
2453
|
+
__builtin__.next = foo
|
|
2454
|
+
|
|
2455
|
+
class A:
|
|
2456
|
+
def next(self, a, b):
|
|
2457
|
+
pass
|
|
2458
|
+
"""
|
|
2459
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2460
|
+
|
|
2461
|
+
def test_builtin_assign_in_tuple(self):
|
|
2462
|
+
s = """
|
|
2463
|
+
def foo():
|
|
2464
|
+
(a, __builtin__.next) = foo
|
|
2465
|
+
|
|
2466
|
+
class A:
|
|
2467
|
+
def next(self, a, b):
|
|
2468
|
+
pass
|
|
2469
|
+
"""
|
|
2470
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2471
|
+
|
|
2472
|
+
def test_builtin_assign_in_list(self):
|
|
2473
|
+
s = """
|
|
2474
|
+
def foo():
|
|
2475
|
+
[a, __builtin__.next] = foo
|
|
2476
|
+
|
|
2477
|
+
class A:
|
|
2478
|
+
def next(self, a, b):
|
|
2479
|
+
pass
|
|
2480
|
+
"""
|
|
2481
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2482
|
+
|
|
2483
|
+
def test_assign_to_next(self):
|
|
2484
|
+
s = """
|
|
2485
|
+
def foo():
|
|
2486
|
+
A.next = foo
|
|
2487
|
+
|
|
2488
|
+
class A:
|
|
2489
|
+
def next(self, a, b):
|
|
2490
|
+
pass
|
|
2491
|
+
"""
|
|
2492
|
+
self.unchanged(s)
|
|
2493
|
+
|
|
2494
|
+
def test_assign_to_next_in_tuple(self):
|
|
2495
|
+
s = """
|
|
2496
|
+
def foo():
|
|
2497
|
+
(a, A.next) = foo
|
|
2498
|
+
|
|
2499
|
+
class A:
|
|
2500
|
+
def next(self, a, b):
|
|
2501
|
+
pass
|
|
2502
|
+
"""
|
|
2503
|
+
self.unchanged(s)
|
|
2504
|
+
|
|
2505
|
+
def test_assign_to_next_in_list(self):
|
|
2506
|
+
s = """
|
|
2507
|
+
def foo():
|
|
2508
|
+
[a, A.next] = foo
|
|
2509
|
+
|
|
2510
|
+
class A:
|
|
2511
|
+
def next(self, a, b):
|
|
2512
|
+
pass
|
|
2513
|
+
"""
|
|
2514
|
+
self.unchanged(s)
|
|
2515
|
+
|
|
2516
|
+
def test_shadowing_import_1(self):
|
|
2517
|
+
s = """
|
|
2518
|
+
import foo.bar as next
|
|
2519
|
+
|
|
2520
|
+
class A:
|
|
2521
|
+
def next(self, a, b):
|
|
2522
|
+
pass
|
|
2523
|
+
"""
|
|
2524
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2525
|
+
|
|
2526
|
+
def test_shadowing_import_2(self):
|
|
2527
|
+
s = """
|
|
2528
|
+
import bar, bar.foo as next
|
|
2529
|
+
|
|
2530
|
+
class A:
|
|
2531
|
+
def next(self, a, b):
|
|
2532
|
+
pass
|
|
2533
|
+
"""
|
|
2534
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2535
|
+
|
|
2536
|
+
def test_shadowing_import_3(self):
|
|
2537
|
+
s = """
|
|
2538
|
+
import bar, bar.foo as next, baz
|
|
2539
|
+
|
|
2540
|
+
class A:
|
|
2541
|
+
def next(self, a, b):
|
|
2542
|
+
pass
|
|
2543
|
+
"""
|
|
2544
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2545
|
+
|
|
2546
|
+
def test_shadowing_import_from_1(self):
|
|
2547
|
+
s = """
|
|
2548
|
+
from x import next
|
|
2549
|
+
|
|
2550
|
+
class A:
|
|
2551
|
+
def next(self, a, b):
|
|
2552
|
+
pass
|
|
2553
|
+
"""
|
|
2554
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2555
|
+
|
|
2556
|
+
def test_shadowing_import_from_2(self):
|
|
2557
|
+
s = """
|
|
2558
|
+
from x.a import next
|
|
2559
|
+
|
|
2560
|
+
class A:
|
|
2561
|
+
def next(self, a, b):
|
|
2562
|
+
pass
|
|
2563
|
+
"""
|
|
2564
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2565
|
+
|
|
2566
|
+
def test_shadowing_import_from_3(self):
|
|
2567
|
+
s = """
|
|
2568
|
+
from x import a, next, b
|
|
2569
|
+
|
|
2570
|
+
class A:
|
|
2571
|
+
def next(self, a, b):
|
|
2572
|
+
pass
|
|
2573
|
+
"""
|
|
2574
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2575
|
+
|
|
2576
|
+
def test_shadowing_import_from_4(self):
|
|
2577
|
+
s = """
|
|
2578
|
+
from x.a import a, next, b
|
|
2579
|
+
|
|
2580
|
+
class A:
|
|
2581
|
+
def next(self, a, b):
|
|
2582
|
+
pass
|
|
2583
|
+
"""
|
|
2584
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2585
|
+
|
|
2586
|
+
def test_shadowing_funcdef_1(self):
|
|
2587
|
+
s = """
|
|
2588
|
+
def next(a):
|
|
2589
|
+
pass
|
|
2590
|
+
|
|
2591
|
+
class A:
|
|
2592
|
+
def next(self, a, b):
|
|
2593
|
+
pass
|
|
2594
|
+
"""
|
|
2595
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2596
|
+
|
|
2597
|
+
def test_shadowing_funcdef_2(self):
|
|
2598
|
+
b = """
|
|
2599
|
+
def next(a):
|
|
2600
|
+
pass
|
|
2601
|
+
|
|
2602
|
+
class A:
|
|
2603
|
+
def next(self):
|
|
2604
|
+
pass
|
|
2605
|
+
|
|
2606
|
+
it.next()
|
|
2607
|
+
"""
|
|
2608
|
+
a = """
|
|
2609
|
+
def next(a):
|
|
2610
|
+
pass
|
|
2611
|
+
|
|
2612
|
+
class A:
|
|
2613
|
+
def __next__(self):
|
|
2614
|
+
pass
|
|
2615
|
+
|
|
2616
|
+
it.__next__()
|
|
2617
|
+
"""
|
|
2618
|
+
self.warns(b, a, "Calls to builtin next() possibly shadowed")
|
|
2619
|
+
|
|
2620
|
+
def test_shadowing_global_1(self):
|
|
2621
|
+
s = """
|
|
2622
|
+
def f():
|
|
2623
|
+
global next
|
|
2624
|
+
next = 5
|
|
2625
|
+
"""
|
|
2626
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2627
|
+
|
|
2628
|
+
def test_shadowing_global_2(self):
|
|
2629
|
+
s = """
|
|
2630
|
+
def f():
|
|
2631
|
+
global a, next, b
|
|
2632
|
+
next = 5
|
|
2633
|
+
"""
|
|
2634
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2635
|
+
|
|
2636
|
+
def test_shadowing_for_simple(self):
|
|
2637
|
+
s = """
|
|
2638
|
+
for next in it():
|
|
2639
|
+
pass
|
|
2640
|
+
|
|
2641
|
+
b = 5
|
|
2642
|
+
c = 6
|
|
2643
|
+
"""
|
|
2644
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2645
|
+
|
|
2646
|
+
def test_shadowing_for_tuple_1(self):
|
|
2647
|
+
s = """
|
|
2648
|
+
for next, b in it():
|
|
2649
|
+
pass
|
|
2650
|
+
|
|
2651
|
+
b = 5
|
|
2652
|
+
c = 6
|
|
2653
|
+
"""
|
|
2654
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2655
|
+
|
|
2656
|
+
def test_shadowing_for_tuple_2(self):
|
|
2657
|
+
s = """
|
|
2658
|
+
for a, (next, c), b in it():
|
|
2659
|
+
pass
|
|
2660
|
+
|
|
2661
|
+
b = 5
|
|
2662
|
+
c = 6
|
|
2663
|
+
"""
|
|
2664
|
+
self.warns_unchanged(s, "Calls to builtin next() possibly shadowed")
|
|
2665
|
+
|
|
2666
|
+
def test_noncall_access_1(self):
|
|
2667
|
+
b = """gnext = g.next"""
|
|
2668
|
+
a = """gnext = g.__next__"""
|
|
2669
|
+
self.check(b, a)
|
|
2670
|
+
|
|
2671
|
+
def test_noncall_access_2(self):
|
|
2672
|
+
b = """f(g.next + 5)"""
|
|
2673
|
+
a = """f(g.__next__ + 5)"""
|
|
2674
|
+
self.check(b, a)
|
|
2675
|
+
|
|
2676
|
+
def test_noncall_access_3(self):
|
|
2677
|
+
b = """f(g().next + 5)"""
|
|
2678
|
+
a = """f(g().__next__ + 5)"""
|
|
2679
|
+
self.check(b, a)
|
|
2680
|
+
|
|
2681
|
+
class Test_nonzero(FixerTestCase):
|
|
2682
|
+
fixer = "nonzero"
|
|
2683
|
+
|
|
2684
|
+
def test_1(self):
|
|
2685
|
+
b = """
|
|
2686
|
+
class A:
|
|
2687
|
+
def __nonzero__(self):
|
|
2688
|
+
pass
|
|
2689
|
+
"""
|
|
2690
|
+
a = """
|
|
2691
|
+
class A:
|
|
2692
|
+
def __bool__(self):
|
|
2693
|
+
pass
|
|
2694
|
+
"""
|
|
2695
|
+
self.check(b, a)
|
|
2696
|
+
|
|
2697
|
+
def test_2(self):
|
|
2698
|
+
b = """
|
|
2699
|
+
class A(object):
|
|
2700
|
+
def __nonzero__(self):
|
|
2701
|
+
pass
|
|
2702
|
+
"""
|
|
2703
|
+
a = """
|
|
2704
|
+
class A(object):
|
|
2705
|
+
def __bool__(self):
|
|
2706
|
+
pass
|
|
2707
|
+
"""
|
|
2708
|
+
self.check(b, a)
|
|
2709
|
+
|
|
2710
|
+
def test_unchanged_1(self):
|
|
2711
|
+
s = """
|
|
2712
|
+
class A(object):
|
|
2713
|
+
def __bool__(self):
|
|
2714
|
+
pass
|
|
2715
|
+
"""
|
|
2716
|
+
self.unchanged(s)
|
|
2717
|
+
|
|
2718
|
+
def test_unchanged_2(self):
|
|
2719
|
+
s = """
|
|
2720
|
+
class A(object):
|
|
2721
|
+
def __nonzero__(self, a):
|
|
2722
|
+
pass
|
|
2723
|
+
"""
|
|
2724
|
+
self.unchanged(s)
|
|
2725
|
+
|
|
2726
|
+
def test_unchanged_func(self):
|
|
2727
|
+
s = """
|
|
2728
|
+
def __nonzero__(self):
|
|
2729
|
+
pass
|
|
2730
|
+
"""
|
|
2731
|
+
self.unchanged(s)
|
|
2732
|
+
|
|
2733
|
+
class Test_numliterals(FixerTestCase):
|
|
2734
|
+
fixer = "numliterals"
|
|
2735
|
+
|
|
2736
|
+
def test_octal_1(self):
|
|
2737
|
+
b = """0755"""
|
|
2738
|
+
a = """0o755"""
|
|
2739
|
+
self.check(b, a)
|
|
2740
|
+
|
|
2741
|
+
def test_long_int_1(self):
|
|
2742
|
+
b = """a = 12L"""
|
|
2743
|
+
a = """a = 12"""
|
|
2744
|
+
self.check(b, a)
|
|
2745
|
+
|
|
2746
|
+
def test_long_int_2(self):
|
|
2747
|
+
b = """a = 12l"""
|
|
2748
|
+
a = """a = 12"""
|
|
2749
|
+
self.check(b, a)
|
|
2750
|
+
|
|
2751
|
+
def test_long_hex(self):
|
|
2752
|
+
b = """b = 0x12l"""
|
|
2753
|
+
a = """b = 0x12"""
|
|
2754
|
+
self.check(b, a)
|
|
2755
|
+
|
|
2756
|
+
def test_comments_and_spacing(self):
|
|
2757
|
+
b = """b = 0x12L"""
|
|
2758
|
+
a = """b = 0x12"""
|
|
2759
|
+
self.check(b, a)
|
|
2760
|
+
|
|
2761
|
+
b = """b = 0755 # spam"""
|
|
2762
|
+
a = """b = 0o755 # spam"""
|
|
2763
|
+
self.check(b, a)
|
|
2764
|
+
|
|
2765
|
+
def test_unchanged_int(self):
|
|
2766
|
+
s = """5"""
|
|
2767
|
+
self.unchanged(s)
|
|
2768
|
+
|
|
2769
|
+
def test_unchanged_float(self):
|
|
2770
|
+
s = """5.0"""
|
|
2771
|
+
self.unchanged(s)
|
|
2772
|
+
|
|
2773
|
+
def test_unchanged_octal(self):
|
|
2774
|
+
s = """0o755"""
|
|
2775
|
+
self.unchanged(s)
|
|
2776
|
+
|
|
2777
|
+
def test_unchanged_hex(self):
|
|
2778
|
+
s = """0xABC"""
|
|
2779
|
+
self.unchanged(s)
|
|
2780
|
+
|
|
2781
|
+
def test_unchanged_exp(self):
|
|
2782
|
+
s = """5.0e10"""
|
|
2783
|
+
self.unchanged(s)
|
|
2784
|
+
|
|
2785
|
+
def test_unchanged_complex_int(self):
|
|
2786
|
+
s = """5 + 4j"""
|
|
2787
|
+
self.unchanged(s)
|
|
2788
|
+
|
|
2789
|
+
def test_unchanged_complex_float(self):
|
|
2790
|
+
s = """5.4 + 4.9j"""
|
|
2791
|
+
self.unchanged(s)
|
|
2792
|
+
|
|
2793
|
+
def test_unchanged_complex_bare(self):
|
|
2794
|
+
s = """4j"""
|
|
2795
|
+
self.unchanged(s)
|
|
2796
|
+
s = """4.4j"""
|
|
2797
|
+
self.unchanged(s)
|
|
2798
|
+
|
|
2799
|
+
class Test_renames(FixerTestCase):
|
|
2800
|
+
fixer = "renames"
|
|
2801
|
+
|
|
2802
|
+
modules = {"sys": ("maxint", "maxsize"),
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
def test_import_from(self):
|
|
2806
|
+
for mod, (old, new) in list(self.modules.items()):
|
|
2807
|
+
b = "from %s import %s" % (mod, old)
|
|
2808
|
+
a = "from %s import %s" % (mod, new)
|
|
2809
|
+
self.check(b, a)
|
|
2810
|
+
|
|
2811
|
+
s = "from foo import %s" % old
|
|
2812
|
+
self.unchanged(s)
|
|
2813
|
+
|
|
2814
|
+
def test_import_from_as(self):
|
|
2815
|
+
for mod, (old, new) in list(self.modules.items()):
|
|
2816
|
+
b = "from %s import %s as foo_bar" % (mod, old)
|
|
2817
|
+
a = "from %s import %s as foo_bar" % (mod, new)
|
|
2818
|
+
self.check(b, a)
|
|
2819
|
+
|
|
2820
|
+
def test_import_module_usage(self):
|
|
2821
|
+
for mod, (old, new) in list(self.modules.items()):
|
|
2822
|
+
b = """
|
|
2823
|
+
import %s
|
|
2824
|
+
foo(%s, %s.%s)
|
|
2825
|
+
""" % (mod, mod, mod, old)
|
|
2826
|
+
a = """
|
|
2827
|
+
import %s
|
|
2828
|
+
foo(%s, %s.%s)
|
|
2829
|
+
""" % (mod, mod, mod, new)
|
|
2830
|
+
self.check(b, a)
|
|
2831
|
+
|
|
2832
|
+
def XXX_test_from_import_usage(self):
|
|
2833
|
+
# not implemented yet
|
|
2834
|
+
for mod, (old, new) in list(self.modules.items()):
|
|
2835
|
+
b = """
|
|
2836
|
+
from %s import %s
|
|
2837
|
+
foo(%s, %s)
|
|
2838
|
+
""" % (mod, old, mod, old)
|
|
2839
|
+
a = """
|
|
2840
|
+
from %s import %s
|
|
2841
|
+
foo(%s, %s)
|
|
2842
|
+
""" % (mod, new, mod, new)
|
|
2843
|
+
self.check(b, a)
|
|
2844
|
+
|
|
2845
|
+
class Test_unicode(FixerTestCase):
|
|
2846
|
+
fixer = "unicode"
|
|
2847
|
+
|
|
2848
|
+
def test_whitespace(self):
|
|
2849
|
+
b = """unicode( x)"""
|
|
2850
|
+
a = """str( x)"""
|
|
2851
|
+
self.check(b, a)
|
|
2852
|
+
|
|
2853
|
+
b = """ unicode(x )"""
|
|
2854
|
+
a = """ str(x )"""
|
|
2855
|
+
self.check(b, a)
|
|
2856
|
+
|
|
2857
|
+
b = """ u'h'"""
|
|
2858
|
+
a = """ 'h'"""
|
|
2859
|
+
self.check(b, a)
|
|
2860
|
+
|
|
2861
|
+
def test_unicode_call(self):
|
|
2862
|
+
b = """unicode(x, y, z)"""
|
|
2863
|
+
a = """str(x, y, z)"""
|
|
2864
|
+
self.check(b, a)
|
|
2865
|
+
|
|
2866
|
+
def test_unichr(self):
|
|
2867
|
+
b = """unichr(u'h')"""
|
|
2868
|
+
a = """chr('h')"""
|
|
2869
|
+
self.check(b, a)
|
|
2870
|
+
|
|
2871
|
+
def test_unicode_literal_1(self):
|
|
2872
|
+
b = '''u"x"'''
|
|
2873
|
+
a = '''"x"'''
|
|
2874
|
+
self.check(b, a)
|
|
2875
|
+
|
|
2876
|
+
def test_unicode_literal_2(self):
|
|
2877
|
+
b = """ur'x'"""
|
|
2878
|
+
a = """r'x'"""
|
|
2879
|
+
self.check(b, a)
|
|
2880
|
+
|
|
2881
|
+
def test_unicode_literal_3(self):
|
|
2882
|
+
b = """UR'''x''' """
|
|
2883
|
+
a = """R'''x''' """
|
|
2884
|
+
self.check(b, a)
|
|
2885
|
+
|
|
2886
|
+
def test_native_literal_escape_u(self):
|
|
2887
|
+
b = r"""'\\\u20ac\U0001d121\\u20ac'"""
|
|
2888
|
+
a = r"""'\\\\u20ac\\U0001d121\\u20ac'"""
|
|
2889
|
+
self.check(b, a)
|
|
2890
|
+
|
|
2891
|
+
b = r"""r'\\\u20ac\U0001d121\\u20ac'"""
|
|
2892
|
+
a = r"""r'\\\u20ac\U0001d121\\u20ac'"""
|
|
2893
|
+
self.check(b, a)
|
|
2894
|
+
|
|
2895
|
+
def test_bytes_literal_escape_u(self):
|
|
2896
|
+
b = r"""b'\\\u20ac\U0001d121\\u20ac'"""
|
|
2897
|
+
a = r"""b'\\\u20ac\U0001d121\\u20ac'"""
|
|
2898
|
+
self.check(b, a)
|
|
2899
|
+
|
|
2900
|
+
b = r"""br'\\\u20ac\U0001d121\\u20ac'"""
|
|
2901
|
+
a = r"""br'\\\u20ac\U0001d121\\u20ac'"""
|
|
2902
|
+
self.check(b, a)
|
|
2903
|
+
|
|
2904
|
+
def test_unicode_literal_escape_u(self):
|
|
2905
|
+
b = r"""u'\\\u20ac\U0001d121\\u20ac'"""
|
|
2906
|
+
a = r"""'\\\u20ac\U0001d121\\u20ac'"""
|
|
2907
|
+
self.check(b, a)
|
|
2908
|
+
|
|
2909
|
+
b = r"""ur'\\\u20ac\U0001d121\\u20ac'"""
|
|
2910
|
+
a = r"""r'\\\u20ac\U0001d121\\u20ac'"""
|
|
2911
|
+
self.check(b, a)
|
|
2912
|
+
|
|
2913
|
+
def test_native_unicode_literal_escape_u(self):
|
|
2914
|
+
f = 'from __future__ import unicode_literals\n'
|
|
2915
|
+
b = f + r"""'\\\u20ac\U0001d121\\u20ac'"""
|
|
2916
|
+
a = f + r"""'\\\u20ac\U0001d121\\u20ac'"""
|
|
2917
|
+
self.check(b, a)
|
|
2918
|
+
|
|
2919
|
+
b = f + r"""r'\\\u20ac\U0001d121\\u20ac'"""
|
|
2920
|
+
a = f + r"""r'\\\u20ac\U0001d121\\u20ac'"""
|
|
2921
|
+
self.check(b, a)
|
|
2922
|
+
|
|
2923
|
+
class Test_callable(FixerTestCase):
|
|
2924
|
+
fixer = "callable"
|
|
2925
|
+
|
|
2926
|
+
def test_prefix_preservation(self):
|
|
2927
|
+
b = """callable( x)"""
|
|
2928
|
+
a = """import collections\nisinstance( x, collections.Callable)"""
|
|
2929
|
+
self.check(b, a)
|
|
2930
|
+
|
|
2931
|
+
b = """if callable(x): pass"""
|
|
2932
|
+
a = """import collections
|
|
2933
|
+
if isinstance(x, collections.Callable): pass"""
|
|
2934
|
+
self.check(b, a)
|
|
2935
|
+
|
|
2936
|
+
def test_callable_call(self):
|
|
2937
|
+
b = """callable(x)"""
|
|
2938
|
+
a = """import collections\nisinstance(x, collections.Callable)"""
|
|
2939
|
+
self.check(b, a)
|
|
2940
|
+
|
|
2941
|
+
def test_global_import(self):
|
|
2942
|
+
b = """
|
|
2943
|
+
def spam(foo):
|
|
2944
|
+
callable(foo)"""[1:]
|
|
2945
|
+
a = """
|
|
2946
|
+
import collections
|
|
2947
|
+
def spam(foo):
|
|
2948
|
+
isinstance(foo, collections.Callable)"""[1:]
|
|
2949
|
+
self.check(b, a)
|
|
2950
|
+
|
|
2951
|
+
b = """
|
|
2952
|
+
import collections
|
|
2953
|
+
def spam(foo):
|
|
2954
|
+
callable(foo)"""[1:]
|
|
2955
|
+
# same output if it was already imported
|
|
2956
|
+
self.check(b, a)
|
|
2957
|
+
|
|
2958
|
+
b = """
|
|
2959
|
+
from collections import *
|
|
2960
|
+
def spam(foo):
|
|
2961
|
+
callable(foo)"""[1:]
|
|
2962
|
+
a = """
|
|
2963
|
+
from collections import *
|
|
2964
|
+
import collections
|
|
2965
|
+
def spam(foo):
|
|
2966
|
+
isinstance(foo, collections.Callable)"""[1:]
|
|
2967
|
+
self.check(b, a)
|
|
2968
|
+
|
|
2969
|
+
b = """
|
|
2970
|
+
do_stuff()
|
|
2971
|
+
do_some_other_stuff()
|
|
2972
|
+
assert callable(do_stuff)"""[1:]
|
|
2973
|
+
a = """
|
|
2974
|
+
import collections
|
|
2975
|
+
do_stuff()
|
|
2976
|
+
do_some_other_stuff()
|
|
2977
|
+
assert isinstance(do_stuff, collections.Callable)"""[1:]
|
|
2978
|
+
self.check(b, a)
|
|
2979
|
+
|
|
2980
|
+
b = """
|
|
2981
|
+
if isinstance(do_stuff, Callable):
|
|
2982
|
+
assert callable(do_stuff)
|
|
2983
|
+
do_stuff(do_stuff)
|
|
2984
|
+
if not callable(do_stuff):
|
|
2985
|
+
exit(1)
|
|
2986
|
+
else:
|
|
2987
|
+
assert callable(do_stuff)
|
|
2988
|
+
else:
|
|
2989
|
+
assert not callable(do_stuff)"""[1:]
|
|
2990
|
+
a = """
|
|
2991
|
+
import collections
|
|
2992
|
+
if isinstance(do_stuff, Callable):
|
|
2993
|
+
assert isinstance(do_stuff, collections.Callable)
|
|
2994
|
+
do_stuff(do_stuff)
|
|
2995
|
+
if not isinstance(do_stuff, collections.Callable):
|
|
2996
|
+
exit(1)
|
|
2997
|
+
else:
|
|
2998
|
+
assert isinstance(do_stuff, collections.Callable)
|
|
2999
|
+
else:
|
|
3000
|
+
assert not isinstance(do_stuff, collections.Callable)"""[1:]
|
|
3001
|
+
self.check(b, a)
|
|
3002
|
+
|
|
3003
|
+
def test_callable_should_not_change(self):
|
|
3004
|
+
a = """callable(*x)"""
|
|
3005
|
+
self.unchanged(a)
|
|
3006
|
+
|
|
3007
|
+
a = """callable(x, y)"""
|
|
3008
|
+
self.unchanged(a)
|
|
3009
|
+
|
|
3010
|
+
a = """callable(x, kw=y)"""
|
|
3011
|
+
self.unchanged(a)
|
|
3012
|
+
|
|
3013
|
+
a = """callable()"""
|
|
3014
|
+
self.unchanged(a)
|
|
3015
|
+
|
|
3016
|
+
class Test_filter(FixerTestCase):
|
|
3017
|
+
fixer = "filter"
|
|
3018
|
+
|
|
3019
|
+
def test_prefix_preservation(self):
|
|
3020
|
+
b = """x = filter( foo, 'abc' )"""
|
|
3021
|
+
a = """x = list(filter( foo, 'abc' ))"""
|
|
3022
|
+
self.check(b, a)
|
|
3023
|
+
|
|
3024
|
+
b = """x = filter( None , 'abc' )"""
|
|
3025
|
+
a = """x = [_f for _f in 'abc' if _f]"""
|
|
3026
|
+
self.check(b, a)
|
|
3027
|
+
|
|
3028
|
+
def test_filter_basic(self):
|
|
3029
|
+
b = """x = filter(None, 'abc')"""
|
|
3030
|
+
a = """x = [_f for _f in 'abc' if _f]"""
|
|
3031
|
+
self.check(b, a)
|
|
3032
|
+
|
|
3033
|
+
b = """x = len(filter(f, 'abc'))"""
|
|
3034
|
+
a = """x = len(list(filter(f, 'abc')))"""
|
|
3035
|
+
self.check(b, a)
|
|
3036
|
+
|
|
3037
|
+
b = """x = filter(lambda x: x%2 == 0, range(10))"""
|
|
3038
|
+
a = """x = [x for x in range(10) if x%2 == 0]"""
|
|
3039
|
+
self.check(b, a)
|
|
3040
|
+
|
|
3041
|
+
# Note the parens around x
|
|
3042
|
+
b = """x = filter(lambda (x): x%2 == 0, range(10))"""
|
|
3043
|
+
a = """x = [x for x in range(10) if x%2 == 0]"""
|
|
3044
|
+
self.check(b, a)
|
|
3045
|
+
|
|
3046
|
+
# XXX This (rare) case is not supported
|
|
3047
|
+
## b = """x = filter(f, 'abc')[0]"""
|
|
3048
|
+
## a = """x = list(filter(f, 'abc'))[0]"""
|
|
3049
|
+
## self.check(b, a)
|
|
3050
|
+
|
|
3051
|
+
def test_filter_nochange(self):
|
|
3052
|
+
a = """b.join(filter(f, 'abc'))"""
|
|
3053
|
+
self.unchanged(a)
|
|
3054
|
+
a = """(a + foo(5)).join(filter(f, 'abc'))"""
|
|
3055
|
+
self.unchanged(a)
|
|
3056
|
+
a = """iter(filter(f, 'abc'))"""
|
|
3057
|
+
self.unchanged(a)
|
|
3058
|
+
a = """list(filter(f, 'abc'))"""
|
|
3059
|
+
self.unchanged(a)
|
|
3060
|
+
a = """list(filter(f, 'abc'))[0]"""
|
|
3061
|
+
self.unchanged(a)
|
|
3062
|
+
a = """set(filter(f, 'abc'))"""
|
|
3063
|
+
self.unchanged(a)
|
|
3064
|
+
a = """set(filter(f, 'abc')).pop()"""
|
|
3065
|
+
self.unchanged(a)
|
|
3066
|
+
a = """tuple(filter(f, 'abc'))"""
|
|
3067
|
+
self.unchanged(a)
|
|
3068
|
+
a = """any(filter(f, 'abc'))"""
|
|
3069
|
+
self.unchanged(a)
|
|
3070
|
+
a = """all(filter(f, 'abc'))"""
|
|
3071
|
+
self.unchanged(a)
|
|
3072
|
+
a = """sum(filter(f, 'abc'))"""
|
|
3073
|
+
self.unchanged(a)
|
|
3074
|
+
a = """sorted(filter(f, 'abc'))"""
|
|
3075
|
+
self.unchanged(a)
|
|
3076
|
+
a = """sorted(filter(f, 'abc'), key=blah)"""
|
|
3077
|
+
self.unchanged(a)
|
|
3078
|
+
a = """sorted(filter(f, 'abc'), key=blah)[0]"""
|
|
3079
|
+
self.unchanged(a)
|
|
3080
|
+
a = """enumerate(filter(f, 'abc'))"""
|
|
3081
|
+
self.unchanged(a)
|
|
3082
|
+
a = """enumerate(filter(f, 'abc'), start=1)"""
|
|
3083
|
+
self.unchanged(a)
|
|
3084
|
+
a = """for i in filter(f, 'abc'): pass"""
|
|
3085
|
+
self.unchanged(a)
|
|
3086
|
+
a = """[x for x in filter(f, 'abc')]"""
|
|
3087
|
+
self.unchanged(a)
|
|
3088
|
+
a = """(x for x in filter(f, 'abc'))"""
|
|
3089
|
+
self.unchanged(a)
|
|
3090
|
+
|
|
3091
|
+
def test_future_builtins(self):
|
|
3092
|
+
a = "from future_builtins import spam, filter; filter(f, 'ham')"
|
|
3093
|
+
self.unchanged(a)
|
|
3094
|
+
|
|
3095
|
+
b = """from future_builtins import spam; x = filter(f, 'abc')"""
|
|
3096
|
+
a = """from future_builtins import spam; x = list(filter(f, 'abc'))"""
|
|
3097
|
+
self.check(b, a)
|
|
3098
|
+
|
|
3099
|
+
a = "from future_builtins import *; filter(f, 'ham')"
|
|
3100
|
+
self.unchanged(a)
|
|
3101
|
+
|
|
3102
|
+
class Test_map(FixerTestCase):
|
|
3103
|
+
fixer = "map"
|
|
3104
|
+
|
|
3105
|
+
def check(self, b, a):
|
|
3106
|
+
self.unchanged("from future_builtins import map; " + b, a)
|
|
3107
|
+
super(Test_map, self).check(b, a)
|
|
3108
|
+
|
|
3109
|
+
def test_prefix_preservation(self):
|
|
3110
|
+
b = """x = map( f, 'abc' )"""
|
|
3111
|
+
a = """x = list(map( f, 'abc' ))"""
|
|
3112
|
+
self.check(b, a)
|
|
3113
|
+
|
|
3114
|
+
def test_trailing_comment(self):
|
|
3115
|
+
b = """x = map(f, 'abc') # foo"""
|
|
3116
|
+
a = """x = list(map(f, 'abc')) # foo"""
|
|
3117
|
+
self.check(b, a)
|
|
3118
|
+
|
|
3119
|
+
def test_None_with_multiple_arguments(self):
|
|
3120
|
+
s = """x = map(None, a, b, c)"""
|
|
3121
|
+
self.warns_unchanged(s, "cannot convert map(None, ...) with "
|
|
3122
|
+
"multiple arguments")
|
|
3123
|
+
|
|
3124
|
+
def test_map_basic(self):
|
|
3125
|
+
b = """x = map(f, 'abc')"""
|
|
3126
|
+
a = """x = list(map(f, 'abc'))"""
|
|
3127
|
+
self.check(b, a)
|
|
3128
|
+
|
|
3129
|
+
b = """x = len(map(f, 'abc', 'def'))"""
|
|
3130
|
+
a = """x = len(list(map(f, 'abc', 'def')))"""
|
|
3131
|
+
self.check(b, a)
|
|
3132
|
+
|
|
3133
|
+
b = """x = map(None, 'abc')"""
|
|
3134
|
+
a = """x = list('abc')"""
|
|
3135
|
+
self.check(b, a)
|
|
3136
|
+
|
|
3137
|
+
b = """x = map(lambda x: x+1, range(4))"""
|
|
3138
|
+
a = """x = [x+1 for x in range(4)]"""
|
|
3139
|
+
self.check(b, a)
|
|
3140
|
+
|
|
3141
|
+
# Note the parens around x
|
|
3142
|
+
b = """x = map(lambda (x): x+1, range(4))"""
|
|
3143
|
+
a = """x = [x+1 for x in range(4)]"""
|
|
3144
|
+
self.check(b, a)
|
|
3145
|
+
|
|
3146
|
+
b = """
|
|
3147
|
+
foo()
|
|
3148
|
+
# foo
|
|
3149
|
+
map(f, x)
|
|
3150
|
+
"""
|
|
3151
|
+
a = """
|
|
3152
|
+
foo()
|
|
3153
|
+
# foo
|
|
3154
|
+
list(map(f, x))
|
|
3155
|
+
"""
|
|
3156
|
+
self.warns(b, a, "You should use a for loop here")
|
|
3157
|
+
|
|
3158
|
+
# XXX This (rare) case is not supported
|
|
3159
|
+
## b = """x = map(f, 'abc')[0]"""
|
|
3160
|
+
## a = """x = list(map(f, 'abc'))[0]"""
|
|
3161
|
+
## self.check(b, a)
|
|
3162
|
+
|
|
3163
|
+
def test_map_nochange(self):
|
|
3164
|
+
a = """b.join(map(f, 'abc'))"""
|
|
3165
|
+
self.unchanged(a)
|
|
3166
|
+
a = """(a + foo(5)).join(map(f, 'abc'))"""
|
|
3167
|
+
self.unchanged(a)
|
|
3168
|
+
a = """iter(map(f, 'abc'))"""
|
|
3169
|
+
self.unchanged(a)
|
|
3170
|
+
a = """list(map(f, 'abc'))"""
|
|
3171
|
+
self.unchanged(a)
|
|
3172
|
+
a = """list(map(f, 'abc'))[0]"""
|
|
3173
|
+
self.unchanged(a)
|
|
3174
|
+
a = """set(map(f, 'abc'))"""
|
|
3175
|
+
self.unchanged(a)
|
|
3176
|
+
a = """set(map(f, 'abc')).pop()"""
|
|
3177
|
+
self.unchanged(a)
|
|
3178
|
+
a = """tuple(map(f, 'abc'))"""
|
|
3179
|
+
self.unchanged(a)
|
|
3180
|
+
a = """any(map(f, 'abc'))"""
|
|
3181
|
+
self.unchanged(a)
|
|
3182
|
+
a = """all(map(f, 'abc'))"""
|
|
3183
|
+
self.unchanged(a)
|
|
3184
|
+
a = """sum(map(f, 'abc'))"""
|
|
3185
|
+
self.unchanged(a)
|
|
3186
|
+
a = """sorted(map(f, 'abc'))"""
|
|
3187
|
+
self.unchanged(a)
|
|
3188
|
+
a = """sorted(map(f, 'abc'), key=blah)"""
|
|
3189
|
+
self.unchanged(a)
|
|
3190
|
+
a = """sorted(map(f, 'abc'), key=blah)[0]"""
|
|
3191
|
+
self.unchanged(a)
|
|
3192
|
+
a = """enumerate(map(f, 'abc'))"""
|
|
3193
|
+
self.unchanged(a)
|
|
3194
|
+
a = """enumerate(map(f, 'abc'), start=1)"""
|
|
3195
|
+
self.unchanged(a)
|
|
3196
|
+
a = """for i in map(f, 'abc'): pass"""
|
|
3197
|
+
self.unchanged(a)
|
|
3198
|
+
a = """[x for x in map(f, 'abc')]"""
|
|
3199
|
+
self.unchanged(a)
|
|
3200
|
+
a = """(x for x in map(f, 'abc'))"""
|
|
3201
|
+
self.unchanged(a)
|
|
3202
|
+
|
|
3203
|
+
def test_future_builtins(self):
|
|
3204
|
+
a = "from future_builtins import spam, map, eggs; map(f, 'ham')"
|
|
3205
|
+
self.unchanged(a)
|
|
3206
|
+
|
|
3207
|
+
b = """from future_builtins import spam, eggs; x = map(f, 'abc')"""
|
|
3208
|
+
a = """from future_builtins import spam, eggs; x = list(map(f, 'abc'))"""
|
|
3209
|
+
self.check(b, a)
|
|
3210
|
+
|
|
3211
|
+
a = "from future_builtins import *; map(f, 'ham')"
|
|
3212
|
+
self.unchanged(a)
|
|
3213
|
+
|
|
3214
|
+
class Test_zip(FixerTestCase):
|
|
3215
|
+
fixer = "zip"
|
|
3216
|
+
|
|
3217
|
+
def check(self, b, a):
|
|
3218
|
+
self.unchanged("from future_builtins import zip; " + b, a)
|
|
3219
|
+
super(Test_zip, self).check(b, a)
|
|
3220
|
+
|
|
3221
|
+
def test_zip_basic(self):
|
|
3222
|
+
b = """x = zip(a, b, c)"""
|
|
3223
|
+
a = """x = list(zip(a, b, c))"""
|
|
3224
|
+
self.check(b, a)
|
|
3225
|
+
|
|
3226
|
+
b = """x = len(zip(a, b))"""
|
|
3227
|
+
a = """x = len(list(zip(a, b)))"""
|
|
3228
|
+
self.check(b, a)
|
|
3229
|
+
|
|
3230
|
+
def test_zip_nochange(self):
|
|
3231
|
+
a = """b.join(zip(a, b))"""
|
|
3232
|
+
self.unchanged(a)
|
|
3233
|
+
a = """(a + foo(5)).join(zip(a, b))"""
|
|
3234
|
+
self.unchanged(a)
|
|
3235
|
+
a = """iter(zip(a, b))"""
|
|
3236
|
+
self.unchanged(a)
|
|
3237
|
+
a = """list(zip(a, b))"""
|
|
3238
|
+
self.unchanged(a)
|
|
3239
|
+
a = """list(zip(a, b))[0]"""
|
|
3240
|
+
self.unchanged(a)
|
|
3241
|
+
a = """set(zip(a, b))"""
|
|
3242
|
+
self.unchanged(a)
|
|
3243
|
+
a = """set(zip(a, b)).pop()"""
|
|
3244
|
+
self.unchanged(a)
|
|
3245
|
+
a = """tuple(zip(a, b))"""
|
|
3246
|
+
self.unchanged(a)
|
|
3247
|
+
a = """any(zip(a, b))"""
|
|
3248
|
+
self.unchanged(a)
|
|
3249
|
+
a = """all(zip(a, b))"""
|
|
3250
|
+
self.unchanged(a)
|
|
3251
|
+
a = """sum(zip(a, b))"""
|
|
3252
|
+
self.unchanged(a)
|
|
3253
|
+
a = """sorted(zip(a, b))"""
|
|
3254
|
+
self.unchanged(a)
|
|
3255
|
+
a = """sorted(zip(a, b), key=blah)"""
|
|
3256
|
+
self.unchanged(a)
|
|
3257
|
+
a = """sorted(zip(a, b), key=blah)[0]"""
|
|
3258
|
+
self.unchanged(a)
|
|
3259
|
+
a = """enumerate(zip(a, b))"""
|
|
3260
|
+
self.unchanged(a)
|
|
3261
|
+
a = """enumerate(zip(a, b), start=1)"""
|
|
3262
|
+
self.unchanged(a)
|
|
3263
|
+
a = """for i in zip(a, b): pass"""
|
|
3264
|
+
self.unchanged(a)
|
|
3265
|
+
a = """[x for x in zip(a, b)]"""
|
|
3266
|
+
self.unchanged(a)
|
|
3267
|
+
a = """(x for x in zip(a, b))"""
|
|
3268
|
+
self.unchanged(a)
|
|
3269
|
+
|
|
3270
|
+
def test_future_builtins(self):
|
|
3271
|
+
a = "from future_builtins import spam, zip, eggs; zip(a, b)"
|
|
3272
|
+
self.unchanged(a)
|
|
3273
|
+
|
|
3274
|
+
b = """from future_builtins import spam, eggs; x = zip(a, b)"""
|
|
3275
|
+
a = """from future_builtins import spam, eggs; x = list(zip(a, b))"""
|
|
3276
|
+
self.check(b, a)
|
|
3277
|
+
|
|
3278
|
+
a = "from future_builtins import *; zip(a, b)"
|
|
3279
|
+
self.unchanged(a)
|
|
3280
|
+
|
|
3281
|
+
class Test_standarderror(FixerTestCase):
|
|
3282
|
+
fixer = "standarderror"
|
|
3283
|
+
|
|
3284
|
+
def test(self):
|
|
3285
|
+
b = """x = StandardError()"""
|
|
3286
|
+
a = """x = Exception()"""
|
|
3287
|
+
self.check(b, a)
|
|
3288
|
+
|
|
3289
|
+
b = """x = StandardError(a, b, c)"""
|
|
3290
|
+
a = """x = Exception(a, b, c)"""
|
|
3291
|
+
self.check(b, a)
|
|
3292
|
+
|
|
3293
|
+
b = """f(2 + StandardError(a, b, c))"""
|
|
3294
|
+
a = """f(2 + Exception(a, b, c))"""
|
|
3295
|
+
self.check(b, a)
|
|
3296
|
+
|
|
3297
|
+
class Test_types(FixerTestCase):
|
|
3298
|
+
fixer = "types"
|
|
3299
|
+
|
|
3300
|
+
def test_basic_types_convert(self):
|
|
3301
|
+
b = """types.StringType"""
|
|
3302
|
+
a = """bytes"""
|
|
3303
|
+
self.check(b, a)
|
|
3304
|
+
|
|
3305
|
+
b = """types.DictType"""
|
|
3306
|
+
a = """dict"""
|
|
3307
|
+
self.check(b, a)
|
|
3308
|
+
|
|
3309
|
+
b = """types . IntType"""
|
|
3310
|
+
a = """int"""
|
|
3311
|
+
self.check(b, a)
|
|
3312
|
+
|
|
3313
|
+
b = """types.ListType"""
|
|
3314
|
+
a = """list"""
|
|
3315
|
+
self.check(b, a)
|
|
3316
|
+
|
|
3317
|
+
b = """types.LongType"""
|
|
3318
|
+
a = """int"""
|
|
3319
|
+
self.check(b, a)
|
|
3320
|
+
|
|
3321
|
+
b = """types.NoneType"""
|
|
3322
|
+
a = """type(None)"""
|
|
3323
|
+
self.check(b, a)
|
|
3324
|
+
|
|
3325
|
+
class Test_idioms(FixerTestCase):
|
|
3326
|
+
fixer = "idioms"
|
|
3327
|
+
|
|
3328
|
+
def test_while(self):
|
|
3329
|
+
b = """while 1: foo()"""
|
|
3330
|
+
a = """while True: foo()"""
|
|
3331
|
+
self.check(b, a)
|
|
3332
|
+
|
|
3333
|
+
b = """while 1: foo()"""
|
|
3334
|
+
a = """while True: foo()"""
|
|
3335
|
+
self.check(b, a)
|
|
3336
|
+
|
|
3337
|
+
b = """
|
|
3338
|
+
while 1:
|
|
3339
|
+
foo()
|
|
3340
|
+
"""
|
|
3341
|
+
a = """
|
|
3342
|
+
while True:
|
|
3343
|
+
foo()
|
|
3344
|
+
"""
|
|
3345
|
+
self.check(b, a)
|
|
3346
|
+
|
|
3347
|
+
def test_while_unchanged(self):
|
|
3348
|
+
s = """while 11: foo()"""
|
|
3349
|
+
self.unchanged(s)
|
|
3350
|
+
|
|
3351
|
+
s = """while 0: foo()"""
|
|
3352
|
+
self.unchanged(s)
|
|
3353
|
+
|
|
3354
|
+
s = """while foo(): foo()"""
|
|
3355
|
+
self.unchanged(s)
|
|
3356
|
+
|
|
3357
|
+
s = """while []: foo()"""
|
|
3358
|
+
self.unchanged(s)
|
|
3359
|
+
|
|
3360
|
+
def test_eq_simple(self):
|
|
3361
|
+
b = """type(x) == T"""
|
|
3362
|
+
a = """isinstance(x, T)"""
|
|
3363
|
+
self.check(b, a)
|
|
3364
|
+
|
|
3365
|
+
b = """if type(x) == T: pass"""
|
|
3366
|
+
a = """if isinstance(x, T): pass"""
|
|
3367
|
+
self.check(b, a)
|
|
3368
|
+
|
|
3369
|
+
def test_eq_reverse(self):
|
|
3370
|
+
b = """T == type(x)"""
|
|
3371
|
+
a = """isinstance(x, T)"""
|
|
3372
|
+
self.check(b, a)
|
|
3373
|
+
|
|
3374
|
+
b = """if T == type(x): pass"""
|
|
3375
|
+
a = """if isinstance(x, T): pass"""
|
|
3376
|
+
self.check(b, a)
|
|
3377
|
+
|
|
3378
|
+
def test_eq_expression(self):
|
|
3379
|
+
b = """type(x+y) == d.get('T')"""
|
|
3380
|
+
a = """isinstance(x+y, d.get('T'))"""
|
|
3381
|
+
self.check(b, a)
|
|
3382
|
+
|
|
3383
|
+
b = """type( x + y) == d.get('T')"""
|
|
3384
|
+
a = """isinstance(x + y, d.get('T'))"""
|
|
3385
|
+
self.check(b, a)
|
|
3386
|
+
|
|
3387
|
+
def test_is_simple(self):
|
|
3388
|
+
b = """type(x) is T"""
|
|
3389
|
+
a = """isinstance(x, T)"""
|
|
3390
|
+
self.check(b, a)
|
|
3391
|
+
|
|
3392
|
+
b = """if type(x) is T: pass"""
|
|
3393
|
+
a = """if isinstance(x, T): pass"""
|
|
3394
|
+
self.check(b, a)
|
|
3395
|
+
|
|
3396
|
+
def test_is_reverse(self):
|
|
3397
|
+
b = """T is type(x)"""
|
|
3398
|
+
a = """isinstance(x, T)"""
|
|
3399
|
+
self.check(b, a)
|
|
3400
|
+
|
|
3401
|
+
b = """if T is type(x): pass"""
|
|
3402
|
+
a = """if isinstance(x, T): pass"""
|
|
3403
|
+
self.check(b, a)
|
|
3404
|
+
|
|
3405
|
+
def test_is_expression(self):
|
|
3406
|
+
b = """type(x+y) is d.get('T')"""
|
|
3407
|
+
a = """isinstance(x+y, d.get('T'))"""
|
|
3408
|
+
self.check(b, a)
|
|
3409
|
+
|
|
3410
|
+
b = """type( x + y) is d.get('T')"""
|
|
3411
|
+
a = """isinstance(x + y, d.get('T'))"""
|
|
3412
|
+
self.check(b, a)
|
|
3413
|
+
|
|
3414
|
+
def test_is_not_simple(self):
|
|
3415
|
+
b = """type(x) is not T"""
|
|
3416
|
+
a = """not isinstance(x, T)"""
|
|
3417
|
+
self.check(b, a)
|
|
3418
|
+
|
|
3419
|
+
b = """if type(x) is not T: pass"""
|
|
3420
|
+
a = """if not isinstance(x, T): pass"""
|
|
3421
|
+
self.check(b, a)
|
|
3422
|
+
|
|
3423
|
+
def test_is_not_reverse(self):
|
|
3424
|
+
b = """T is not type(x)"""
|
|
3425
|
+
a = """not isinstance(x, T)"""
|
|
3426
|
+
self.check(b, a)
|
|
3427
|
+
|
|
3428
|
+
b = """if T is not type(x): pass"""
|
|
3429
|
+
a = """if not isinstance(x, T): pass"""
|
|
3430
|
+
self.check(b, a)
|
|
3431
|
+
|
|
3432
|
+
def test_is_not_expression(self):
|
|
3433
|
+
b = """type(x+y) is not d.get('T')"""
|
|
3434
|
+
a = """not isinstance(x+y, d.get('T'))"""
|
|
3435
|
+
self.check(b, a)
|
|
3436
|
+
|
|
3437
|
+
b = """type( x + y) is not d.get('T')"""
|
|
3438
|
+
a = """not isinstance(x + y, d.get('T'))"""
|
|
3439
|
+
self.check(b, a)
|
|
3440
|
+
|
|
3441
|
+
def test_ne_simple(self):
|
|
3442
|
+
b = """type(x) != T"""
|
|
3443
|
+
a = """not isinstance(x, T)"""
|
|
3444
|
+
self.check(b, a)
|
|
3445
|
+
|
|
3446
|
+
b = """if type(x) != T: pass"""
|
|
3447
|
+
a = """if not isinstance(x, T): pass"""
|
|
3448
|
+
self.check(b, a)
|
|
3449
|
+
|
|
3450
|
+
def test_ne_reverse(self):
|
|
3451
|
+
b = """T != type(x)"""
|
|
3452
|
+
a = """not isinstance(x, T)"""
|
|
3453
|
+
self.check(b, a)
|
|
3454
|
+
|
|
3455
|
+
b = """if T != type(x): pass"""
|
|
3456
|
+
a = """if not isinstance(x, T): pass"""
|
|
3457
|
+
self.check(b, a)
|
|
3458
|
+
|
|
3459
|
+
def test_ne_expression(self):
|
|
3460
|
+
b = """type(x+y) != d.get('T')"""
|
|
3461
|
+
a = """not isinstance(x+y, d.get('T'))"""
|
|
3462
|
+
self.check(b, a)
|
|
3463
|
+
|
|
3464
|
+
b = """type( x + y) != d.get('T')"""
|
|
3465
|
+
a = """not isinstance(x + y, d.get('T'))"""
|
|
3466
|
+
self.check(b, a)
|
|
3467
|
+
|
|
3468
|
+
def test_type_unchanged(self):
|
|
3469
|
+
a = """type(x).__name__"""
|
|
3470
|
+
self.unchanged(a)
|
|
3471
|
+
|
|
3472
|
+
def test_sort_list_call(self):
|
|
3473
|
+
b = """
|
|
3474
|
+
v = list(t)
|
|
3475
|
+
v.sort()
|
|
3476
|
+
foo(v)
|
|
3477
|
+
"""
|
|
3478
|
+
a = """
|
|
3479
|
+
v = sorted(t)
|
|
3480
|
+
foo(v)
|
|
3481
|
+
"""
|
|
3482
|
+
self.check(b, a)
|
|
3483
|
+
|
|
3484
|
+
b = """
|
|
3485
|
+
v = list(foo(b) + d)
|
|
3486
|
+
v.sort()
|
|
3487
|
+
foo(v)
|
|
3488
|
+
"""
|
|
3489
|
+
a = """
|
|
3490
|
+
v = sorted(foo(b) + d)
|
|
3491
|
+
foo(v)
|
|
3492
|
+
"""
|
|
3493
|
+
self.check(b, a)
|
|
3494
|
+
|
|
3495
|
+
b = """
|
|
3496
|
+
while x:
|
|
3497
|
+
v = list(t)
|
|
3498
|
+
v.sort()
|
|
3499
|
+
foo(v)
|
|
3500
|
+
"""
|
|
3501
|
+
a = """
|
|
3502
|
+
while x:
|
|
3503
|
+
v = sorted(t)
|
|
3504
|
+
foo(v)
|
|
3505
|
+
"""
|
|
3506
|
+
self.check(b, a)
|
|
3507
|
+
|
|
3508
|
+
b = """
|
|
3509
|
+
v = list(t)
|
|
3510
|
+
# foo
|
|
3511
|
+
v.sort()
|
|
3512
|
+
foo(v)
|
|
3513
|
+
"""
|
|
3514
|
+
a = """
|
|
3515
|
+
v = sorted(t)
|
|
3516
|
+
# foo
|
|
3517
|
+
foo(v)
|
|
3518
|
+
"""
|
|
3519
|
+
self.check(b, a)
|
|
3520
|
+
|
|
3521
|
+
b = r"""
|
|
3522
|
+
v = list( t)
|
|
3523
|
+
v.sort()
|
|
3524
|
+
foo(v)
|
|
3525
|
+
"""
|
|
3526
|
+
a = r"""
|
|
3527
|
+
v = sorted( t)
|
|
3528
|
+
foo(v)
|
|
3529
|
+
"""
|
|
3530
|
+
self.check(b, a)
|
|
3531
|
+
|
|
3532
|
+
b = r"""
|
|
3533
|
+
try:
|
|
3534
|
+
m = list(s)
|
|
3535
|
+
m.sort()
|
|
3536
|
+
except: pass
|
|
3537
|
+
"""
|
|
3538
|
+
|
|
3539
|
+
a = r"""
|
|
3540
|
+
try:
|
|
3541
|
+
m = sorted(s)
|
|
3542
|
+
except: pass
|
|
3543
|
+
"""
|
|
3544
|
+
self.check(b, a)
|
|
3545
|
+
|
|
3546
|
+
b = r"""
|
|
3547
|
+
try:
|
|
3548
|
+
m = list(s)
|
|
3549
|
+
# foo
|
|
3550
|
+
m.sort()
|
|
3551
|
+
except: pass
|
|
3552
|
+
"""
|
|
3553
|
+
|
|
3554
|
+
a = r"""
|
|
3555
|
+
try:
|
|
3556
|
+
m = sorted(s)
|
|
3557
|
+
# foo
|
|
3558
|
+
except: pass
|
|
3559
|
+
"""
|
|
3560
|
+
self.check(b, a)
|
|
3561
|
+
|
|
3562
|
+
b = r"""
|
|
3563
|
+
m = list(s)
|
|
3564
|
+
# more comments
|
|
3565
|
+
m.sort()"""
|
|
3566
|
+
|
|
3567
|
+
a = r"""
|
|
3568
|
+
m = sorted(s)
|
|
3569
|
+
# more comments"""
|
|
3570
|
+
self.check(b, a)
|
|
3571
|
+
|
|
3572
|
+
def test_sort_simple_expr(self):
|
|
3573
|
+
b = """
|
|
3574
|
+
v = t
|
|
3575
|
+
v.sort()
|
|
3576
|
+
foo(v)
|
|
3577
|
+
"""
|
|
3578
|
+
a = """
|
|
3579
|
+
v = sorted(t)
|
|
3580
|
+
foo(v)
|
|
3581
|
+
"""
|
|
3582
|
+
self.check(b, a)
|
|
3583
|
+
|
|
3584
|
+
b = """
|
|
3585
|
+
v = foo(b)
|
|
3586
|
+
v.sort()
|
|
3587
|
+
foo(v)
|
|
3588
|
+
"""
|
|
3589
|
+
a = """
|
|
3590
|
+
v = sorted(foo(b))
|
|
3591
|
+
foo(v)
|
|
3592
|
+
"""
|
|
3593
|
+
self.check(b, a)
|
|
3594
|
+
|
|
3595
|
+
b = """
|
|
3596
|
+
v = b.keys()
|
|
3597
|
+
v.sort()
|
|
3598
|
+
foo(v)
|
|
3599
|
+
"""
|
|
3600
|
+
a = """
|
|
3601
|
+
v = sorted(b.keys())
|
|
3602
|
+
foo(v)
|
|
3603
|
+
"""
|
|
3604
|
+
self.check(b, a)
|
|
3605
|
+
|
|
3606
|
+
b = """
|
|
3607
|
+
v = foo(b) + d
|
|
3608
|
+
v.sort()
|
|
3609
|
+
foo(v)
|
|
3610
|
+
"""
|
|
3611
|
+
a = """
|
|
3612
|
+
v = sorted(foo(b) + d)
|
|
3613
|
+
foo(v)
|
|
3614
|
+
"""
|
|
3615
|
+
self.check(b, a)
|
|
3616
|
+
|
|
3617
|
+
b = """
|
|
3618
|
+
while x:
|
|
3619
|
+
v = t
|
|
3620
|
+
v.sort()
|
|
3621
|
+
foo(v)
|
|
3622
|
+
"""
|
|
3623
|
+
a = """
|
|
3624
|
+
while x:
|
|
3625
|
+
v = sorted(t)
|
|
3626
|
+
foo(v)
|
|
3627
|
+
"""
|
|
3628
|
+
self.check(b, a)
|
|
3629
|
+
|
|
3630
|
+
b = """
|
|
3631
|
+
v = t
|
|
3632
|
+
# foo
|
|
3633
|
+
v.sort()
|
|
3634
|
+
foo(v)
|
|
3635
|
+
"""
|
|
3636
|
+
a = """
|
|
3637
|
+
v = sorted(t)
|
|
3638
|
+
# foo
|
|
3639
|
+
foo(v)
|
|
3640
|
+
"""
|
|
3641
|
+
self.check(b, a)
|
|
3642
|
+
|
|
3643
|
+
b = r"""
|
|
3644
|
+
v = t
|
|
3645
|
+
v.sort()
|
|
3646
|
+
foo(v)
|
|
3647
|
+
"""
|
|
3648
|
+
a = r"""
|
|
3649
|
+
v = sorted(t)
|
|
3650
|
+
foo(v)
|
|
3651
|
+
"""
|
|
3652
|
+
self.check(b, a)
|
|
3653
|
+
|
|
3654
|
+
def test_sort_unchanged(self):
|
|
3655
|
+
s = """
|
|
3656
|
+
v = list(t)
|
|
3657
|
+
w.sort()
|
|
3658
|
+
foo(w)
|
|
3659
|
+
"""
|
|
3660
|
+
self.unchanged(s)
|
|
3661
|
+
|
|
3662
|
+
s = """
|
|
3663
|
+
v = list(t)
|
|
3664
|
+
v.sort(u)
|
|
3665
|
+
foo(v)
|
|
3666
|
+
"""
|
|
3667
|
+
self.unchanged(s)
|
|
3668
|
+
|
|
3669
|
+
class Test_basestring(FixerTestCase):
|
|
3670
|
+
fixer = "basestring"
|
|
3671
|
+
|
|
3672
|
+
def test_basestring(self):
|
|
3673
|
+
b = """isinstance(x, basestring)"""
|
|
3674
|
+
a = """isinstance(x, str)"""
|
|
3675
|
+
self.check(b, a)
|
|
3676
|
+
|
|
3677
|
+
class Test_buffer(FixerTestCase):
|
|
3678
|
+
fixer = "buffer"
|
|
3679
|
+
|
|
3680
|
+
def test_buffer(self):
|
|
3681
|
+
b = """x = buffer(y)"""
|
|
3682
|
+
a = """x = memoryview(y)"""
|
|
3683
|
+
self.check(b, a)
|
|
3684
|
+
|
|
3685
|
+
def test_slicing(self):
|
|
3686
|
+
b = """buffer(y)[4:5]"""
|
|
3687
|
+
a = """memoryview(y)[4:5]"""
|
|
3688
|
+
self.check(b, a)
|
|
3689
|
+
|
|
3690
|
+
class Test_future(FixerTestCase):
|
|
3691
|
+
fixer = "future"
|
|
3692
|
+
|
|
3693
|
+
def test_future(self):
|
|
3694
|
+
b = """from __future__ import braces"""
|
|
3695
|
+
a = """"""
|
|
3696
|
+
self.check(b, a)
|
|
3697
|
+
|
|
3698
|
+
b = """# comment\nfrom __future__ import braces"""
|
|
3699
|
+
a = """# comment\n"""
|
|
3700
|
+
self.check(b, a)
|
|
3701
|
+
|
|
3702
|
+
b = """from __future__ import braces\n# comment"""
|
|
3703
|
+
a = """\n# comment"""
|
|
3704
|
+
self.check(b, a)
|
|
3705
|
+
|
|
3706
|
+
def test_run_order(self):
|
|
3707
|
+
self.assert_runs_after('print')
|
|
3708
|
+
|
|
3709
|
+
class Test_itertools(FixerTestCase):
|
|
3710
|
+
fixer = "itertools"
|
|
3711
|
+
|
|
3712
|
+
def checkall(self, before, after):
|
|
3713
|
+
# Because we need to check with and without the itertools prefix
|
|
3714
|
+
# and on each of the three functions, these loops make it all
|
|
3715
|
+
# much easier
|
|
3716
|
+
for i in ('itertools.', ''):
|
|
3717
|
+
for f in ('map', 'filter', 'zip'):
|
|
3718
|
+
b = before %(i+'i'+f)
|
|
3719
|
+
a = after %(f)
|
|
3720
|
+
self.check(b, a)
|
|
3721
|
+
|
|
3722
|
+
def test_0(self):
|
|
3723
|
+
# A simple example -- test_1 covers exactly the same thing,
|
|
3724
|
+
# but it's not quite as clear.
|
|
3725
|
+
b = "itertools.izip(a, b)"
|
|
3726
|
+
a = "zip(a, b)"
|
|
3727
|
+
self.check(b, a)
|
|
3728
|
+
|
|
3729
|
+
def test_1(self):
|
|
3730
|
+
b = """%s(f, a)"""
|
|
3731
|
+
a = """%s(f, a)"""
|
|
3732
|
+
self.checkall(b, a)
|
|
3733
|
+
|
|
3734
|
+
def test_qualified(self):
|
|
3735
|
+
b = """itertools.ifilterfalse(a, b)"""
|
|
3736
|
+
a = """itertools.filterfalse(a, b)"""
|
|
3737
|
+
self.check(b, a)
|
|
3738
|
+
|
|
3739
|
+
b = """itertools.izip_longest(a, b)"""
|
|
3740
|
+
a = """itertools.zip_longest(a, b)"""
|
|
3741
|
+
self.check(b, a)
|
|
3742
|
+
|
|
3743
|
+
def test_2(self):
|
|
3744
|
+
b = """ifilterfalse(a, b)"""
|
|
3745
|
+
a = """filterfalse(a, b)"""
|
|
3746
|
+
self.check(b, a)
|
|
3747
|
+
|
|
3748
|
+
b = """izip_longest(a, b)"""
|
|
3749
|
+
a = """zip_longest(a, b)"""
|
|
3750
|
+
self.check(b, a)
|
|
3751
|
+
|
|
3752
|
+
def test_space_1(self):
|
|
3753
|
+
b = """ %s(f, a)"""
|
|
3754
|
+
a = """ %s(f, a)"""
|
|
3755
|
+
self.checkall(b, a)
|
|
3756
|
+
|
|
3757
|
+
def test_space_2(self):
|
|
3758
|
+
b = """ itertools.ifilterfalse(a, b)"""
|
|
3759
|
+
a = """ itertools.filterfalse(a, b)"""
|
|
3760
|
+
self.check(b, a)
|
|
3761
|
+
|
|
3762
|
+
b = """ itertools.izip_longest(a, b)"""
|
|
3763
|
+
a = """ itertools.zip_longest(a, b)"""
|
|
3764
|
+
self.check(b, a)
|
|
3765
|
+
|
|
3766
|
+
def test_run_order(self):
|
|
3767
|
+
self.assert_runs_after('map', 'zip', 'filter')
|
|
3768
|
+
|
|
3769
|
+
|
|
3770
|
+
class Test_itertools_imports(FixerTestCase):
|
|
3771
|
+
fixer = 'itertools_imports'
|
|
3772
|
+
|
|
3773
|
+
def test_reduced(self):
|
|
3774
|
+
b = "from itertools import imap, izip, foo"
|
|
3775
|
+
a = "from itertools import foo"
|
|
3776
|
+
self.check(b, a)
|
|
3777
|
+
|
|
3778
|
+
b = "from itertools import bar, imap, izip, foo"
|
|
3779
|
+
a = "from itertools import bar, foo"
|
|
3780
|
+
self.check(b, a)
|
|
3781
|
+
|
|
3782
|
+
b = "from itertools import chain, imap, izip"
|
|
3783
|
+
a = "from itertools import chain"
|
|
3784
|
+
self.check(b, a)
|
|
3785
|
+
|
|
3786
|
+
def test_comments(self):
|
|
3787
|
+
b = "#foo\nfrom itertools import imap, izip"
|
|
3788
|
+
a = "#foo\n"
|
|
3789
|
+
self.check(b, a)
|
|
3790
|
+
|
|
3791
|
+
def test_none(self):
|
|
3792
|
+
b = "from itertools import imap, izip"
|
|
3793
|
+
a = ""
|
|
3794
|
+
self.check(b, a)
|
|
3795
|
+
|
|
3796
|
+
b = "from itertools import izip"
|
|
3797
|
+
a = ""
|
|
3798
|
+
self.check(b, a)
|
|
3799
|
+
|
|
3800
|
+
def test_import_as(self):
|
|
3801
|
+
b = "from itertools import izip, bar as bang, imap"
|
|
3802
|
+
a = "from itertools import bar as bang"
|
|
3803
|
+
self.check(b, a)
|
|
3804
|
+
|
|
3805
|
+
b = "from itertools import izip as _zip, imap, bar"
|
|
3806
|
+
a = "from itertools import bar"
|
|
3807
|
+
self.check(b, a)
|
|
3808
|
+
|
|
3809
|
+
b = "from itertools import imap as _map"
|
|
3810
|
+
a = ""
|
|
3811
|
+
self.check(b, a)
|
|
3812
|
+
|
|
3813
|
+
b = "from itertools import imap as _map, izip as _zip"
|
|
3814
|
+
a = ""
|
|
3815
|
+
self.check(b, a)
|
|
3816
|
+
|
|
3817
|
+
s = "from itertools import bar as bang"
|
|
3818
|
+
self.unchanged(s)
|
|
3819
|
+
|
|
3820
|
+
def test_ifilter_and_zip_longest(self):
|
|
3821
|
+
for name in "filterfalse", "zip_longest":
|
|
3822
|
+
b = "from itertools import i%s" % (name,)
|
|
3823
|
+
a = "from itertools import %s" % (name,)
|
|
3824
|
+
self.check(b, a)
|
|
3825
|
+
|
|
3826
|
+
b = "from itertools import imap, i%s, foo" % (name,)
|
|
3827
|
+
a = "from itertools import %s, foo" % (name,)
|
|
3828
|
+
self.check(b, a)
|
|
3829
|
+
|
|
3830
|
+
b = "from itertools import bar, i%s, foo" % (name,)
|
|
3831
|
+
a = "from itertools import bar, %s, foo" % (name,)
|
|
3832
|
+
self.check(b, a)
|
|
3833
|
+
|
|
3834
|
+
def test_import_star(self):
|
|
3835
|
+
s = "from itertools import *"
|
|
3836
|
+
self.unchanged(s)
|
|
3837
|
+
|
|
3838
|
+
|
|
3839
|
+
def test_unchanged(self):
|
|
3840
|
+
s = "from itertools import foo"
|
|
3841
|
+
self.unchanged(s)
|
|
3842
|
+
|
|
3843
|
+
|
|
3844
|
+
class Test_import(FixerTestCase):
|
|
3845
|
+
fixer = "import"
|
|
3846
|
+
|
|
3847
|
+
def setUp(self):
|
|
3848
|
+
super(Test_import, self).setUp()
|
|
3849
|
+
# Need to replace fix_import's exists method
|
|
3850
|
+
# so we can check that it's doing the right thing
|
|
3851
|
+
self.files_checked = []
|
|
3852
|
+
self.present_files = set()
|
|
3853
|
+
self.always_exists = True
|
|
3854
|
+
def fake_exists(name):
|
|
3855
|
+
self.files_checked.append(name)
|
|
3856
|
+
return self.always_exists or (name in self.present_files)
|
|
3857
|
+
|
|
3858
|
+
from lib2to3.fixes import fix_import
|
|
3859
|
+
fix_import.exists = fake_exists
|
|
3860
|
+
|
|
3861
|
+
def tearDown(self):
|
|
3862
|
+
from lib2to3.fixes import fix_import
|
|
3863
|
+
fix_import.exists = os.path.exists
|
|
3864
|
+
|
|
3865
|
+
def check_both(self, b, a):
|
|
3866
|
+
self.always_exists = True
|
|
3867
|
+
super(Test_import, self).check(b, a)
|
|
3868
|
+
self.always_exists = False
|
|
3869
|
+
super(Test_import, self).unchanged(b)
|
|
3870
|
+
|
|
3871
|
+
def test_files_checked(self):
|
|
3872
|
+
def p(path):
|
|
3873
|
+
# Takes a unix path and returns a path with correct separators
|
|
3874
|
+
return os.path.pathsep.join(path.split("/"))
|
|
3875
|
+
|
|
3876
|
+
self.always_exists = False
|
|
3877
|
+
self.present_files = set(['__init__.py'])
|
|
3878
|
+
expected_extensions = ('.py', os.path.sep, '.pyc', '.so', '.sl', '.pyd')
|
|
3879
|
+
names_to_test = (p("/spam/eggs.py"), "ni.py", p("../../shrubbery.py"))
|
|
3880
|
+
|
|
3881
|
+
for name in names_to_test:
|
|
3882
|
+
self.files_checked = []
|
|
3883
|
+
self.filename = name
|
|
3884
|
+
self.unchanged("import jam")
|
|
3885
|
+
|
|
3886
|
+
if os.path.dirname(name):
|
|
3887
|
+
name = os.path.dirname(name) + '/jam'
|
|
3888
|
+
else:
|
|
3889
|
+
name = 'jam'
|
|
3890
|
+
expected_checks = set(name + ext for ext in expected_extensions)
|
|
3891
|
+
expected_checks.add("__init__.py")
|
|
3892
|
+
|
|
3893
|
+
self.assertEqual(set(self.files_checked), expected_checks)
|
|
3894
|
+
|
|
3895
|
+
def test_not_in_package(self):
|
|
3896
|
+
s = "import bar"
|
|
3897
|
+
self.always_exists = False
|
|
3898
|
+
self.present_files = set(["bar.py"])
|
|
3899
|
+
self.unchanged(s)
|
|
3900
|
+
|
|
3901
|
+
def test_with_absolute_import_enabled(self):
|
|
3902
|
+
s = "from __future__ import absolute_import\nimport bar"
|
|
3903
|
+
self.always_exists = False
|
|
3904
|
+
self.present_files = set(["__init__.py", "bar.py"])
|
|
3905
|
+
self.unchanged(s)
|
|
3906
|
+
|
|
3907
|
+
def test_in_package(self):
|
|
3908
|
+
b = "import bar"
|
|
3909
|
+
a = "from . import bar"
|
|
3910
|
+
self.always_exists = False
|
|
3911
|
+
self.present_files = set(["__init__.py", "bar.py"])
|
|
3912
|
+
self.check(b, a)
|
|
3913
|
+
|
|
3914
|
+
def test_import_from_package(self):
|
|
3915
|
+
b = "import bar"
|
|
3916
|
+
a = "from . import bar"
|
|
3917
|
+
self.always_exists = False
|
|
3918
|
+
self.present_files = set(["__init__.py", "bar" + os.path.sep])
|
|
3919
|
+
self.check(b, a)
|
|
3920
|
+
|
|
3921
|
+
def test_already_relative_import(self):
|
|
3922
|
+
s = "from . import bar"
|
|
3923
|
+
self.unchanged(s)
|
|
3924
|
+
|
|
3925
|
+
def test_comments_and_indent(self):
|
|
3926
|
+
b = "import bar # Foo"
|
|
3927
|
+
a = "from . import bar # Foo"
|
|
3928
|
+
self.check(b, a)
|
|
3929
|
+
|
|
3930
|
+
def test_from(self):
|
|
3931
|
+
b = "from foo import bar, baz"
|
|
3932
|
+
a = "from .foo import bar, baz"
|
|
3933
|
+
self.check_both(b, a)
|
|
3934
|
+
|
|
3935
|
+
b = "from foo import bar"
|
|
3936
|
+
a = "from .foo import bar"
|
|
3937
|
+
self.check_both(b, a)
|
|
3938
|
+
|
|
3939
|
+
b = "from foo import (bar, baz)"
|
|
3940
|
+
a = "from .foo import (bar, baz)"
|
|
3941
|
+
self.check_both(b, a)
|
|
3942
|
+
|
|
3943
|
+
def test_dotted_from(self):
|
|
3944
|
+
b = "from green.eggs import ham"
|
|
3945
|
+
a = "from .green.eggs import ham"
|
|
3946
|
+
self.check_both(b, a)
|
|
3947
|
+
|
|
3948
|
+
def test_from_as(self):
|
|
3949
|
+
b = "from green.eggs import ham as spam"
|
|
3950
|
+
a = "from .green.eggs import ham as spam"
|
|
3951
|
+
self.check_both(b, a)
|
|
3952
|
+
|
|
3953
|
+
def test_import(self):
|
|
3954
|
+
b = "import foo"
|
|
3955
|
+
a = "from . import foo"
|
|
3956
|
+
self.check_both(b, a)
|
|
3957
|
+
|
|
3958
|
+
b = "import foo, bar"
|
|
3959
|
+
a = "from . import foo, bar"
|
|
3960
|
+
self.check_both(b, a)
|
|
3961
|
+
|
|
3962
|
+
b = "import foo, bar, x"
|
|
3963
|
+
a = "from . import foo, bar, x"
|
|
3964
|
+
self.check_both(b, a)
|
|
3965
|
+
|
|
3966
|
+
b = "import x, y, z"
|
|
3967
|
+
a = "from . import x, y, z"
|
|
3968
|
+
self.check_both(b, a)
|
|
3969
|
+
|
|
3970
|
+
def test_import_as(self):
|
|
3971
|
+
b = "import foo as x"
|
|
3972
|
+
a = "from . import foo as x"
|
|
3973
|
+
self.check_both(b, a)
|
|
3974
|
+
|
|
3975
|
+
b = "import a as b, b as c, c as d"
|
|
3976
|
+
a = "from . import a as b, b as c, c as d"
|
|
3977
|
+
self.check_both(b, a)
|
|
3978
|
+
|
|
3979
|
+
def test_local_and_absolute(self):
|
|
3980
|
+
self.always_exists = False
|
|
3981
|
+
self.present_files = set(["foo.py", "__init__.py"])
|
|
3982
|
+
|
|
3983
|
+
s = "import foo, bar"
|
|
3984
|
+
self.warns_unchanged(s, "absolute and local imports together")
|
|
3985
|
+
|
|
3986
|
+
def test_dotted_import(self):
|
|
3987
|
+
b = "import foo.bar"
|
|
3988
|
+
a = "from . import foo.bar"
|
|
3989
|
+
self.check_both(b, a)
|
|
3990
|
+
|
|
3991
|
+
def test_dotted_import_as(self):
|
|
3992
|
+
b = "import foo.bar as bang"
|
|
3993
|
+
a = "from . import foo.bar as bang"
|
|
3994
|
+
self.check_both(b, a)
|
|
3995
|
+
|
|
3996
|
+
def test_prefix(self):
|
|
3997
|
+
b = """
|
|
3998
|
+
# prefix
|
|
3999
|
+
import foo.bar
|
|
4000
|
+
"""
|
|
4001
|
+
a = """
|
|
4002
|
+
# prefix
|
|
4003
|
+
from . import foo.bar
|
|
4004
|
+
"""
|
|
4005
|
+
self.check_both(b, a)
|
|
4006
|
+
|
|
4007
|
+
|
|
4008
|
+
class Test_set_literal(FixerTestCase):
|
|
4009
|
+
|
|
4010
|
+
fixer = "set_literal"
|
|
4011
|
+
|
|
4012
|
+
def test_basic(self):
|
|
4013
|
+
b = """set([1, 2, 3])"""
|
|
4014
|
+
a = """{1, 2, 3}"""
|
|
4015
|
+
self.check(b, a)
|
|
4016
|
+
|
|
4017
|
+
b = """set((1, 2, 3))"""
|
|
4018
|
+
a = """{1, 2, 3}"""
|
|
4019
|
+
self.check(b, a)
|
|
4020
|
+
|
|
4021
|
+
b = """set((1,))"""
|
|
4022
|
+
a = """{1}"""
|
|
4023
|
+
self.check(b, a)
|
|
4024
|
+
|
|
4025
|
+
b = """set([1])"""
|
|
4026
|
+
self.check(b, a)
|
|
4027
|
+
|
|
4028
|
+
b = """set((a, b))"""
|
|
4029
|
+
a = """{a, b}"""
|
|
4030
|
+
self.check(b, a)
|
|
4031
|
+
|
|
4032
|
+
b = """set([a, b])"""
|
|
4033
|
+
self.check(b, a)
|
|
4034
|
+
|
|
4035
|
+
b = """set((a*234, f(args=23)))"""
|
|
4036
|
+
a = """{a*234, f(args=23)}"""
|
|
4037
|
+
self.check(b, a)
|
|
4038
|
+
|
|
4039
|
+
b = """set([a*23, f(23)])"""
|
|
4040
|
+
a = """{a*23, f(23)}"""
|
|
4041
|
+
self.check(b, a)
|
|
4042
|
+
|
|
4043
|
+
b = """set([a-234**23])"""
|
|
4044
|
+
a = """{a-234**23}"""
|
|
4045
|
+
self.check(b, a)
|
|
4046
|
+
|
|
4047
|
+
def test_listcomps(self):
|
|
4048
|
+
b = """set([x for x in y])"""
|
|
4049
|
+
a = """{x for x in y}"""
|
|
4050
|
+
self.check(b, a)
|
|
4051
|
+
|
|
4052
|
+
b = """set([x for x in y if x == m])"""
|
|
4053
|
+
a = """{x for x in y if x == m}"""
|
|
4054
|
+
self.check(b, a)
|
|
4055
|
+
|
|
4056
|
+
b = """set([x for x in y for a in b])"""
|
|
4057
|
+
a = """{x for x in y for a in b}"""
|
|
4058
|
+
self.check(b, a)
|
|
4059
|
+
|
|
4060
|
+
b = """set([f(x) - 23 for x in y])"""
|
|
4061
|
+
a = """{f(x) - 23 for x in y}"""
|
|
4062
|
+
self.check(b, a)
|
|
4063
|
+
|
|
4064
|
+
def test_whitespace(self):
|
|
4065
|
+
b = """set( [1, 2])"""
|
|
4066
|
+
a = """{1, 2}"""
|
|
4067
|
+
self.check(b, a)
|
|
4068
|
+
|
|
4069
|
+
b = """set([1 , 2])"""
|
|
4070
|
+
a = """{1 , 2}"""
|
|
4071
|
+
self.check(b, a)
|
|
4072
|
+
|
|
4073
|
+
b = """set([ 1 ])"""
|
|
4074
|
+
a = """{ 1 }"""
|
|
4075
|
+
self.check(b, a)
|
|
4076
|
+
|
|
4077
|
+
b = """set( [1] )"""
|
|
4078
|
+
a = """{1}"""
|
|
4079
|
+
self.check(b, a)
|
|
4080
|
+
|
|
4081
|
+
b = """set([ 1, 2 ])"""
|
|
4082
|
+
a = """{ 1, 2 }"""
|
|
4083
|
+
self.check(b, a)
|
|
4084
|
+
|
|
4085
|
+
b = """set([x for x in y ])"""
|
|
4086
|
+
a = """{x for x in y }"""
|
|
4087
|
+
self.check(b, a)
|
|
4088
|
+
|
|
4089
|
+
b = """set(
|
|
4090
|
+
[1, 2]
|
|
4091
|
+
)
|
|
4092
|
+
"""
|
|
4093
|
+
a = """{1, 2}\n"""
|
|
4094
|
+
self.check(b, a)
|
|
4095
|
+
|
|
4096
|
+
def test_comments(self):
|
|
4097
|
+
b = """set((1, 2)) # Hi"""
|
|
4098
|
+
a = """{1, 2} # Hi"""
|
|
4099
|
+
self.check(b, a)
|
|
4100
|
+
|
|
4101
|
+
# This isn't optimal behavior, but the fixer is optional.
|
|
4102
|
+
b = """
|
|
4103
|
+
# Foo
|
|
4104
|
+
set( # Bar
|
|
4105
|
+
(1, 2)
|
|
4106
|
+
)
|
|
4107
|
+
"""
|
|
4108
|
+
a = """
|
|
4109
|
+
# Foo
|
|
4110
|
+
{1, 2}
|
|
4111
|
+
"""
|
|
4112
|
+
self.check(b, a)
|
|
4113
|
+
|
|
4114
|
+
def test_unchanged(self):
|
|
4115
|
+
s = """set()"""
|
|
4116
|
+
self.unchanged(s)
|
|
4117
|
+
|
|
4118
|
+
s = """set(a)"""
|
|
4119
|
+
self.unchanged(s)
|
|
4120
|
+
|
|
4121
|
+
s = """set(a, b, c)"""
|
|
4122
|
+
self.unchanged(s)
|
|
4123
|
+
|
|
4124
|
+
# Don't transform generators because they might have to be lazy.
|
|
4125
|
+
s = """set(x for x in y)"""
|
|
4126
|
+
self.unchanged(s)
|
|
4127
|
+
|
|
4128
|
+
s = """set(x for x in y if z)"""
|
|
4129
|
+
self.unchanged(s)
|
|
4130
|
+
|
|
4131
|
+
s = """set(a*823-23**2 + f(23))"""
|
|
4132
|
+
self.unchanged(s)
|
|
4133
|
+
|
|
4134
|
+
|
|
4135
|
+
class Test_sys_exc(FixerTestCase):
|
|
4136
|
+
fixer = "sys_exc"
|
|
4137
|
+
|
|
4138
|
+
def test_0(self):
|
|
4139
|
+
b = "sys.exc_type"
|
|
4140
|
+
a = "sys.exc_info()[0]"
|
|
4141
|
+
self.check(b, a)
|
|
4142
|
+
|
|
4143
|
+
def test_1(self):
|
|
4144
|
+
b = "sys.exc_value"
|
|
4145
|
+
a = "sys.exc_info()[1]"
|
|
4146
|
+
self.check(b, a)
|
|
4147
|
+
|
|
4148
|
+
def test_2(self):
|
|
4149
|
+
b = "sys.exc_traceback"
|
|
4150
|
+
a = "sys.exc_info()[2]"
|
|
4151
|
+
self.check(b, a)
|
|
4152
|
+
|
|
4153
|
+
def test_3(self):
|
|
4154
|
+
b = "sys.exc_type # Foo"
|
|
4155
|
+
a = "sys.exc_info()[0] # Foo"
|
|
4156
|
+
self.check(b, a)
|
|
4157
|
+
|
|
4158
|
+
def test_4(self):
|
|
4159
|
+
b = "sys. exc_type"
|
|
4160
|
+
a = "sys. exc_info()[0]"
|
|
4161
|
+
self.check(b, a)
|
|
4162
|
+
|
|
4163
|
+
def test_5(self):
|
|
4164
|
+
b = "sys .exc_type"
|
|
4165
|
+
a = "sys .exc_info()[0]"
|
|
4166
|
+
self.check(b, a)
|
|
4167
|
+
|
|
4168
|
+
|
|
4169
|
+
class Test_paren(FixerTestCase):
|
|
4170
|
+
fixer = "paren"
|
|
4171
|
+
|
|
4172
|
+
def test_0(self):
|
|
4173
|
+
b = """[i for i in 1, 2 ]"""
|
|
4174
|
+
a = """[i for i in (1, 2) ]"""
|
|
4175
|
+
self.check(b, a)
|
|
4176
|
+
|
|
4177
|
+
def test_1(self):
|
|
4178
|
+
b = """[i for i in 1, 2, ]"""
|
|
4179
|
+
a = """[i for i in (1, 2,) ]"""
|
|
4180
|
+
self.check(b, a)
|
|
4181
|
+
|
|
4182
|
+
def test_2(self):
|
|
4183
|
+
b = """[i for i in 1, 2 ]"""
|
|
4184
|
+
a = """[i for i in (1, 2) ]"""
|
|
4185
|
+
self.check(b, a)
|
|
4186
|
+
|
|
4187
|
+
def test_3(self):
|
|
4188
|
+
b = """[i for i in 1, 2 if i]"""
|
|
4189
|
+
a = """[i for i in (1, 2) if i]"""
|
|
4190
|
+
self.check(b, a)
|
|
4191
|
+
|
|
4192
|
+
def test_4(self):
|
|
4193
|
+
b = """[i for i in 1, 2 ]"""
|
|
4194
|
+
a = """[i for i in (1, 2) ]"""
|
|
4195
|
+
self.check(b, a)
|
|
4196
|
+
|
|
4197
|
+
def test_5(self):
|
|
4198
|
+
b = """(i for i in 1, 2)"""
|
|
4199
|
+
a = """(i for i in (1, 2))"""
|
|
4200
|
+
self.check(b, a)
|
|
4201
|
+
|
|
4202
|
+
def test_6(self):
|
|
4203
|
+
b = """(i for i in 1 ,2 if i)"""
|
|
4204
|
+
a = """(i for i in (1 ,2) if i)"""
|
|
4205
|
+
self.check(b, a)
|
|
4206
|
+
|
|
4207
|
+
def test_unchanged_0(self):
|
|
4208
|
+
s = """[i for i in (1, 2)]"""
|
|
4209
|
+
self.unchanged(s)
|
|
4210
|
+
|
|
4211
|
+
def test_unchanged_1(self):
|
|
4212
|
+
s = """[i for i in foo()]"""
|
|
4213
|
+
self.unchanged(s)
|
|
4214
|
+
|
|
4215
|
+
def test_unchanged_2(self):
|
|
4216
|
+
s = """[i for i in (1, 2) if nothing]"""
|
|
4217
|
+
self.unchanged(s)
|
|
4218
|
+
|
|
4219
|
+
def test_unchanged_3(self):
|
|
4220
|
+
s = """(i for i in (1, 2))"""
|
|
4221
|
+
self.unchanged(s)
|
|
4222
|
+
|
|
4223
|
+
def test_unchanged_4(self):
|
|
4224
|
+
s = """[i for i in m]"""
|
|
4225
|
+
self.unchanged(s)
|
|
4226
|
+
|
|
4227
|
+
class Test_metaclass(FixerTestCase):
|
|
4228
|
+
|
|
4229
|
+
fixer = 'metaclass'
|
|
4230
|
+
|
|
4231
|
+
def test_unchanged(self):
|
|
4232
|
+
self.unchanged("class X(): pass")
|
|
4233
|
+
self.unchanged("class X(object): pass")
|
|
4234
|
+
self.unchanged("class X(object1, object2): pass")
|
|
4235
|
+
self.unchanged("class X(object1, object2, object3): pass")
|
|
4236
|
+
self.unchanged("class X(metaclass=Meta): pass")
|
|
4237
|
+
self.unchanged("class X(b, arg=23, metclass=Meta): pass")
|
|
4238
|
+
self.unchanged("class X(b, arg=23, metaclass=Meta, other=42): pass")
|
|
4239
|
+
|
|
4240
|
+
s = """
|
|
4241
|
+
class X:
|
|
4242
|
+
def __metaclass__(self): pass
|
|
4243
|
+
"""
|
|
4244
|
+
self.unchanged(s)
|
|
4245
|
+
|
|
4246
|
+
s = """
|
|
4247
|
+
class X:
|
|
4248
|
+
a[23] = 74
|
|
4249
|
+
"""
|
|
4250
|
+
self.unchanged(s)
|
|
4251
|
+
|
|
4252
|
+
def test_comments(self):
|
|
4253
|
+
b = """
|
|
4254
|
+
class X:
|
|
4255
|
+
# hi
|
|
4256
|
+
__metaclass__ = AppleMeta
|
|
4257
|
+
"""
|
|
4258
|
+
a = """
|
|
4259
|
+
class X(metaclass=AppleMeta):
|
|
4260
|
+
# hi
|
|
4261
|
+
pass
|
|
4262
|
+
"""
|
|
4263
|
+
self.check(b, a)
|
|
4264
|
+
|
|
4265
|
+
b = """
|
|
4266
|
+
class X:
|
|
4267
|
+
__metaclass__ = Meta
|
|
4268
|
+
# Bedtime!
|
|
4269
|
+
"""
|
|
4270
|
+
a = """
|
|
4271
|
+
class X(metaclass=Meta):
|
|
4272
|
+
pass
|
|
4273
|
+
# Bedtime!
|
|
4274
|
+
"""
|
|
4275
|
+
self.check(b, a)
|
|
4276
|
+
|
|
4277
|
+
def test_meta(self):
|
|
4278
|
+
# no-parent class, odd body
|
|
4279
|
+
b = """
|
|
4280
|
+
class X():
|
|
4281
|
+
__metaclass__ = Q
|
|
4282
|
+
pass
|
|
4283
|
+
"""
|
|
4284
|
+
a = """
|
|
4285
|
+
class X(metaclass=Q):
|
|
4286
|
+
pass
|
|
4287
|
+
"""
|
|
4288
|
+
self.check(b, a)
|
|
4289
|
+
|
|
4290
|
+
# one parent class, no body
|
|
4291
|
+
b = """class X(object): __metaclass__ = Q"""
|
|
4292
|
+
a = """class X(object, metaclass=Q): pass"""
|
|
4293
|
+
self.check(b, a)
|
|
4294
|
+
|
|
4295
|
+
|
|
4296
|
+
# one parent, simple body
|
|
4297
|
+
b = """
|
|
4298
|
+
class X(object):
|
|
4299
|
+
__metaclass__ = Meta
|
|
4300
|
+
bar = 7
|
|
4301
|
+
"""
|
|
4302
|
+
a = """
|
|
4303
|
+
class X(object, metaclass=Meta):
|
|
4304
|
+
bar = 7
|
|
4305
|
+
"""
|
|
4306
|
+
self.check(b, a)
|
|
4307
|
+
|
|
4308
|
+
b = """
|
|
4309
|
+
class X:
|
|
4310
|
+
__metaclass__ = Meta; x = 4; g = 23
|
|
4311
|
+
"""
|
|
4312
|
+
a = """
|
|
4313
|
+
class X(metaclass=Meta):
|
|
4314
|
+
x = 4; g = 23
|
|
4315
|
+
"""
|
|
4316
|
+
self.check(b, a)
|
|
4317
|
+
|
|
4318
|
+
# one parent, simple body, __metaclass__ last
|
|
4319
|
+
b = """
|
|
4320
|
+
class X(object):
|
|
4321
|
+
bar = 7
|
|
4322
|
+
__metaclass__ = Meta
|
|
4323
|
+
"""
|
|
4324
|
+
a = """
|
|
4325
|
+
class X(object, metaclass=Meta):
|
|
4326
|
+
bar = 7
|
|
4327
|
+
"""
|
|
4328
|
+
self.check(b, a)
|
|
4329
|
+
|
|
4330
|
+
# redefining __metaclass__
|
|
4331
|
+
b = """
|
|
4332
|
+
class X():
|
|
4333
|
+
__metaclass__ = A
|
|
4334
|
+
__metaclass__ = B
|
|
4335
|
+
bar = 7
|
|
4336
|
+
"""
|
|
4337
|
+
a = """
|
|
4338
|
+
class X(metaclass=B):
|
|
4339
|
+
bar = 7
|
|
4340
|
+
"""
|
|
4341
|
+
self.check(b, a)
|
|
4342
|
+
|
|
4343
|
+
# multiple inheritance, simple body
|
|
4344
|
+
b = """
|
|
4345
|
+
class X(clsA, clsB):
|
|
4346
|
+
__metaclass__ = Meta
|
|
4347
|
+
bar = 7
|
|
4348
|
+
"""
|
|
4349
|
+
a = """
|
|
4350
|
+
class X(clsA, clsB, metaclass=Meta):
|
|
4351
|
+
bar = 7
|
|
4352
|
+
"""
|
|
4353
|
+
self.check(b, a)
|
|
4354
|
+
|
|
4355
|
+
# keywords in the class statement
|
|
4356
|
+
b = """class m(a, arg=23): __metaclass__ = Meta"""
|
|
4357
|
+
a = """class m(a, arg=23, metaclass=Meta): pass"""
|
|
4358
|
+
self.check(b, a)
|
|
4359
|
+
|
|
4360
|
+
b = """
|
|
4361
|
+
class X(expression(2 + 4)):
|
|
4362
|
+
__metaclass__ = Meta
|
|
4363
|
+
"""
|
|
4364
|
+
a = """
|
|
4365
|
+
class X(expression(2 + 4), metaclass=Meta):
|
|
4366
|
+
pass
|
|
4367
|
+
"""
|
|
4368
|
+
self.check(b, a)
|
|
4369
|
+
|
|
4370
|
+
b = """
|
|
4371
|
+
class X(expression(2 + 4), x**4):
|
|
4372
|
+
__metaclass__ = Meta
|
|
4373
|
+
"""
|
|
4374
|
+
a = """
|
|
4375
|
+
class X(expression(2 + 4), x**4, metaclass=Meta):
|
|
4376
|
+
pass
|
|
4377
|
+
"""
|
|
4378
|
+
self.check(b, a)
|
|
4379
|
+
|
|
4380
|
+
b = """
|
|
4381
|
+
class X:
|
|
4382
|
+
__metaclass__ = Meta
|
|
4383
|
+
save.py = 23
|
|
4384
|
+
"""
|
|
4385
|
+
a = """
|
|
4386
|
+
class X(metaclass=Meta):
|
|
4387
|
+
save.py = 23
|
|
4388
|
+
"""
|
|
4389
|
+
self.check(b, a)
|
|
4390
|
+
|
|
4391
|
+
|
|
4392
|
+
class Test_getcwdu(FixerTestCase):
|
|
4393
|
+
|
|
4394
|
+
fixer = 'getcwdu'
|
|
4395
|
+
|
|
4396
|
+
def test_basic(self):
|
|
4397
|
+
b = """os.getcwdu"""
|
|
4398
|
+
a = """os.getcwd"""
|
|
4399
|
+
self.check(b, a)
|
|
4400
|
+
|
|
4401
|
+
b = """os.getcwdu()"""
|
|
4402
|
+
a = """os.getcwd()"""
|
|
4403
|
+
self.check(b, a)
|
|
4404
|
+
|
|
4405
|
+
b = """meth = os.getcwdu"""
|
|
4406
|
+
a = """meth = os.getcwd"""
|
|
4407
|
+
self.check(b, a)
|
|
4408
|
+
|
|
4409
|
+
b = """os.getcwdu(args)"""
|
|
4410
|
+
a = """os.getcwd(args)"""
|
|
4411
|
+
self.check(b, a)
|
|
4412
|
+
|
|
4413
|
+
def test_comment(self):
|
|
4414
|
+
b = """os.getcwdu() # Foo"""
|
|
4415
|
+
a = """os.getcwd() # Foo"""
|
|
4416
|
+
self.check(b, a)
|
|
4417
|
+
|
|
4418
|
+
def test_unchanged(self):
|
|
4419
|
+
s = """os.getcwd()"""
|
|
4420
|
+
self.unchanged(s)
|
|
4421
|
+
|
|
4422
|
+
s = """getcwdu()"""
|
|
4423
|
+
self.unchanged(s)
|
|
4424
|
+
|
|
4425
|
+
s = """os.getcwdb()"""
|
|
4426
|
+
self.unchanged(s)
|
|
4427
|
+
|
|
4428
|
+
def test_indentation(self):
|
|
4429
|
+
b = """
|
|
4430
|
+
if 1:
|
|
4431
|
+
os.getcwdu()
|
|
4432
|
+
"""
|
|
4433
|
+
a = """
|
|
4434
|
+
if 1:
|
|
4435
|
+
os.getcwd()
|
|
4436
|
+
"""
|
|
4437
|
+
self.check(b, a)
|
|
4438
|
+
|
|
4439
|
+
def test_multilation(self):
|
|
4440
|
+
b = """os .getcwdu()"""
|
|
4441
|
+
a = """os .getcwd()"""
|
|
4442
|
+
self.check(b, a)
|
|
4443
|
+
|
|
4444
|
+
b = """os. getcwdu"""
|
|
4445
|
+
a = """os. getcwd"""
|
|
4446
|
+
self.check(b, a)
|
|
4447
|
+
|
|
4448
|
+
b = """os.getcwdu ( )"""
|
|
4449
|
+
a = """os.getcwd ( )"""
|
|
4450
|
+
self.check(b, a)
|
|
4451
|
+
|
|
4452
|
+
|
|
4453
|
+
class Test_operator(FixerTestCase):
|
|
4454
|
+
|
|
4455
|
+
fixer = "operator"
|
|
4456
|
+
|
|
4457
|
+
def test_operator_isCallable(self):
|
|
4458
|
+
b = "operator.isCallable(x)"
|
|
4459
|
+
a = "hasattr(x, '__call__')"
|
|
4460
|
+
self.check(b, a)
|
|
4461
|
+
|
|
4462
|
+
def test_operator_sequenceIncludes(self):
|
|
4463
|
+
b = "operator.sequenceIncludes(x, y)"
|
|
4464
|
+
a = "operator.contains(x, y)"
|
|
4465
|
+
self.check(b, a)
|
|
4466
|
+
|
|
4467
|
+
b = "operator .sequenceIncludes(x, y)"
|
|
4468
|
+
a = "operator .contains(x, y)"
|
|
4469
|
+
self.check(b, a)
|
|
4470
|
+
|
|
4471
|
+
b = "operator. sequenceIncludes(x, y)"
|
|
4472
|
+
a = "operator. contains(x, y)"
|
|
4473
|
+
self.check(b, a)
|
|
4474
|
+
|
|
4475
|
+
def test_operator_isSequenceType(self):
|
|
4476
|
+
b = "operator.isSequenceType(x)"
|
|
4477
|
+
a = "import collections\nisinstance(x, collections.Sequence)"
|
|
4478
|
+
self.check(b, a)
|
|
4479
|
+
|
|
4480
|
+
def test_operator_isMappingType(self):
|
|
4481
|
+
b = "operator.isMappingType(x)"
|
|
4482
|
+
a = "import collections\nisinstance(x, collections.Mapping)"
|
|
4483
|
+
self.check(b, a)
|
|
4484
|
+
|
|
4485
|
+
def test_operator_isNumberType(self):
|
|
4486
|
+
b = "operator.isNumberType(x)"
|
|
4487
|
+
a = "import numbers\nisinstance(x, numbers.Number)"
|
|
4488
|
+
self.check(b, a)
|
|
4489
|
+
|
|
4490
|
+
def test_operator_repeat(self):
|
|
4491
|
+
b = "operator.repeat(x, n)"
|
|
4492
|
+
a = "operator.mul(x, n)"
|
|
4493
|
+
self.check(b, a)
|
|
4494
|
+
|
|
4495
|
+
b = "operator .repeat(x, n)"
|
|
4496
|
+
a = "operator .mul(x, n)"
|
|
4497
|
+
self.check(b, a)
|
|
4498
|
+
|
|
4499
|
+
b = "operator. repeat(x, n)"
|
|
4500
|
+
a = "operator. mul(x, n)"
|
|
4501
|
+
self.check(b, a)
|
|
4502
|
+
|
|
4503
|
+
def test_operator_irepeat(self):
|
|
4504
|
+
b = "operator.irepeat(x, n)"
|
|
4505
|
+
a = "operator.imul(x, n)"
|
|
4506
|
+
self.check(b, a)
|
|
4507
|
+
|
|
4508
|
+
b = "operator .irepeat(x, n)"
|
|
4509
|
+
a = "operator .imul(x, n)"
|
|
4510
|
+
self.check(b, a)
|
|
4511
|
+
|
|
4512
|
+
b = "operator. irepeat(x, n)"
|
|
4513
|
+
a = "operator. imul(x, n)"
|
|
4514
|
+
self.check(b, a)
|
|
4515
|
+
|
|
4516
|
+
def test_bare_isCallable(self):
|
|
4517
|
+
s = "isCallable(x)"
|
|
4518
|
+
t = "You should use 'hasattr(x, '__call__')' here."
|
|
4519
|
+
self.warns_unchanged(s, t)
|
|
4520
|
+
|
|
4521
|
+
def test_bare_sequenceIncludes(self):
|
|
4522
|
+
s = "sequenceIncludes(x, y)"
|
|
4523
|
+
t = "You should use 'operator.contains(x, y)' here."
|
|
4524
|
+
self.warns_unchanged(s, t)
|
|
4525
|
+
|
|
4526
|
+
def test_bare_operator_isSequenceType(self):
|
|
4527
|
+
s = "isSequenceType(z)"
|
|
4528
|
+
t = "You should use 'isinstance(z, collections.Sequence)' here."
|
|
4529
|
+
self.warns_unchanged(s, t)
|
|
4530
|
+
|
|
4531
|
+
def test_bare_operator_isMappingType(self):
|
|
4532
|
+
s = "isMappingType(x)"
|
|
4533
|
+
t = "You should use 'isinstance(x, collections.Mapping)' here."
|
|
4534
|
+
self.warns_unchanged(s, t)
|
|
4535
|
+
|
|
4536
|
+
def test_bare_operator_isNumberType(self):
|
|
4537
|
+
s = "isNumberType(y)"
|
|
4538
|
+
t = "You should use 'isinstance(y, numbers.Number)' here."
|
|
4539
|
+
self.warns_unchanged(s, t)
|
|
4540
|
+
|
|
4541
|
+
def test_bare_operator_repeat(self):
|
|
4542
|
+
s = "repeat(x, n)"
|
|
4543
|
+
t = "You should use 'operator.mul(x, n)' here."
|
|
4544
|
+
self.warns_unchanged(s, t)
|
|
4545
|
+
|
|
4546
|
+
def test_bare_operator_irepeat(self):
|
|
4547
|
+
s = "irepeat(y, 187)"
|
|
4548
|
+
t = "You should use 'operator.imul(y, 187)' here."
|
|
4549
|
+
self.warns_unchanged(s, t)
|
|
4550
|
+
|
|
4551
|
+
|
|
4552
|
+
class Test_exitfunc(FixerTestCase):
|
|
4553
|
+
|
|
4554
|
+
fixer = "exitfunc"
|
|
4555
|
+
|
|
4556
|
+
def test_simple(self):
|
|
4557
|
+
b = """
|
|
4558
|
+
import sys
|
|
4559
|
+
sys.exitfunc = my_atexit
|
|
4560
|
+
"""
|
|
4561
|
+
a = """
|
|
4562
|
+
import sys
|
|
4563
|
+
import atexit
|
|
4564
|
+
atexit.register(my_atexit)
|
|
4565
|
+
"""
|
|
4566
|
+
self.check(b, a)
|
|
4567
|
+
|
|
4568
|
+
def test_names_import(self):
|
|
4569
|
+
b = """
|
|
4570
|
+
import sys, crumbs
|
|
4571
|
+
sys.exitfunc = my_func
|
|
4572
|
+
"""
|
|
4573
|
+
a = """
|
|
4574
|
+
import sys, crumbs, atexit
|
|
4575
|
+
atexit.register(my_func)
|
|
4576
|
+
"""
|
|
4577
|
+
self.check(b, a)
|
|
4578
|
+
|
|
4579
|
+
def test_complex_expression(self):
|
|
4580
|
+
b = """
|
|
4581
|
+
import sys
|
|
4582
|
+
sys.exitfunc = do(d)/a()+complex(f=23, g=23)*expression
|
|
4583
|
+
"""
|
|
4584
|
+
a = """
|
|
4585
|
+
import sys
|
|
4586
|
+
import atexit
|
|
4587
|
+
atexit.register(do(d)/a()+complex(f=23, g=23)*expression)
|
|
4588
|
+
"""
|
|
4589
|
+
self.check(b, a)
|
|
4590
|
+
|
|
4591
|
+
def test_comments(self):
|
|
4592
|
+
b = """
|
|
4593
|
+
import sys # Foo
|
|
4594
|
+
sys.exitfunc = f # Blah
|
|
4595
|
+
"""
|
|
4596
|
+
a = """
|
|
4597
|
+
import sys
|
|
4598
|
+
import atexit # Foo
|
|
4599
|
+
atexit.register(f) # Blah
|
|
4600
|
+
"""
|
|
4601
|
+
self.check(b, a)
|
|
4602
|
+
|
|
4603
|
+
b = """
|
|
4604
|
+
import apples, sys, crumbs, larry # Pleasant comments
|
|
4605
|
+
sys.exitfunc = func
|
|
4606
|
+
"""
|
|
4607
|
+
a = """
|
|
4608
|
+
import apples, sys, crumbs, larry, atexit # Pleasant comments
|
|
4609
|
+
atexit.register(func)
|
|
4610
|
+
"""
|
|
4611
|
+
self.check(b, a)
|
|
4612
|
+
|
|
4613
|
+
def test_in_a_function(self):
|
|
4614
|
+
b = """
|
|
4615
|
+
import sys
|
|
4616
|
+
def f():
|
|
4617
|
+
sys.exitfunc = func
|
|
4618
|
+
"""
|
|
4619
|
+
a = """
|
|
4620
|
+
import sys
|
|
4621
|
+
import atexit
|
|
4622
|
+
def f():
|
|
4623
|
+
atexit.register(func)
|
|
4624
|
+
"""
|
|
4625
|
+
self.check(b, a)
|
|
4626
|
+
|
|
4627
|
+
def test_no_sys_import(self):
|
|
4628
|
+
b = """sys.exitfunc = f"""
|
|
4629
|
+
a = """atexit.register(f)"""
|
|
4630
|
+
msg = ("Can't find sys import; Please add an atexit import at the "
|
|
4631
|
+
"top of your file.")
|
|
4632
|
+
self.warns(b, a, msg)
|
|
4633
|
+
|
|
4634
|
+
|
|
4635
|
+
def test_unchanged(self):
|
|
4636
|
+
s = """f(sys.exitfunc)"""
|
|
4637
|
+
self.unchanged(s)
|
|
4638
|
+
|
|
4639
|
+
|
|
4640
|
+
class Test_asserts(FixerTestCase):
|
|
4641
|
+
|
|
4642
|
+
fixer = "asserts"
|
|
4643
|
+
|
|
4644
|
+
def test_deprecated_names(self):
|
|
4645
|
+
tests = [
|
|
4646
|
+
('self.assert_(True)', 'self.assertTrue(True)'),
|
|
4647
|
+
('self.assertEquals(2, 2)', 'self.assertEqual(2, 2)'),
|
|
4648
|
+
('self.assertNotEquals(2, 3)', 'self.assertNotEqual(2, 3)'),
|
|
4649
|
+
('self.assertAlmostEquals(2, 3)', 'self.assertAlmostEqual(2, 3)'),
|
|
4650
|
+
('self.assertNotAlmostEquals(2, 8)', 'self.assertNotAlmostEqual(2, 8)'),
|
|
4651
|
+
('self.failUnlessEqual(2, 2)', 'self.assertEqual(2, 2)'),
|
|
4652
|
+
('self.failIfEqual(2, 3)', 'self.assertNotEqual(2, 3)'),
|
|
4653
|
+
('self.failUnlessAlmostEqual(2, 3)', 'self.assertAlmostEqual(2, 3)'),
|
|
4654
|
+
('self.failIfAlmostEqual(2, 8)', 'self.assertNotAlmostEqual(2, 8)'),
|
|
4655
|
+
('self.failUnless(True)', 'self.assertTrue(True)'),
|
|
4656
|
+
('self.failUnlessRaises(foo)', 'self.assertRaises(foo)'),
|
|
4657
|
+
('self.failIf(False)', 'self.assertFalse(False)'),
|
|
4658
|
+
]
|
|
4659
|
+
for b, a in tests:
|
|
4660
|
+
self.check(b, a)
|
|
4661
|
+
|
|
4662
|
+
def test_variants(self):
|
|
4663
|
+
b = 'eq = self.assertEquals'
|
|
4664
|
+
a = 'eq = self.assertEqual'
|
|
4665
|
+
self.check(b, a)
|
|
4666
|
+
b = 'self.assertEquals(2, 3, msg="fail")'
|
|
4667
|
+
a = 'self.assertEqual(2, 3, msg="fail")'
|
|
4668
|
+
self.check(b, a)
|
|
4669
|
+
b = 'self.assertEquals(2, 3, msg="fail") # foo'
|
|
4670
|
+
a = 'self.assertEqual(2, 3, msg="fail") # foo'
|
|
4671
|
+
self.check(b, a)
|
|
4672
|
+
b = 'self.assertEquals (2, 3)'
|
|
4673
|
+
a = 'self.assertEqual (2, 3)'
|
|
4674
|
+
self.check(b, a)
|
|
4675
|
+
b = ' self.assertEquals (2, 3)'
|
|
4676
|
+
a = ' self.assertEqual (2, 3)'
|
|
4677
|
+
self.check(b, a)
|
|
4678
|
+
b = 'with self.failUnlessRaises(Explosion): explode()'
|
|
4679
|
+
a = 'with self.assertRaises(Explosion): explode()'
|
|
4680
|
+
self.check(b, a)
|
|
4681
|
+
b = 'with self.failUnlessRaises(Explosion) as cm: explode()'
|
|
4682
|
+
a = 'with self.assertRaises(Explosion) as cm: explode()'
|
|
4683
|
+
self.check(b, a)
|
|
4684
|
+
|
|
4685
|
+
def test_unchanged(self):
|
|
4686
|
+
self.unchanged('self.assertEqualsOnSaturday')
|
|
4687
|
+
self.unchanged('self.assertEqualsOnSaturday(3, 5)')
|