%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/incremental/tests/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/incremental/tests/__pycache__/test_version.cpython-312.pyc

�

ؒ�eAH��z�dZddlmZmZddlZddlZddlZddlZddlmZm	Z	ddlm
Z
mZddlm
Z
Gd�de
�Zy)	z
Tests for L{incremental}.
�)�division�absolute_importN)�getVersionString�IncomparableVersions)�Version�_inf)�TestCasec��eZdZd�Zd�Zejejdkd�d��Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%d"�Z&d#�Z'd$�Z(d%�Z)d&�Z*d'�Z+d(�Z,d)�Z-d*�Z.d+�Z/d,�Z0d-�Z1d.�Z2d/�Z3d0�Z4d1�Z5d2�Z6d3�Z7d4�Z8d5�Z9d6�Z:y7)8�
VersionsTestsc	��tddddddd��}|j|j�|j��y)zE
        The local version is the same as the short version.
        �dummy�r����release_candidate�post�devN)r�assertEqual�local�short)�self�vas  �@/usr/lib/python3/dist-packages/incremental/tests/test_version.py�test_localIsShortzVersionsTests.test_localIsShorts6���W�a��A����
J���������R�X�X�Z�0�c	�l�tdddd�}tdddd�}|j||kD�|j||k�|j||k\�|j||k�|j||k7�|j|tdddd�k(�|j||k(�y)zB
        Versions can be compared for equality and order.
        r
rrN�r�
assertTrue�rr�vbs   r�test_versionComparisonz$VersionsTests.test_versionComparison����W�a��A�
&��
�W�a��A�
&������R�� �����R�� �����b��!�����b��!�����b��!�����g�g�q�!�Q�7�7�8�����b��!r)rzComparisons do not raise on py2c��tdddd�}t�}|jt�5||kDddd�|jt�5||kddd�|jt�5||k\ddd�|jt�5||kddd�|j	||k(�|j||k7�y#1swY��xYw#1swY��xYw#1swY�mxYw#1swY�VxYw)z=
        Versions can be compared with non-versions.
        r
rrN)r�object�assertRaises�	TypeError�assertFalser)r�v�os   r� test_versionComparisonNonVersionz.VersionsTests.test_versionComparisonNonVersion+s���

�G�Q��1�%���H��
�
�
�y�
)�	�
��E�	��
�
�y�
)�	�
��E�	��
�
�y�
)�	�
��F�	��
�
�y�
)�	�
��F�	�	
����a�� �����Q���	�	��	�	��	�	��	�	�s/�C�C�4C&�C2�C�C#�&C/�2C;c	�l�tdddd�}tdddd�}|j||kD�|j||k�|j||k\�|j||k�|j||k7�|j|tdddd�k(�|j||k(�y)z=
        Version package names are case insensitive.
        r
rr�DuMmYNrr s   r�%test_versionComparisonCaseInsensitivez3VersionsTests.test_versionComparisonCaseInsensitiveBr#rc��tdddd�}tdddd�}|j||kD�|j||k�|j||�y)zI
        NEXT releases are always larger than numbered releases.
        �whatever�NEXTrrN�rrr(�assertNotEqualsr s   r�test_comparingNEXTReleasesz(VersionsTests.test_comparingNEXTReleasesPsV���Z���A�
.��
�Z��A�q�
)������R�� �����b��!����R��$rc
�\�|jt�5tddddddd��ddd�|jt�5tddddddd��ddd�|jt�5tddddddd��ddd�|jt�5tddddddd��ddd�|jt�5tddddddd��ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY�^xYw#1swYyxYw)zR
        NEXT releases must always have the rest of the numbers set to 0.
        r0r1rrrN�r&�
ValueErrorr�rs r�test_NEXTMustBeAlonez"VersionsTests.test_NEXTMustBeAloneZs9���
�
�z�
*�	R��J���1���q�Q�	R��
�
�z�
*�	R��J���1���q�Q�	R��
�
�z�
*�	R��J���1���q�Q�	R��
�
�z�
*�	R��J���1���q�Q�	R��
�
�z�
*�	R��J���1���q�Q�	R�	R�	R�	R��	R�	R��	R�	R��	R�	R��	R�	R�s;�C2�C>�6D
�&D�D"�2C;�>D�
D�D�"D+c�`�tdddd�}tdddd�}|j||�y)z8
        NEXT releases are equal to each other.
        r0r1rN)r�assertEqualsr s   r�test_comparingNEXTReleasesEqualz-VersionsTests.test_comparingNEXTReleasesEqualms4���Z���A�
