§
v<ˆj½1 ã óx — d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z d dl
Z
dZn
# e$ r dZY nw xY wdZ
dZdZd Zd
ZdZ ed¦ « eeeefZn# e$ r ed¦ « eeeefZY nw xY we G d„ d
e¦ « ¦ « Zd„ Zd„ Zd„ Zdd„Zdd„Z d dej! fd„Z"d„ Z#d„ Z$d„ Z%d„ Z&d„ Z'd„ Z(dd„Z)dS )é N)ÚEnumÚunique)ÚwrapsTFz1.4.4z%valuesz
%file_pathz%yaml_loaderz%unpackz
%index_lenc ó — e Zd ZdZdZdZdS )ÚTestNameFormata£
An enum to configure how ``mk_test_name()`` to compose a test name. Given
the following example:
.. code-block:: python
@data("a", "b")
def testSomething(self, value):
...
if using just ``@ddt`` or together with ``DEFAULT``:
* ``testSomething_1_a``
* ``testSomething_2_b``
if using ``INDEX_ONLY``:
* ``testSomething_1``
* ``testSomething_2``
r é N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚDEFAULTÚ
INDEX_ONLY© ó úU/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/ddt.pyr r * s$ € € € € € ðð ð* €GØ€J€J€Jr r c ó° — t | t ¦ « rdS t | t t f¦ « r"t t t | ¦ « ¦ « S dS )NTF)Ú
isinstanceÚ
trivial_typesÚlistÚtupleÚallÚmapÚ
is_trivial)Úvalues r r r E sL € Ý�%�Ñ'Ô'ð +؈tÝ �E�D¥%˜=Ñ )Ô )ð +Ý•3•z 5Ñ)Ô)Ñ*Ô*Ð*؈5r c ó2 — t | t d¦ « | S )z2
Method decorator to add unpack feature.
T)ÚsetattrÚUNPACK_ATTR)Úfuncs r Úunpackr M s € õ
ˆD•+˜tÑ$Ô$Ð$Ø€Kr c ó — t | ¦ « S )z
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
)Úidata)Úvaluess r Údatar# V s € õ �‰=Œ=Ðr c óŠ ‡ ‡— ‰€8t ‰ ¦ « Š t t t ‰ ¦ « ¦ « ¦ « Šˆˆ fd„}|S )a«
Method decorator to add to your test methods.
Should be added to methods of instances of ``unittest.TestCase``.
:param iterable: iterable of the values to provide to the test function.
:param index_len: an optional integer specifying the width to zero-pad the
test identifier indices to. If not provided, this will add the fewest
zeros necessary to make all identifiers the same length.
Nc ó` •— t | t ‰¦ « t | t ‰¦ « | S ©N)r Ú DATA_ATTRÚ INDEX_LEN)r Ú index_lenÚiterables €€r Úwrapperzidata.