__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.217.122: ~ $
3

���h\<�@sdZdZddlZddlZddlZddlZyddlZWnek
rPddlZYnXddl	Z	ddl
Z
ejd�Ze	j
�jZe�Ze�Zdd�Zdd�Zd	d
�Zdd�ZGd
d�de�Zdd�Zdd�Zdd�Zdd�Zdd�ZGdd�de�Zdd�ZGdd�dej ed�Z!d d!�Z"dS)"a(Adds support for parameterized tests to Python's unittest TestCase class.

A parameterized test is a method in a test case that is invoked with different
argument tuples.

A simple example:

  class AdditionExample(parameterized.ParameterizedTestCase):
    @parameterized.Parameters(
       (1, 2, 3),
       (4, 5, 9),
       (1, 1, 3))
    def testAddition(self, op1, op2, result):
      self.assertEqual(result, op1 + op2)


Each invocation is a separate test case and properly isolated just
like a normal test method, with its own setUp/tearDown cycle. In the
example above, there are three separate testcases, one of which will
fail due to an assertion error (1 + 1 != 3).

Parameters for invididual test cases can be tuples (with positional parameters)
or dictionaries (with named parameters):

  class AdditionExample(parameterized.ParameterizedTestCase):
    @parameterized.Parameters(
       {'op1': 1, 'op2': 2, 'result': 3},
       {'op1': 4, 'op2': 5, 'result': 9},
    )
    def testAddition(self, op1, op2, result):
      self.assertEqual(result, op1 + op2)

If a parameterized test fails, the error message will show the
original test name (which is modified internally) and the arguments
for the specific invocation, which are part of the string returned by
the shortDescription() method on test cases.

The id method of the test, used internally by the unittest framework,
is also modified to show the arguments. To make sure that test names
stay the same across several invocations, object representations like

  >>> class Foo(object):
  ...  pass
  >>> repr(Foo())
  '<__main__.Foo object at 0x23d8610>'

are turned into '<__main__.Foo>'. For even more descriptive names,
especially in test logs, you can use the NamedParameters decorator. In
this case, only tuples are supported, and the first parameters has to
be a string (or an object that returns an apt name when converted via
str()):

  class NamedExample(parameterized.ParameterizedTestCase):
    @parameterized.NamedParameters(
       ('Normal', 'aa', 'aaa', True),
       ('EmptyPrefix', '', 'abc', True),
       ('BothEmpty', '', '', True))
    def testStartsWith(self, prefix, string, result):
      self.assertEqual(result, strings.startswith(prefix))

Named tests also have the benefit that they can be run individually
from the command line:

  $ testmodule.py NamedExample.testStartsWithNormal
  .
  --------------------------------------------------------------------
  Ran 1 test in 0.000s

  OK

Parameterized Classes
=====================
If invocation arguments are shared across test methods in a single
ParameterizedTestCase class, instead of decorating all test methods
individually, the class itself can be decorated:

  @parameterized.Parameters(
    (1, 2, 3)
    (4, 5, 9))
  class ArithmeticTest(parameterized.ParameterizedTestCase):
    def testAdd(self, arg1, arg2, result):
      self.assertEqual(arg1 + arg2, result)

    def testSubtract(self, arg2, arg2, result):
      self.assertEqual(result - arg1, arg2)

Inputs from Iterables
=====================
If parameters should be shared across several test cases, or are dynamically
created from other sources, a single non-tuple iterable can be passed into
the decorator. This iterable will be used to obtain the test cases:

  class AdditionExample(parameterized.ParameterizedTestCase):
    @parameterized.Parameters(
      c.op1, c.op2, c.result for c in testcases
    )
    def testAddition(self, op1, op2, result):
      self.assertEqual(result, op1 + op2)


Single-Argument Test Methods
============================
If a test method takes only one argument, the single argument does not need to
be wrapped into a tuple:

  class NegativeNumberExample(parameterized.ParameterizedTestCase):
    @parameterized.Parameters(
       -1, -3, -4, -5
    )
    def testIsNegative(self, arg):
      self.assertTrue(IsNegative(arg))
z!tmarek@google.com (Torsten Marek)�Nz0\<([a-zA-Z0-9_\-\.]+) object at 0x[a-fA-F0-9]+\>cCstjdt|��S)Nz<\1>)�ADDR_RE�sub�repr)�obj�r�$/usr/lib/python3.6/_parameterized.py�
_CleanRepr�srcCsd|j|jfS)Nz%s.%s)�
__module__�__name__)�clsrrr�	_StrClass�srcCst|tj�ot|tj�S)N)�
isinstance�collections�Iterable�sixZstring_types)rrrr�_NonStringIterable�srcCsNt|tj�r(djdd�t|j��D��St|�r@djtt|��St	|f�SdS)Nz, css"|]\}}d|t|�fVqdS)z%s=%sN)r)�.0Zargname�valuerrr�	<genexpr>�sz'_FormatParameterList.<locals>.<genexpr>)
r
r�Mapping�join�list�itemsr�mapr�_FormatParameterList)�testcase_paramsrrrr�s
rc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�_ParameterizedTestIterz9Callable and iterable class for producing new test cases.cCs||_||_||_dS)a\Returns concrete test functions for a test and a list of parameters.

    The naming_type is used to determine the name of the concrete
    functions as reported by the unittest framework. If naming_type is
    _FIRST_ARG, the testcases must be tuples, and the first element must
    have a string representation that is a valid Python identifier.

    Args:
      test_method: The decorated test method.
      testcases: (list of tuple/dict) A list of parameter
                 tuples/dicts for individual test invocations.
      naming_type: The test naming type, either _NAMED or _ARGUMENT_REPR.
    N)�_test_method�	testcases�_naming_type)�self�test_methodr�naming_typerrr�__init__�sz_ParameterizedTestIter.__init__cOstd��dS)Nz�You appear to be running a parameterized test case without having inherited from parameterized.ParameterizedTestCase. This is bad because none of your test cases are actually being run.)�RuntimeError)r �args�kwargsrrr�__call__�sz_ParameterizedTestIter.__call__cs.|j�|j���fdd���fdd�|jD�S)Ncs�tj����fdd��}�tkrJd|_|jt�d�7_�dd��n(�tkrddt��f|_nt	d�f��d|jt��f|_
�j
r�|j
d	�j
f7_
|S)
Ncs@t�tj�r�|f��n"t��r2�|f���n
�|��dS)N)r
rrr)r )r!rrr�BoundParamTest�s
zS_ParameterizedTestIter.__iter__.<locals>.MakeBoundParamTest.<locals>.BoundParamTestTr�z(%s)z%s is not a valid naming type.z%s(%s)z
%s)�	functools�wraps�
_FIRST_ARG�__x_use_name__r
�str�_ARGUMENT_REPRr�__x_extra_id__r$�__doc__)rr()r"r!)rr�MakeBoundParamTest�s	z;_ParameterizedTestIter.__iter__.<locals>.MakeBoundParamTestc3s|]}�|�VqdS)Nr)r�c)r2rrr�sz2_ParameterizedTestIter.__iter__.<locals>.<genexpr>)rrr)r r)r2r"r!r�__iter__�sz_ParameterizedTestIter.__iter__N)r
r	�__qualname__r1r#r'r4rrrrr�srcCst|�dkot|dt�S)z<True iff testcases contains only a single non-tuple element.r)r)�lenr
�tuple)rrrr�_IsSingletonList�sr8c	Cs�t|dd�std|f��i|_}x�t|jj�j��D]l\}}|jtj	j
�r:t|tj
�r:t||�i}t|||t|||��x$t|j��D]\}}t|||�q�Wq:WdS)N�
_id_suffixzECannot add parameters to %s, which already has parameterized methods.)�getattr�AssertionErrorr9r�__dict__�copyr�
startswith�unittest�
TestLoader�testMethodPrefixr
�types�FunctionType�delattr� _UpdateClassDictForParamTestCaser�setattr)Zclass_objectrr"�	id_suffix�namer�methods�methrrr�_ModifyClasss