.��
�Z���A�
.�����"�b�!rc��tddddd��}tdddd�}|j||k�|j||kD�|j||�y)zP
        Prereleases are always less than versions without prereleases.
        r0rr��
prereleaseNr2r s   r�%test_comparingPrereleasesWithReleasesz3VersionsTests.test_comparingPrereleasesWithReleasesusX���Z��A�q�Q�
7��
�Z��A�q�
)������R�� �����b��!����R��$rc��tddddd��|j�}|jt|�d�|j|ddd�y)z@
        Passing 'prerelease' to Version is deprecated.
        r0rrr>�messagezvPassing prerelease to incremental.Version was deprecated in Incremental 16.9.0. Please pass release_candidate instead.N)r�
flushWarningsr�len)r�warningss  r�test_prereleaseDeprecatedz'VersionsTests.test_prereleaseDeprecatedsV��	�
�A�q�!��2��%�%�'������X���*�����Q�K�	�"�
I�	
rc���tddddd��}|j|j�}|jt	|�d�|j|ddd�y)zD
        Accessing 'prerelease' on a Version is deprecated.
        r0rr�rrBzuAccessing incremental.Version.prerelease was deprecated in Incremental 16.9.0. Use Version.release_candidate instead.N)rr?rCrrD)rrrEs   r�"test_prereleaseAttributeDeprecatedz0VersionsTests.test_prereleaseAttributeDeprecated�s_���Z��A�q�A�
>��
�
�
��%�%�'������X���*�����Q�K�	�"�
I�	
rc��tddddd��}tdddd�}|j||k�|j||kD�|j||�y)zf
        Release Candidates are always less than versions without release
        candidates.
        r0rrrHNr2r s   r�+test_comparingReleaseCandidatesWithReleasesz9VersionsTests.test_comparingReleaseCandidatesWithReleases�sX��
�Z��A�q�A�
>��
�Z��A�q�
)������R�� �����b��!����R��$rc��tddddd��}tdddd�}|j||kD�|j||k�|j||�y)z_
        Post releases are always greater than versions without post
        releases.
        r0rr�rNr2r s   r�&test_comparingPostReleasesWithReleasesz4VersionsTests.test_comparingPostReleasesWithReleases�sX��
�Z��A�q�q�
1��
�Z��A�q�
)������R�� �����b��!����R��$rc��tddddd��}tddddd��}|j||kD�|j||k�|j||�y)zg
        Dev releases are always greater than postreleases based on previous
        releases.
        r0rr�rrMNr2r s   r�1test_comparingDevReleasesWithPreviousPostReleasesz?VersionsTests.test_comparingDevReleasesWithPreviousPostReleases�sZ��
�Z��A�q�a�
0��
�Z��A�q�q�
1������R�� �����b��!����R��$rc��tddddd��}tdddd�}|j||k�|j||kD�|j||�y)zR
        Dev releases are always less than versions without dev releases.
        r0rrrPNr2r s   r�%test_comparingDevReleasesWithReleasesz3VersionsTests.test_comparingDevReleasesWithReleases�sX���Z��A�q�a�
0��
�Z��A�q�
)������R�� �����b��!����R��$rc��tddddd��}tddddd��}|j||k(�|j||k7�y)z>
        Release Candidates are equal to prereleases.
        r0rrrHr>N)rrr(r s   r�test_rcEqualsprezVersionsTests.test_rcEqualspre�sJ���Z��A�q�A�
>��
�Z��A�q�Q�
7������b��!�����r��"rc	�z�|jt�5tdddddd��ddd�y#1swYyxYw)zG
        Release Candidate and prerelease can't both be given.
        r0rr)r?rNr6r8s r�test_rcOrpreButNotBothz$VersionsTests.test_rcOrpreButNotBoth�s=���
�
�z�
*�	L��J��1�a�A��K�	L�	L�	L�s�1�:c
�x�tddddd��}tddddd��}|j||k�|j||kD�|j||k�|j||k\�|j||k7�|j|tddddd��k(�|j||k(�y)zf
        The value specified as the release candidate is used in version
        comparisons.
        r0rrrHrNrr s   r�test_comparingReleaseCandidatesz-VersionsTests.test_comparingReleaseCandidates�s���
�Z��A�q�A�
>��
�Z��A�q�A�
>������R�� �����R�� �����b��!�����b��!�����b��!�����g�j�!�Q��Q�O�O�P�����b��!rc
�x�tddddd��}tddddd��}|j||k�|j||kD�|j||k�|j||k\�|j||k7�|j|tddddd��k(�|j||k(�y)zX
        The value specified as the postrelease is used in version comparisons.
        r0rrrMrNrr s   r�test_comparingPostz VersionsTests.test_comparingPost�s����Z��A�q�q�
1��
�Z��A�q�q�
1������R�� �����R�� �����b��!�����b��!�����b��!�����g�j�!�Q���B�B�C�����b��!rc
�x�tddddd��}tddddd��}|j||k�|j||kD�|j||k�|j||k\�|j||k7�|j|tddddd��k(�|j||k(�y)zX
        The value specified as the dev release is used in version comparisons.
        r0rrrPrNrr s   r�test_comparingDevzVersionsTests.test_comparingDev�s����Z��A�q�a�
0��
�Z��A�q�a�
0������R�� �����R�� �����b��!�����b��!�����b��!�����g�j�!�Q��q�A�A�B�����b��!rc�~�tdddddd��}tdddddd��}|j||k�|j||kD�|j||k�|j||k\�|j||k7�|j|tdddddd��k(�|j||k(�y�zv
        The value specified as the dev release and release candidate is used in
        version comparisons.
        r0rr�rrrNrr s   r�test_comparingDevAndRCz$VersionsTests.test_comparingDevAndRC���
�Z��A�q�A�1�
E��
�Z��A�q�A�1�
E������R�� �����R�� �����b��!�����b��!�����b��!�����g�j�!�Q��Q�TU�V�V�W�����b��!rc�~�tdddddd��}tdddddd��}|j||k�|j||kD�|j||k�|j||k\�|j||k7�|j|tdddddd��k(�|j||k(�yr_rr s   r�test_comparingDevAndRCDifferentz-VersionsTests.test_comparingDevAndRCDifferentrbrc�l�t�}|jtt�|jt|kD�|j	t|k�|jt|k\�|j	t|k�|jt|k7�|j	t|k(�y)zR
        L{_inf} is equal to L{_inf}.

        This is a regression test.
        N)r%rrrr()rr*s  r�test_infComparisonz VersionsTests.test_infComparisons���
�H������t�$�����q��!�������"������	�"�������#������	�"�������#rc��|jttjt	dddd�t	dddd��y)zO
        The package names of the Version objects need to be the same.
        r
rr�dumymN)r&r�operator�eqrr8s r�test_disallowBuggyComparisonsz+VersionsTests.test_disallowBuggyComparisons-s8��	
��� ��K�K��G�Q��1�%��G�Q��1�%�		
rc�n�tdddd�}d}|j|j|�t�y)zh
        Comparing a L{Version} to some other object type results in
        C{NotImplemented}.
        r
rr)r
rrrN)rr�__cmp__�NotImplementedr s   r�test_notImplementedComparisonsz,VersionsTests.test_notImplementedComparisons8s1��
�W�a��A�
&��
��������B���8rc
�R�|jttdddd��d�y)zu
        Calling C{repr} on a version returns a human-readable string
        representation of the version.
        r
rrrzVersion('dummy', 1, 2, 3)N�r�reprrr8s r�	test_reprzVersionsTests.test_reprAs%��
	
����g�g�q�!�Q�7�8�:U�Vrc�V�|jttddddd���d�y)	z�
        Calling C{repr} on a version with a prerelease returns a human-readable
        string representation of the version including the prerelease as a
        release candidate..
        r
rrr�r>�.Version('dummy', 1, 2, 3, release_candidate=4)Nrqr8s r�test_reprWithPrereleasez%VersionsTests.test_reprWithPrereleaseHs*��	
������!�Q��a�8�9�<�	
rc�V�|jttddddd���d�y)	z�
        Calling C{repr} on a version with a release candidate returns a
        human-readable string representation of the version including the rc.
        r
rrrrurHrvNrqr8s r�test_reprWithReleaseCandidatez+VersionsTests.test_reprWithReleaseCandidateSs*��
	
������!�Q��Q�?�@�<�	
rc�V�|jttddddd���d�y)	z�
        Calling C{repr} on a version with a postrelease returns a
        human-readable string representation of the version including the
        postrelease.
        r
