AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/incremental/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/incremental/tests/__pycache__/test_version.cpython-310.pyc
o

��bAE�@sddZddlmZmZddlZddlZddlmZmZddlm	Z	m
Z
ddlmZGdd�de�Z
dS)	z
Tests for L{incremental}.
�)�division�absolute_importN)�getVersionString�IncomparableVersions)�Version�_inf)�TestCasec@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGdH�Z&dIdJ�Z'dKdL�Z(dMdN�Z)dOdP�Z*dQdR�Z+dSdT�Z,dUdV�Z-dWdX�Z.dYdZ�Z/d[d\�Z0d]d^�Z1d_d`�Z2dadb�Z3dcdd�Z4dedf�Z5dgS)h�
VersionsTestsc	Cs.tdddddddd�}|�|��|���dS)zE
        The local version is the same as the short version.
        �dummy�r����release_candidate�post�devN)r�assertEqual�local�short)�self�va�r�@/usr/lib/python3/dist-packages/incremental/tests/test_version.py�test_localIsShortszVersionsTests.test_localIsShortcCs�tdddd�}tdddd�}|�||k�|�||k�|�||k�|�||k�|�||k�|�|tdddd�k�|�||k�dS)zB
        Versions can be compared for equality and order.
        r
rrN�r�
assertTrue�rr�vbrrr�test_versionComparison�z$VersionsTests.test_versionComparisoncCs�tdddd�}tdddd�}|�||k�|�||k�|�||k�|�||k�|�||k�|�|tdddd�k�|�||k�dS)z=
        Version package names are case insensitive.
        r
rr�DuMmYNrrrrr�%test_versionComparisonCaseInsensitive)rz3VersionsTests.test_versionComparisonCaseInsensitivecCsHtdddd�}tdddd�}|�||k�|�||k�|�||�dS)zI
        NEXT releases are always larger than numbered releases.
        �whatever�NEXTrrN�rr�assertFalse�assertNotEqualsrrrr�test_comparingNEXTReleases7s
z(VersionsTests.test_comparingNEXTReleasesc
CsF|�t��tdddddddd�Wd�n1swY|�t��tdddddddd�Wd�n1s;wY|�t��tdddddddd�Wd�n1s[wY|�t��tdddddddd�Wd�n1s{wY|�t��tdddddddd�Wd�dS1s�wYdS)zR
        NEXT releases must always have the rest of the numbers set to 0.
        r"r#rrrN��assertRaises�
ValueErrorr�rrrr�test_NEXTMustBeAloneAs����"�z"VersionsTests.test_NEXTMustBeAlonecCs,tdddd�}tdddd�}|�||�dS)z8
        NEXT releases are equal to each other.
        r"r#rN)r�assertEqualsrrrr�test_comparingNEXTReleasesEqualTsz-VersionsTests.test_comparingNEXTReleasesEqualcC�Ltdddddd�}tdddd�}|�||k�|�||k�|�||�dS)zP
        Prereleases are always less than versions without prereleases.
        r"rr��
prereleaseNr$rrrr�%test_comparingPrereleasesWithReleases\�
z3VersionsTests.test_comparingPrereleasesWithReleasescCsBtdddddd�|��}|�t|�d�|�|ddd�dS)z@
        Passing 'prerelease' to Version is deprecated.
        r"rrr0�messagezvPassing prerelease to incremental.Version was deprecated in Incremental 16.9.0. Please pass release_candidate instead.N)r�
flushWarningsr�len)r�warningsrrr�test_prereleaseDeprecatedfs
�z'VersionsTests.test_prereleaseDeprecatedcCsHtdddddd�}|j|��}|�t|�d�|�|ddd�dS)zD
        Accessing 'prerelease' on a Version is deprecated.
        r"rr�rr4zuAccessing incremental.Version.prerelease was deprecated in Incremental 16.9.0. Use Version.release_candidate instead.N)rr1r5rr6)rrr7rrr�"test_prereleaseAttributeDeprecatedus
�z0VersionsTests.test_prereleaseAttributeDeprecatedcCr/)zf
        Release Candidates are always less than versions without release
        candidates.
        r"rrr9Nr$rrrr�+test_comparingReleaseCandidatesWithReleases��
z9VersionsTests.test_comparingReleaseCandidatesWithReleasescCsLtdddddd�}tdddd�}|�||k�|�||k�|�||�dS)z_
        Post releases are always greater than versions without post
        releases.
        r"rr�rNr$rrrr�&test_comparingPostReleasesWithReleases�r<z4VersionsTests.test_comparingPostReleasesWithReleasescCsPtdddddd�}tdddddd�}|�||k�|�||k�|�||�dS)zg
        Dev releases are always greater than postreleases based on previous
        releases.
        r"rr�rr=Nr$rrrr�1test_comparingDevReleasesWithPreviousPostReleases�s