rKcs6��fdd�}t��r2t�d�s*td���d�|S)z�Implementation of the parameterization decorators.

  Args:
    naming_type: The naming type.
    testcases: Testcase parameters.

  Returns:
    A function for modifying the decorated object.
  cs>t|t�r.t|t�tj�s"t��n���|St|���SdS)N)r
�typerKr�Sequencerr)r)r"rrr�_Apply!s
z#_ParameterDecorator.<locals>._Applyrz7Single parameter argument must be a non-string iterable)r8rr;)r"rrNr)r"rr�_ParameterDecorators
rOcGs
tt|�S)aiA decorator for creating parameterized tests.

  See the module docstring for a usage example.
  Args:
    *testcases: Parameters for the decorated method, either a single
                iterable, or a list of tuples/dicts/objects (for tests
                with only one argument).

  Returns:
     A test generator to be handled by TestGeneratorMetaclass.
  )rOr/)rrrr�
Parameters4srPcGs
tt|�S)a�A decorator for creating parameterized tests.

  See the module docstring for a usage example. The first element of
  each parameter tuple should be a string and will be appended to the
  name of the test method.

  Args:
    *testcases: Parameters for the decorated method, either a single
                iterable, or a list of tuples.

  Returns:
     A test generator to be handled by TestGeneratorMetaclass.
  )rOr,)rrrr�NamedParametersCsrQc@seZdZdZdd�ZdS)�TestGeneratorMetaclassa�Metaclass for test cases with test generators.

  A test generator is an iterable in a testcase that produces callables. These
  callables must be single-argument methods. These methods are injected into
  the class namespace and the original iterable is removed. If the name of the
  iterable conforms to the test pattern, the injected methods will be picked
  up as tests by the unittest framework.

  In general, it is supposed to be used in conjunction with the
  Parameters decorator.
  cCsli|d<}xNt|j��D]>\}}|jtjj�rt|�rt|�}|j|�t	||||�qWt
