kr.motd.maven.sphinx.dist.future.tests.base$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1? f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; org/python/core/PyFrame setline (I)V
__future__ java/lang/String print_function
absolute_import org/python/core/imp
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject;
setlocal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
os importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject;
tempfile ! unittest # sys % re ' warnings ) io + textwrap - dedent / future.utils 1 bind_method 3 PY26 5 PY3 7 PY2 9 PY27 ; future.moves.subprocess = check_output ? STDOUT A CalledProcessError C getname .(Ljava/lang/String;)Lorg/python/core/PyObject; E F
G org/python/core/PyObject I __nonzero__ ()Z K L
J M unittest2 O importOneAs Q
R org/python/core/Py T EmptyObjects [Lorg/python/core/PyObject; V W U X org/python/core/PyFunction Z f_globals Lorg/python/core/PyObject; \ ] ^ reformat_code$1 ,
Removes any leading
and dedents.
a org/python/core/PyString c fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString; e f
d g getlocal (I)Lorg/python/core/PyObject; i j
k
startswith m __getattr__ o F
J p
r __call__ S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; t u
J v
newInteger (I)Lorg/python/core/PyInteger; x y
U z __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; | }
J ~ (ILorg/python/core/PyObject;)V ?
? getglobal ? F
? f_lasti I ? ? ? future/tests/base$py ? Lorg/python/core/PyCode; ` ? ? ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V ? ?
[ ?
reformat_code ? order_future_lines$2
Returns the code block with any ``__future__`` import lines sorted, and
then any ``future`` import lines sorted, then any ``builtins`` import lines
sorted.
This only sorts the lines within the expected blocks.
See test_order_future_lines() for an example.
? split ? org/python/core/PyList ? ()V ? ?
? ? append ? enumerate ? __iter__ ()Lorg/python/core/PyObject; ? ?
J ? unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject; ? ?
U ? from __future__ import ? __iternext__ ? ?
J ? dellocal ?
? from future ? from past ?
from builtins ? __debug__ ? lstrip ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; t ?
J ? _eq 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
J ? Iinternal usage error: dedent the code before calling order_future_lines() ? AssertionError ?
makeException S(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyException; ? ?
U ? mymax$3 len ? _gt ? ?
J ? max ? ? ? ? ? mymin$4 min ? float ? inf ? ? ? ? ? _le ? ?
J ? 2the __future__ and future imports are out of order ? sorted ? __getitem__ ? ?
J ? dict ? zip ? m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; t ?
J ? ([Lorg/python/core/PyObject;)V ? ?
? ? range ? _in ? ?
J ? join ? ? ? ? ? order_future_lines ? VerboseCalledProcessError ? VerboseCalledProcessError$5
__module__ __name__ __doc__ ?
Like CalledProcessError, but it displays more information (message and
script output) for diagnosing test failures etc.
None
__init__$6 msg __setattr__
J
returncode cmd output ] U ? ? __init__ __str__$7 >Command '%s' failed with exit status %d
Message: %s
Output: %s org/python/core/PyTuple
! ? _mod# ?
J$ ? ?& __str__( getf_locals* ?
+ ? ?- makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;/0
U1 java/util/Arrays3 fill (([Ljava/lang/Object;Ljava/lang/Object;)V56
47
FuturizeError9 FuturizeError$8; ? ?< PasteurizeError> PasteurizeError$9@ ? ?A TestCaseC CodeHandlerE CodeHandler$10 t
Handy mixin for test classes for writing / reading / futurizing /
running .py files in the test suite.
H setUp$11 i
The outputs from the various futurize stages should have the
following headers:
K ?
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
M headers1O4
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from builtins import *
Q headers2S
executableU interpretersW mkdtempY path[ sep] _add_ ?
J` tempdirb getenvd
PYTHONPATHf org/python/core/PyDictionaryh getcwdj pathsepl
i ? envoJ ? ?q setUps Falseu Truew
convert$12?
Converts the code block using ``futurize`` and returns the
resulting code.
Passing stages=[1] or stages=[2] passes the flag ``--stage1`` or
``stage2`` to ``futurize``. Passing both stages runs ``futurize``
with both stages by default.
If from3 is False, runs ``futurize``, converting from Python 2 to
both 2 and 3. If from3 is True, runs ``pasteurize`` to convert
from Python 3 to both 2 and 3.
Optionally reformats the code block first using the reformat() function.
If run is True, runs the resulting code under all Python
interpreters in self.interpreters.
z _write_test_script| _futurize_test_script~ stages? all_imports? from3? conservative? g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; t?
J? _read_test_script? _run_test_script? interpreter?y ? ?? convert?
compare$13?
Compares whether the code blocks are equal. If not, raises an
exception so the test fails. Ignores any trailing whitespace like
blank lines.
If ignore_imports is True, passes the code blocks into the
strip_future_imports method.
If one code block is a unicode string and the other a
byte-string, it assumes the byte-string is encoded as utf-8.
? strip_future_imports?
isinstance? bytes? __not__? ?
J? decode? utf-8? assertEqual? rstrip?? ? ?? compare? strip_future_imports$14
Strips any of these import lines:
from __future__ import
from future
from future.
from builtins
or any line containing:
install_hooks()
or:
install_aliases()
Limitation: doesn't handle imports split across multiple lines like
this:
from __future__ import (absolute_import, division, print_function,
unicode_literals)
? from future ? from builtins ? install_hooks()? install_aliases()? from future.?? ? ?? convert_check$15P
Convenience method that calls convert() and compare().
Reformats the code blocks automatically using the reformat_code()
function.
If all_imports is passed, we add the appropriate import headers
for the stage(s) selected to the ``expected`` code-block, so they
needn't appear repeatedly in the test code.
If ignore_imports is True, ignores the presence of any lines
beginning:
from __future__ import ...
from future import ...
for the purpose of the comparison.
? run? ? ignore_imports?? ? ??
convert_check? unchanged$16 e
Convenience method to ensure the code is unchanged by the
futurize process.
?
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;??
J?? ? ?? unchanged? mytestscript.py? _write_test_script$17 f_exits? W ? ?
Dedents the given code (a multiline string) and writes it out to
a file in a temporary folder like /tmp/tmpUDCn7x/mytestscript.py.
? open? wt? encoding? org/python/core/ContextGuard?
getManager <(Lorg/python/core/PyObject;)Lorg/python/core/ContextManager;??
?? org/python/core/ContextManager? __enter__? ??? write? __exit__ =(Lorg/python/core/ThreadState;Lorg/python/core/PyException;)Z???? setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;??
U? ()Lorg/python/core/PyException; ??
U? java/lang/Throwable?? ? ?? _read_test_script$18 rt? read? ? ? _futurize_test_script$19 list
--all-imports
pasteurize.py
futurize.py --stage1 --stage2 --conservative -w stderr org/python/core/PyException match (Lorg/python/core/PyObject;)Z
value ] 8Error running the command %s
%s
Contents of file %s:
%s! # env=%s% ----
%s
----' futurize) 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException; ?+
U, ? ?. _run_test_script$20 hasattr10 ? ?3G ? ?5 skipIf7 #this test is known to fail on Py2.69 skip26; expectedFailurePY3$21 expectedFailure>= ? ?@ expectedFailurePY3B expectedFailurePY26$22D ? ?E expectedFailurePY26G expectedFailurePY27$23I ? ?J expectedFailurePY27L expectedFailurePY2$24N ? ?O expectedFailurePY2Q assertRaisesRegexS assertRaisesRegexpU assertRegex$25 =Fail the test unless the text matches the regular expression.X strZ unicode\ !expected_regex must not be empty.^ compile` searchb Regex didn't matchd %s: %r not found in %rf patternh failureExceptionjW ? ?l assertRegexn ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; tp
Jq objects _AssertRaisesBaseContextu _AssertRaisesBaseContext$26 __init__$27 expectedy test_case{ _isnot} ?
J~ obj_name? AttributeError? expected_regex?x ? ?? _raiseFailure$28 _formatMessage?? ? ??
_raiseFailure? handle$29 ?
If callable_obj is None, assertRaises/Warns is being used as a
context manager, so check for a 'msg' kwarg and return self.
If callable_obj is not None, call it passing args and kwargs.
? _is? ?
J? pop?? ? ?? handle?w ? ?? _AssertWarnsContext? _AssertWarnsContext$30 BA context manager used to implement TestCase.assertWarns* methods.? __enter__$31 modules? values? getattr? __warningregistry__? catch_warnings? record? warnings_manager?? simplefilter? always?? ? ?? __exit__$32? message? warning? filename? lineno? "{}" does not match "{}"? format? {} not triggered by {}? {} not triggered?? ? ??? ? ?? assertWarns$33?Fail unless a warning of class warnClass is triggered
by callable_obj when invoked with arguments args and keyword
arguments kwargs. If a different type of warning is
triggered, it will not be handled: depending on the other
warning filtering rules in effect, it might be silenced, printed
out, or raised as an exception.
If called with callable_obj omitted or None, will return a
context object used like this::
with self.assertWarns(SomeWarning):
do_something()
An optional keyword argument 'msg' can be provided when assertWarns
is used as a context object.
The context manager keeps a reference to the first matching
warning as the 'warning' attribute; similarly, the 'filename'
and 'lineno' attributes give you information about the line
of Python code from which the warning was triggered.
This allows you to inspect the warning after the assertion::
with self.assertWarns(SomeWarning) as cm:
do_something()
the_warning = cm.warning
self.assertEqual(the_warning.some_attribute, 147)
? assertWarns? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; t?
J?? ? ?? (Ljava/lang/String;)V org/python/core/PyFunctionTable?
? ? self Lfuture/tests/base$py;?? ?? ? newCode ?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;??
U? ? ?? code? lines? uufuture_line_numbers? _[42_29]? i? line? future_line_numbers? _[45_27]? builtins_line_numbers? _[49_29]? mymax? mymin? uul _[67_18] sorted_uufuture_lines fl _[70_17] sorted_future_lines
bl _[73_17] sorted_builtins_lines new_lines numbers? pypath reformat _ before headers kwargs! f# newsource% params' script) fn+ call_args- e/
ErrorClass1 func3 text5 callable_obj7 standardMsg9 name; args= v? exc_typeA exc_valueC tbE exc_nameG first_matchingI mK wM expected_warningO contextQ getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V ? ??
?XST
?Z org/python/core/CodeLoader\ createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;^_
]` runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)Vbc
Ud getCodeBootstrap !()Lorg/python/core/CodeBootstrap; #org/python/core/PyRunnableBootstraph )getFilenameConstructorReflectionBootstrap 2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;jk
il
call_function S(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
?p `
?r ?
?t ?
?v ?
?x
?z
?|
?~;
??@
??G
??J
??y
???
???
???
???
???
???
??
??0
??=
??D
??I
??N
??W
??w
??x
???
???
???
???
???
???
?? org/python/core/PyRunnable? Lorg/python/compiler/APIVersion; % Lorg/python/compiler/MTime; `9 K? Lorg/python/compiler/Filename; [/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/future/tests/base.py org/python/core/ThreadState? W java/lang/Object? [Ljava/lang/String;? Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations ! ?? ? # ?? ? ` ? ? ? ? ? ? ? ? ? ? ; ? @ ? G ? J ? y ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 ? = ? D ? I ? N ? W ? w ? x ? ? ? ? ? ? ? ? ? ? ? ? ? ' ? ? ?+?
? N-S-S-+? N-2:+? :-2:+? :+? +? N+-? N+? "+? N+"-? N+? $+? N+$-? N+? &+? N+&-? N+? (+? N+(-? N+? *+? N+*-? N+? ,+? N+,-? N+ ? .? N-0S-+? N-2:+0? :+? 2? N-4S-6S-8S-:S-