rrrrurMz!Version('dummy', 1, 2, 3, post=4)Nrqr8s r�test_reprWithPostzVersionsTests.test_reprWithPost]s*��	
������!�Q���2�3�5X�	
rc�V�|jttddddd���d�y)	z�
        Calling C{repr} on a version with a dev release returns a
        human-readable string representation of the version including the dev
        release.
        r
rrrrurPz Version('dummy', 1, 2, 3, dev=4)Nrqr8s r�test_reprWithDevzVersionsTests.test_reprWithDevgs*��	
������!�Q��q�1�2�4V�	
rc
�R�|jttdddd��d�y)zt
        Calling C{str} on a version returns a human-readable string
        representation of the version.
        r
rrrz[dummy, version 1.2.3]N�r�strrr8s r�test_strzVersionsTests.test_strqs%��
	
����W�W�a��A�6�7�9Q�Rrc�V�|jttddddd���d�y)zw
        Calling C{str} on a version with a prerelease includes the prerelease
        as a release candidate.
        r
rrr>�[dummy, version 1.0.0.rc1]Nrr8s r�test_strWithPrereleasez$VersionsTests.test_strWithPrereleasexs*��
	
�������A�q�Q�7�8�:V�	
rc�V�|jttddddd���d�y)zn
        Calling C{str} on a version with a release candidate includes the
        release candidate.
        r
rrrHr�Nrr8s r�test_strWithReleaseCandidatez*VersionsTests.test_strWithReleaseCandidate�s*��
	
�������A�q�A�>�?�(�	
rc�V�|jttddddd���d�y)zb
        Calling C{str} on a version with a postrelease includes the
        postrelease.
        r
rrrMz[dummy, version 1.0.0.post1]Nrr8s r�test_strWithPostzVersionsTests.test_strWithPost�s*��
	
�������A�q�q�1�2�4R�	
rc�X�|jttdddddd���d�y)z�
        Calling C{str} on a version with a release candidate and dev release
        includes the release candidate and the dev release.
        r
rrrr`z[dummy, version 1.0.0.rc1.dev2]Nrr8s r�"test_strWithDevAndReleaseCandidatez0VersionsTests.test_strWithDevAndReleaseCandidate�s,��
	
�������A�q�A�1�E�F�-�	
rc�V�|jttddddd���d�y)zb
        Calling C{str} on a version with a dev release includes the dev
        release.
        r
rrrPzummy, version 1.0.0.dev1]Nrr8s r�test_strWithDevzVersionsTests.test_strWithDev�s*��
	
�������A�q�a�0�1�3P�	
rc�X�|jttdddddd���d�y)z�
        Calling C{str} on a version with a postrelease and dev release
        includes the postrelease and the dev release.
        r
rrr�rrz![dummy, version 1.0.0.post1.dev2]Nrr8s r�test_strWithDevAndPostz$VersionsTests.test_strWithDevAndPost�s,��
	
�������A�q�q�a�8�9�/�	
rc�\�|jtdddd�j�d�y)Nr
rrrz1.2.3)rrrr8s r�	testShortzVersionsTests.testShort�s&�������!�Q��2�8�8�:�G�Drc�R�|jdttdddd���y)zr
        L{getVersionString} returns a string with the package name and the
        short version number.
        z
Twisted 8.0.0�Twisted�rN�rrrr8s r�test_getVersionStringz#VersionsTests.test_getVersionString�s'��
	
����*:�7�9�a�QR�TU�;V�*W�Xrc�V�|jttddddd���d�y)ze
        L{getVersionString} includes the prerelease as a release candidate, if
        any.
        r0r�rrr>�whatever 8.0.0.rc1Nr�r8s r�#test_getVersionStringWithPrereleasez1VersionsTests.test_getVersionStringWithPrerelease�s*��
	
����W�Z��A�q�Q�G�H� �	
rc�V�|jttddddd���d�y)zM
        L{getVersionString} includes the release candidate, if any.
        r0r�rrrHr�Nr�r8s r�)test_getVersionStringWithReleaseCandidatez7VersionsTests.test_getVersionStringWithReleaseCandidate�s*��	
����W�Z��A�q�A�N�O� �	
rc�V�|jttddddd���d�y)zG
        L{getVersionString} includes the postrelease, if any.
        r0r�rrrMzwhatever 8.0.0.post1Nr�r8s r�test_getVersionStringWithPostz+VersionsTests.test_getVersionStringWithPost�s*��	
����W�Z��A�q�q�A�B�"�	
rc�V�|jttddddd���d�y)zG
        L{getVersionString} includes the dev release, if any.
        r0r�rrrPzwhatever 8.0.0.dev1Nr�r8s r�test_getVersionStringWithDevz*VersionsTests.test_getVersionStringWithDev�s*��	
����W�Z��A�q�a�@�A�CX�	
rc�X�|jttdddddd���d�y)	ze
        L{getVersionString} includes the dev release and release candidate, if
        any.
        r0r�rrrr`zwhatever 8.0.0.rc2.dev1Nr�r8s r�!test_getVersionStringWithDevAndRCz/VersionsTests.test_getVersionStringWithDevAndRC�s-��
	