j||||�S)Nr9)rrr>r?r@rAr�iter�poprErL�__new__)Zmcs�
class_name�bases�dctrGrHr�iteratorrrrrUas
zTestGeneratorMetaclass.__new__N)r
r	r5r1rUrrrrrRTsrRcCs�xzt|�D]n\}}t|�s(td|f��t|dd�r<|j}nd|t|f}||ks`td|f��|||<t|dd�||<q
WdS)	aAdds individual test cases to a dictionary.

  Args:
    dct: The target dictionary.
    id_suffix: The dictionary for mapping names to test IDs.
    name: The original name of the test case.
    iterator: The iterator generating the individual test cases.
  z,Test generators must yield callables, got %rr-Fz%s%s%dz/Name of parameterized test case "%s" not uniquer0�N)�	enumerate�callabler;r:r
�
_SEPARATOR)rXrGrHrY�idx�func�new_namerrrrEms	

rEc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�ParameterizedTestCasez9Base class for test cases using the Parameters decorator.cCs|jjt�dS)Nr)�_testMethodName�splitr])r rrr�
_OriginalName�sz#ParameterizedTestCase._OriginalNamecCsd|j�t|j�fS)Nz%s (%s))rdr�	__class__)r rrr�__str__�szParameterizedTestCase.__str__cCs$dt|j�|j�|jj|jd�fS)z�Returns the descriptive ID of the test.

    This is used internally by the unittesting framework to get a name
    for the test to be used in reports.

    Returns:
      The test id.
    z%s.%s%srZ)rrerdr9�getrb)r rrr�id�s	
zParameterizedTestCase.idN)r
r	r5r1rdrfrhrrrrra�sra)�	metaclasscCs"td|jtfi�}|d|tfi�S)a;Returns a new base class with a cooperative metaclass base.

  This enables the ParameterizedTestCase to be used in combination
  with other base classes that have custom metaclasses, such as
  mox.MoxTestBase.

  Only works with metaclasses that do not override type.__new__.

  Example:

    import google3
    import mox

    from google3.testing.pybase import parameterized

    class ExampleTest(parameterized.CoopParameterizedTestCase(mox.MoxTestBase)):
      ...

  Args:
    other_base_class: (class) A test case base class.

  Returns:
    A new class object.
  Z
CoopMetaclass�CoopParameterizedTestCase)rLZ
__metaclass__rRra)Zother_base_classrirrrrj�s
rj)#r1�
__author__rr*�rerBZ	unittest2r?�ImportErrorZuuidr�compilerZuuid1�hexr]�objectr,r/rrrrrr8rKrOrPrQrLrRrEZTestCaserarjrrrr�<module>�s:


A

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 113 B 0644
__init__.cpython-36.pyc File 113 B 0644
_parameterized.cpython-36.opt-1.pyc File 13.17 KB 0644
_parameterized.cpython-36.pyc File 13.54 KB 0644
any_test_pb2.cpython-36.opt-1.pyc File 3.56 KB 0644
any_test_pb2.cpython-36.pyc File 3.56 KB 0644
api_implementation.cpython-36.opt-1.pyc File 2.48 KB 0644
api_implementation.cpython-36.pyc File 2.48 KB 0644
containers.cpython-36.opt-1.pyc File 19.77 KB 0644
containers.cpython-36.pyc File 19.77 KB 0644
decoder.cpython-36.opt-1.pyc File 20.5 KB 0644
decoder.cpython-36.pyc File 20.58 KB 0644
descriptor_database_test.cpython-36.opt-1.pyc File 2.09 KB 0644
descriptor_database_test.cpython-36.pyc File 2.09 KB 0644
descriptor_pool_test.cpython-36.opt-1.pyc File 28.47 KB 0644
descriptor_pool_test.cpython-36.pyc File 28.47 KB 0644
descriptor_pool_test1_pb2.cpython-36.opt-1.pyc File 8.48 KB 0644
descriptor_pool_test1_pb2.cpython-36.pyc File 8.48 KB 0644
descriptor_pool_test2_pb2.cpython-36.opt-1.pyc File 5.95 KB 0644
descriptor_pool_test2_pb2.cpython-36.pyc File 5.95 KB 0644
descriptor_test.cpython-36.opt-1.pyc File 29.15 KB 0644
descriptor_test.cpython-36.pyc File 29.15 KB 0644
encoder.cpython-36.opt-1.pyc File 23.43 KB 0644
encoder.cpython-36.pyc File 23.57 KB 0644
enum_type_wrapper.cpython-36.opt-1.pyc File 2.65 KB 0644
enum_type_wrapper.cpython-36.pyc File 2.65 KB 0644
factory_test1_pb2.cpython-36.opt-1.pyc File 4.26 KB 0644
factory_test1_pb2.cpython-36.pyc File 4.26 KB 0644
factory_test2_pb2.cpython-36.opt-1.pyc File 10.6 KB 0644
factory_test2_pb2.cpython-36.pyc File 10.6 KB 0644
file_options_test_pb2.cpython-36.opt-1.pyc File 2.29 KB 0644
file_options_test_pb2.cpython-36.pyc File 2.29 KB 0644
generator_test.cpython-36.opt-1.pyc File 10.52 KB 0644
generator_test.cpython-36.pyc File 10.52 KB 0644
json_format_test.cpython-36.opt-1.pyc File 28.12 KB 0644
json_format_test.cpython-36.pyc File 28.12 KB 0644
message_factory_test.cpython-36.opt-1.pyc File 5.34 KB 0644
message_factory_test.cpython-36.pyc File 5.34 KB 0644
message_listener.cpython-36.opt-1.pyc File 2.23 KB 0644
message_listener.cpython-36.pyc File 2.23 KB 0644
message_set_extensions_pb2.cpython-36.opt-1.pyc File 4.06 KB 0644
message_set_extensions_pb2.cpython-36.pyc File 4.06 KB 0644
message_test.cpython-36.opt-1.pyc File 58.58 KB 0644
message_test.cpython-36.pyc File 58.69 KB 0644
missing_enum_values_pb2.cpython-36.opt-1.pyc File 4.61 KB 0644
missing_enum_values_pb2.cpython-36.pyc File 4.61 KB 0644
more_extensions_dynamic_pb2.cpython-36.opt-1.pyc File 3.09 KB 0644
more_extensions_dynamic_pb2.cpython-36.pyc File 3.09 KB 0644
more_extensions_pb2.cpython-36.opt-1.pyc File 3.81 KB 0644
more_extensions_pb2.cpython-36.pyc File 3.81 KB 0644
more_messages_pb2.cpython-36.opt-1.pyc File 2.7 KB 0644
more_messages_pb2.cpython-36.pyc File 2.7 KB 0644
packed_field_test_pb2.cpython-36.opt-1.pyc File 7.8 KB 0644
packed_field_test_pb2.cpython-36.pyc File 7.8 KB 0644
proto_builder_test.cpython-36.opt-1.pyc File 2.26 KB 0644
proto_builder_test.cpython-36.pyc File 2.26 KB 0644
python_message.cpython-36.opt-1.pyc File 41.32 KB 0644
python_message.cpython-36.pyc File 41.41 KB 0644
reflection_test.cpython-36.opt-1.pyc File 78.49 KB 0644
reflection_test.cpython-36.pyc File 78.49 KB 0644
service_reflection_test.cpython-36.opt-1.pyc File 4.06 KB 0644
service_reflection_test.cpython-36.pyc File 4.06 KB 0644
symbol_database_test.cpython-36.opt-1.pyc File 3.65 KB 0644
symbol_database_test.cpython-36.pyc File 3.65 KB 0644
test_bad_identifiers_pb2.cpython-36.opt-1.pyc File 3.47 KB 0644
test_bad_identifiers_pb2.cpython-36.pyc File 3.47 KB 0644
test_util.cpython-36.opt-1.pyc File 24.73 KB 0644
test_util.cpython-36.pyc File 24.77 KB 0644
testing_refleaks.cpython-36.opt-1.pyc File 2.95 KB 0644
testing_refleaks.cpython-36.pyc File 2.95 KB 0644
text_encoding_test.cpython-36.opt-1.pyc File 1.33 KB 0644
text_encoding_test.cpython-36.pyc File 1.33 KB 0644
text_format_test.cpython-36.opt-1.pyc File 46.88 KB 0644
text_format_test.cpython-36.pyc File 46.88 KB 0644
type_checkers.cpython-36.opt-1.pyc File 8.94 KB 0644
type_checkers.cpython-36.pyc File 8.94 KB 0644
unknown_fields_test.cpython-36.opt-1.pyc File 8.94 KB 0644
unknown_fields_test.cpython-36.pyc File 8.94 KB 0644
well_known_types.cpython-36.opt-1.pyc File 25.43 KB 0644
well_known_types.cpython-36.pyc File 25.43 KB 0644
well_known_types_test.cpython-36.opt-1.pyc File 20.19 KB 0644
well_known_types_test.cpython-36.pyc File 20.19 KB 0644
wire_format.cpython-36.opt-1.pyc File 6.27 KB 0644
wire_format.cpython-36.pyc File 6.27 KB 0644
wire_format_test.cpython-36.opt-1.pyc File 5.43 KB 0644
wire_format_test.cpython-36.pyc File 5.43 KB 0644