z?VersionsTests.test_comparingDevReleasesWithPreviousPostReleasescCr/)zR
        Dev releases are always less than versions without dev releases.
        r"rrr?Nr$rrrr�%test_comparingDevReleasesWithReleases�r3z3VersionsTests.test_comparingDevReleasesWithReleasescCsDtdddddd�}tdddddd�}|�||k�|�||k�dS)z>
        Release Candidates are equal to prereleases.
        r"rrr9r0N)rrr%rrrr�test_rcEqualspre�szVersionsTests.test_rcEqualsprec	CsD|�t��tddddddd�Wd�dS1swYdS)zG
        Release Candidate and prerelease can't both be given.
        r"rr)r1rNr(r+rrr�test_rcOrpreButNotBoth�s"�z$VersionsTests.test_rcOrpreButNotBothc
C�tdddddd�}tdddddd�}|�||k�|�||k�|�||k�|�||k�|�||k�|�|tdddddd�k�|�||k�dS)zf
        The value specified as the release candidate is used in version
        comparisons.
        r"rrr9rNrrrrr�test_comparingReleaseCandidates�sz-VersionsTests.test_comparingReleaseCandidatesc
CrD)zX
        The value specified as the postrelease is used in version comparisons.
        r"rrr=rNrrrrr�test_comparingPost��z VersionsTests.test_comparingPostc
CrD)zX
        The value specified as the dev release is used in version comparisons.
        r"rrr?rNrrrrr�test_comparingDev�rGzVersionsTests.test_comparingDevcCs�tddddddd�}tddddddd�}|�||k�|�||k�|�||k�|�||k�|�||k�|�|tddddddd�k�|�||k�dS�zv
        The value specified as the dev release and release candidate is used in
        version comparisons.
        r"rr�rrrNrrrrr�test_comparingDevAndRC��z$VersionsTests.test_comparingDevAndRCcCs�tddddddd�}tddddddd�}|�||k�|�||k�|�||k�|�||k�|�||k�|�|tddddddd�k�|�||k�dSrIrrrrr�test_comparingDevAndRCDifferent�rLz-VersionsTests.test_comparingDevAndRCDifferentcCs|�tt�dS)zR
        L{_inf} is equal to L{_inf}.

        This is a regression test.
        N)rrr+rrr�test_infComparison	sz VersionsTests.test_infComparisonc
Cs*|�ttjtdddd�tdddd��dS)zO
        The package names of the Version objects need to be the same.
        r
rr�dumymN)r)r�operator�eqrr+rrr�test_disallowBuggyComparisonss�z+VersionsTests.test_disallowBuggyComparisonscCs(tdddd�}d}|�|�|�t�dS)zh
        Comparing a L{Version} to some other object type results in
        C{NotImplemented}.
        r
rr)r
rrrN)rr�__cmp__�NotImplementedrrrr�test_notImplementedComparisonssz,VersionsTests.test_notImplementedComparisonscC�|�ttdddd��d�dS)zu
        Calling C{repr} on a version returns a human-readable string
        representation of the version.
        r
rrr
zVersion('dummy', 1, 2, 3)N�r�reprrr+rrr�	test_repr%�zVersionsTests.test_reprc
C�"|�ttdddddd��d�dS)	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
rrr
�r0�.Version('dummy', 1, 2, 3, release_candidate=4)NrWr+rrr�test_reprWithPrerelease,s�z%VersionsTests.test_reprWithPrereleasec
Cr[)	z�
        Calling C{repr} on a version with a release candidate returns a
        human-readable string representation of the version including the rc.
        r
rrr
r\r9r]NrWr+rrr�test_reprWithReleaseCandidate7��z+VersionsTests.test_reprWithReleaseCandidatec
Cr[)	z�
        Calling C{repr} on a version with a postrelease returns a
        human-readable string representation of the version including the
        postrelease.
        r
rrr
r\r=z!Version('dummy', 1, 2, 3, post=4)NrWr+rrr�test_reprWithPostA��zVersionsTests.test_reprWithPostc
Cr[)	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
rrr
r\r?z Version('dummy', 1, 2, 3, dev=4)NrWr+rrr�test_reprWithDevKrbzVersionsTests.test_reprWithDevcCrV)zt
        Calling C{str} on a version returns a human-readable string
        representation of the version.
        r
rrr
z[dummy, version 1.2.3]N�r�strrr+rrr�test_strUrZzVersionsTests.test_strc
C�"|�ttdddddd��d�dS)zw
        Calling C{str} on a version with a prerelease includes the prerelease
        as a release candidate.
        r
rrr0�[dummy, version 1.0.0.rc1]Nrdr+rrr�test_strWithPrerelease\��z$VersionsTests.test_strWithPrereleasec
Crg)zn
        Calling C{str} on a version with a release candidate includes the
        release candidate.
        r