����W�Z��A�q�A�ST�U�V�%�	
rc�X�|jttdddddd���d�y)	z_
        L{getVersionString} includes the dev release and postrelease, if
        any.
        r0r�rrrr�zwhatever 8.0.0.post2.dev1Nr�r8s r�#test_getVersionStringWithDevAndPostz1VersionsTests.test_getVersionStringWithDevAndPost�s,��
	
����W�Z��A�q�q�a�H�I�'�	
rc�\�|jtdddd�j�d�y)zX
        The C{base} method returns just "NEXT" when NEXT is the major version.
        �foor1rN�rr�baser8s r�test_baseWithNEXTzVersionsTests.test_baseWithNEXT�s(��	
�������1�5�:�:�<�f�Erc�\�|jtdddd�j�d�y)zY
        The C{base} method returns a very simple representation of the version.
        r�rrz1.0.0Nr�r8s r�	test_basezVersionsTests.test_base�s(��	
������1�a�0�5�5�7��Arc	�`�|jtddddd��j�d�y)�P
        The base version includes 'rcX' for versions with prereleases.
        r�rrr�r>�	1.0.0.rc8Nr�r8s r�test_baseWithPrereleasez%VersionsTests.test_baseWithPrerelease�s*��	
������1�a�A�>�C�C�E�{�Src	�`�|jtddddd��j�d�y)zS
        The base version includes 'postX' for versions with postreleases.
        r�rrr�rMz1.0.0.post8Nr�r8s r�test_baseWithPostzVersionsTests.test_baseWithPosts*��	
������1�a�a�8�=�=�?��Orc	�`�|jtddddd��j�d�y)zR
        The base version includes 'devX' for versions with dev releases.
        r�rrr�rPz
1.0.0.dev8Nr�r8s r�test_baseWithDevzVersionsTests.test_baseWithDevs*��	
������1�a�Q�7�<�<�>��Mrc	�`�|jtddddd��j�d�y)r�r�rrr�rHr�Nr�r8s r�test_baseWithReleaseCandidatez+VersionsTests.test_baseWithReleaseCandidates-��	
����E�1�a��a�8�=�=�?��	
rc
�b�|jtdddddd��j�d�y)	zu
        The base version includes 'rcXdevX' for versions with dev releases and
        a release candidate.
        r�rrrr�r`z1.0.0.rc2.dev8Nr�r8s r�test_baseWithDevAndRCz#VersionsTests.test_baseWithDevAndRCs0��
	
����E�1�a��a�Q�?�D�D�F�HX�	
rc
�b�|jtdddddd��j�d�y)	zq
        The base version includes 'postXdevX' for versions with dev releases
        and a postrelease.
        r�rrrr�r�z1.0.0.post2.dev8Nr�r8s r�test_baseWithDevAndPostz%VersionsTests.test_baseWithDevAndPost"s0��
	
����E�1�a����2�7�7�9�;M�	
rN);�__name__�
__module__�__qualname__rr"�unittest�skipIf�sys�version_infor+r.r4r9r<r@rFrIrKrNrQrSrUrWrYr[r]rardrfrkrorsrwryr{r}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��rrrrs:��1�"��X�_�_�S�%�%��,�.O�P� �Q� �,"�%�R�&"�%�
�
�	%�	%�	%�%�#�L�
"�"�"�
"�
"�
$�	
�9�W�	
�
�
�
�S�
�
�
�
�
�
�E�Y�
�
�
�
�
�
�F�B�T�P�N�
�
�
rr)�__doc__�
__future__rrr�r�ri�incrementalrrrr�twisted.trial.unittestr	rr�rr�<module>r�s2���1�
����>�%�+�T
�H�T
r

Zerion Mini Shell 1.0