rrr9rhNrdr+rrr�test_strWithReleaseCandidateer`z*VersionsTests.test_strWithReleaseCandidatec
Crg)zb
        Calling C{str} on a version with a postrelease includes the
        postrelease.
        r
rrr=z[dummy, version 1.0.0.post1]Nrdr+rrr�test_strWithPostorjzVersionsTests.test_strWithPostcC�$|�ttddddddd��d�dS)z�
        Calling C{str} on a version with a release candidate and dev release
        includes the release candidate and the dev release.
        r
rrrrJz[dummy, version 1.0.0.rc1.dev2]Nrdr+rrr�"test_strWithDevAndReleaseCandidatex��z0VersionsTests.test_strWithDevAndReleaseCandidatec
Crg)zb
        Calling C{str} on a version with a dev release includes the dev
        release.
        r
rrr?zummy, version 1.0.0.dev1]Nrdr+rrr�test_strWithDev�rjzVersionsTests.test_strWithDevcCrm)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]Nrdr+rrr�test_strWithDevAndPost�roz$VersionsTests.test_strWithDevAndPostcCs|�tdddd���d�dS)Nr
rrr
z1.2.3)rrrr+rrr�	testShort�szVersionsTests.testShortc	Cs|�dttdddd���dS)zr
        L{getVersionString} returns a string with the package name and the
        short version number.
        z
Twisted 8.0.0�Twisted�rN�rrrr+rrr�test_getVersionString�rZz#VersionsTests.test_getVersionStringc
C�"|�ttdddddd��d�dS)ze
        L{getVersionString} includes the prerelease as a release candidate, if
        any.
        r"rurrr0�whatever 8.0.0.rc1Nrvr+rrr�#test_getVersionStringWithPrerelease�r`z1VersionsTests.test_getVersionStringWithPrereleasec
Crx)zM
        L{getVersionString} includes the release candidate, if any.
        r"rurrr9ryNrvr+rrr�)test_getVersionStringWithReleaseCandidate���z7VersionsTests.test_getVersionStringWithReleaseCandidatec
Crx)zG
        L{getVersionString} includes the postrelease, if any.
        r"rurrr=zwhatever 8.0.0.post1Nrvr+rrr�test_getVersionStringWithPost�r|z+VersionsTests.test_getVersionStringWithPostc
Crx)zG
        L{getVersionString} includes the dev release, if any.
        r"rurrr?zwhatever 8.0.0.dev1Nrvr+rrr�test_getVersionStringWithDev���z*VersionsTests.test_getVersionStringWithDevcC�$|�ttddddddd��d�dS)	ze
        L{getVersionString} includes the dev release and release candidate, if
        any.
        r"rurrrrJzwhatever 8.0.0.rc2.dev1Nrvr+rrr�!test_getVersionStringWithDevAndRC�roz/VersionsTests.test_getVersionStringWithDevAndRCcCr�)	z_
        L{getVersionString} includes the dev release and postrelease, if
        any.
        r"rurrrrqzwhatever 8.0.0.post2.dev1Nrvr+rrr�#test_getVersionStringWithDevAndPost�roz1VersionsTests.test_getVersionStringWithDevAndPostcCs|�tdddd���d�dS)zX
        The C{base} method returns just "NEXT" when NEXT is the major version.
        �foor#rN�rr�baser+rrr�test_baseWithNEXT��zVersionsTests.test_baseWithNEXTcCs|�tdddd���d�dS)zY
        The C{base} method returns a very simple representation of the version.
        r�rrz1.0.0Nr�r+rrr�	test_base�r�zVersionsTests.test_basec	C�"|�tdddddd���d�dS)�P
        The base version includes 'rcX' for versions with prereleases.
        r�rrrur0�	1.0.0.rc8Nr�r+rrr�test_baseWithPrerelease��"z%VersionsTests.test_baseWithPrereleasec	Cr�)zS
        The base version includes 'postX' for versions with postreleases.
        r�rrrur=z1.0.0.post8Nr�r+rrr�test_baseWithPost�r�zVersionsTests.test_baseWithPostc	Cr�)zR
        The base version includes 'devX' for versions with dev releases.
        r�rrrur?z
1.0.0.dev8Nr�r+rrr�test_baseWithDev�r�zVersionsTests.test_baseWithDevc	Cr�)r�r�rrrur9r�Nr�r+rrr�test_baseWithReleaseCandidate�rz+VersionsTests.test_baseWithReleaseCandidatec
C�$|�tddddddd���d�dS)	zu
        The base version includes 'rcXdevX' for versions with dev releases and
        a release candidate.
        r�rrrrurJz1.0.0.rc2.dev8Nr�r+rrr�test_baseWithDevAndRC���z#VersionsTests.test_baseWithDevAndRCc
Cr�)	zq
        The base version includes 'postXdevX' for versions with dev releases
        and a postrelease.
        r�rrrrurqz1.0.0.post2.dev8Nr�r+rrr�test_baseWithDevAndPostr�z%VersionsTests.test_baseWithDevAndPostN)6�__name__�
__module__�__qualname__rrr!r'r,r.r2r8r:r;r>r@rArBrCrErFrHrKrMrNrRrUrYr^r_rarcrfrirkrlrnrprrrsrwrzr{r}r~r�r�r�r�r�r�r�r�r�r�rrrrr	sh


		


	
	
	

		

	r	)�__doc__�
__future__rrrP�unittest�incrementalrrrr�twisted.trial.unittestrr	rrrr�<module>s

Anon7 - 2022
AnonSec Team