CasperSecurity

Current Path : /lib/python3/dist-packages/incremental/tests/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/incremental/tests/__pycache__/test_update.cpython-310.pyc

o

�M=`^��@s�dZddlmZmZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZmZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZdS)z"
Tests for L{incremental.update}.
�)�division�absolute_importN)�FilePath)�NativeStringIO)�TestCase)�_run�runc@�eZdZdd�Zdd�ZdS)�NonCreatedUpdateTestscslt�����_�j���j�d�}|��|�d��d��fdd��_|�_Gdd�dt�}|��_	dS)N�
inctestpkg�__init__.py�
from incremental import Version
introduced_in = Version("inctestpkg", "NEXT", 0, 0).short()
next_released_version = "inctestpkg NEXT"
c��jjS�N��srcdir�path���selfr�?/usr/lib/python3/dist-packages/incremental/tests/test_update.py�<lambda>%�z-NonCreatedUpdateTests.setUp.<locals>.<lambda>c@�eZdZdZdZdS)z)NonCreatedUpdateTests.setUp.<locals>.Date���N��__name__�
__module__�__qualname__�year�monthrrrr�Date(�r"�
r�mktempr�makedirs�child�
setContent�getcwd�
packagedir�object�date�rr*r"rrr�setUps

�zNonCreatedUpdateTests.setUpc
Csp|�|j�d����g}tdddddddd|j|j|jd�|�|j�d����|�	|j�d��
�d�dS)zP
        `incremental.update package --create` initialises the version.
        �_version.pyrNFT�
r�
newversion�patch�rc�post�dev�create�_date�_getcwd�_print�
"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 16, 8, 0)
__all__ = ["__version__"]
)�assertFalser*r'�existsrr,r)�append�
assertTrue�assertEqual�
getContent�r�outrrr�test_create.s(��z!NonCreatedUpdateTests.test_createN)rrrr.rCrrrrr
sr
c@r	)�MissingTestsc�t�����_�j���j�d����j�d��d�}|��|�d��d�|�d��d��fdd��_|�_Gd	d
�d
t�}|��_	dS)N�srcarrr
r/�h
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3)
__all__ = ["__version__"]
crrrrrrrrnrz$MissingTests.setUp.<locals>.<lambda>c@r)z MissingTests.setUp.<locals>.DaterrNrrrrrr"qr#r"r$r-rrrr.V�

�
�zMissingTests.setUpcCsXg}|�t��tdddddddd|j|j|jd�Wd�dS1s%wYdS)zk
        `incremental.update package --dev` raises and quits if it can't find
        the package.
        rNFTr0)�assertRaises�
ValueErrorrr,r)r=rArrr�	test_pathws �"�zMissingTests.test_pathN�rrrr.rKrrrrrDU�!rDc@r	)�CreatedUpdateInSrcTestscrE)N�srcrrr
r/rGcrrrrrrrr�rz/CreatedUpdateInSrcTests.setUp.<locals>.<lambda>c@r)z+CreatedUpdateInSrcTests.setUp.<locals>.DaterrNrrrrrr"�r#r"r$r-rrrr.�rHzCreatedUpdateInSrcTests.setUpc
Cs�g}tdddddddd|j|j|jd�|�|j�d����|�|j�d��	�d�tdddddddd|j|j|jd�|�|j�d����|�|j�d��	�d�dS)	��
        `incremental.update package --path=<path> --dev` increments the dev
        version of the package on the given path
        rNFTr0r/�"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 3, dev=0)
__all__ = ["__version__"]
s"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 3, dev=1)
__all__ = ["__version__"]
�
rr,r)r=r>r*r'r<r?r@rArrrrK�sJ����z!CreatedUpdateInSrcTests.test_pathNrLrrrrrN�rMrNc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�ZdS)&�CreatedUpdateTestsNcs|t�����_�j���j�d�}|��|�d��d�|�d��d��fdd��_|�_Gdd	�d	t�}|��_	dS)
Nrrr
r/rGcrrrrrrrrrz*CreatedUpdateTests.setUp.<locals>.<lambda>c@r)z&CreatedUpdateTests.setUp.<locals>.DaterrNrrrrrr"r#r"r$r-rrrr.�s

�
�zCreatedUpdateTests.setUpcCsZg}td|jjdddddd|j|jd�
|�|j�d����|�|j�d��	�d�dS)rPrNFT)	rr1r2r3r4r5r6r7r9r/rQ)
rr*rr,r=r>r'r<r?r@rArrrrKs$�
�zCreatedUpdateTests.test_pathc
CsZg}tdddddddd|j|j|jd�|�|j�d����|�|j�d��	�d�dS)zP
        `incremental.update package --dev` increments the dev version.
        rNFTr0r/rQrRrArrr�test_dev;�&��zCreatedUpdateTests.test_devc
Cs\g}tdddddddd|j|j|jd�|�|j�d���d�|�|j�d���d	�dS)
zT
        `incremental.update package --patch` increments the patch version.
        rNTFr0r/�"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 4)
__all__ = ["__version__"]
rs�
from incremental import Version
introduced_in = Version("inctestpkg", 1, 2, 4).short()
next_released_version = "inctestpkg 1.2.4"
�rr,r)r=r?r*r'r@rArrr�
test_patch_s,���zCreatedUpdateTests.test_patchc
CsV|j�d��d�g}tdddddddd|j|j|jd�|�|j�d���d�dS)	z�
        `incremental.update package --patch` increments the patch version, and
        disregards any old prerelease/dev versions.
        r/�
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3, release_candidate=1, dev=2)
__all__ = ["__version__"]
rNTFr0rV�	r*r'r(rr,r)r=r?r@rArrr�"test_patch_with_prerelease_and_dev��*���z5CreatedUpdateTests.test_patch_with_prerelease_and_devc
Cs\g}tdddddddd|j|j|jd�|�|j�d���d�|�|j�d���d	�dS)
z�
        `incremental.update package --patch --rc` increments the patch
        version and makes it a release candidate.
        rNTFr0r/s!"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 4, release_candidate=1)
__all__ = ["__version__"]
rs�
from incremental import Version
introduced_in = Version("inctestpkg", 1, 2, 4, release_candidate=1).short()
next_released_version = "inctestpkg 1.2.4.rc1"
rWrArrr�
test_rc_patch��,���z CreatedUpdateTests.test_rc_patchc
C�n|j�d��d�g}tdddddddd|j|j|jd�|�|j�d���d�|�|j�d	���d
�dS)z�
        `incremental.update package --rc` increments the rc version if the
        existing version is an rc, and discards any dev version.
        r/rYrNFTr0s!"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 3, release_candidate=2)
__all__ = ["__version__"]
rs�
from incremental import Version
introduced_in = Version("inctestpkg", 1, 2, 3, release_candidate=2).short()
next_released_version = "inctestpkg 1.2.3.rc2"
rZrArrr�test_rc_with_existing_rc��2����z+CreatedUpdateTests.test_rc_with_existing_rcc
Cr_)z�
        `incremental.update package --rc`, when the package is not a release
        candidate, will issue a new major/minor rc, and disregards the micro
        and dev.
        r/so
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3, dev=2)
__all__ = ["__version__"]
rNFTr0�""""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 16, 8, 0, release_candidate=1)
__all__ = ["__version__"]
r�
from incremental import Version
introduced_in = Version("inctestpkg", 16, 8, 0, release_candidate=1).short()
next_released_version = "inctestpkg 16.8.0.rc1"
rZrArrr�test_rc_with_no_rcs2����z%CreatedUpdateTests.test_rc_with_no_rcc
Cs�g}tdddddddd|j|j|jd�|�|j�d���d�|�|j�d���d	�tdddddddd|j|j|jd�|�|j�d���d
�|�|j�d���d�dS)z�
        `incremental.update package`, when the package is a release
        candidate, will issue the major/minor, sans release candidate or dev.
        rNFTr0r/rbrrcr:s�
from incremental import Version
introduced_in = Version("inctestpkg", 16, 8, 0).short()
next_released_version = "inctestpkg 16.8.0"
rWrArrr�test_full_with_rcKsV���	���z$CreatedUpdateTests.test_full_with_rccCsjg}|�t��}tdddddddd|j|j|jd�Wd�n1s$wY|�|jjdd�dS)zy
        `incremental.update package`, when the package is NOT a release
        candidate, will raise an error.
        rNFr0rz6You need to issue a rc before updating the major/minor�	rIrJrr,r)r=r?�	exception�args�rrB�errr�test_full_without_rc�s(��
�z'CreatedUpdateTests.test_full_without_rcc
CsZg}tdddddddd|j|j|jd�|�|j�d����|�|j�d��	�d�dS)zR
        `incremental.update package --post` increments the post version.
        rNFTr0r/�"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 3, post=0)
__all__ = ["__version__"]
rRrArrr�	test_post�rUzCreatedUpdateTests.test_postc
CsV|j�d��d�g}tdddddddd|j|j|jd�|�|j�d���d�dS)	z�
        `incremental.update package --post` increments the post version, and
        disregards any old prerelease/dev versions.
        r/rYrNFTr0rlrZrArrr�!test_post_with_prerelease_and_dev�r\z4CreatedUpdateTests.test_post_with_prerelease_and_devc
Csn|j�d��d�g}tdddddddd|j|j|jd�|�|j�d���d�|�|j�d	���d
�dS)z�
        `incremental.update package --post` increments the post version if the
        existing version is an postrelease, and discards any dev version.
        r/sw
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3, post=1, dev=2)
__all__ = ["__version__"]
rNFTr0s"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 3, post=2)
__all__ = ["__version__"]
rs�
from incremental import Version
introduced_in = Version("inctestpkg", 1, 2, 3, post=2).short()
next_released_version = "inctestpkg 1.2.3.post2"
rZrArrr�test_post_with_existing_postraz/CreatedUpdateTests.test_post_with_existing_postcCs�g}|�t��}tdddddddd|j|j|jd�Wd�n1s$wY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1sUwY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1s�wY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1s�wY|�|jjdd�dS)	zf
        The `--newversion` flag can't be mixed with --patch, --rc, --post,
        or --dev.
        rN�1TFr0rzOnly give --newversionrfrirrr�test_no_mix_newversion;s���������z)CreatedUpdateTests.test_no_mix_newversioncCs.g}|�t��}tdddddddd|j|j|jd�Wd�n1s$wY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1sUwY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1s�wY|�|jjdd�dS)zP
        The `--dev` flag can't be mixed with --patch, --rc, or --post.
        rNTFr0rzOnly give --devrfrirrr�test_no_mix_dev�sb������z"CreatedUpdateTests.test_no_mix_devcCs�g}|�t��}tdddddddd|j|j|jd�Wd�n1s$wY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1sUwY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1s�wY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1s�wY|�|jjdd�|�t��}tdddddddd|j|j|jd�Wd�n1s�wY|�|jjdd�dS)	zp
        The `--create` flag can't be mixed with --patch, --rc, --post,
        --dev, or --newversion.
        rNTFr0rzOnly give --createrprfrirrr�test_no_mix_create�s�����������z%CreatedUpdateTests.test_no_mix_createc
C�\g}tdddddddd|j|j|jd�|�|j�d���d�|�|j�d���d	�dS)
z
        `incremental.update package --newversion=1.2.3.rc1.post2.dev3`, will
        set that version in the package.
        rNz1.2.3.rc1.post2.dev3Fr0r/s0"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 2, 3, release_candidate=1, post=2, dev=3)
__all__ = ["__version__"]
rs�
from incremental import Version
introduced_in = Version("inctestpkg", 1, 2, 3, release_candidate=1, post=2, dev=3).short()
next_released_version = "inctestpkg 1.2.3.rc1.post2.dev3"
rWrArrr�test_newversions,���z"CreatedUpdateTests.test_newversionc
Crt)
zl
        `incremental.update package --newversion=1`, will set that
        version in the package.
        rNrpFr0r/s"""
Provides inctestpkg version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update inctestpkg` to change this file.

from incremental import Version

__version__ = Version("inctestpkg", 1, 0, 0)
__all__ = ["__version__"]
rs�
from incremental import Version
introduced_in = Version("inctestpkg", 1, 0, 0).short()
next_released_version = "inctestpkg 1.0.0"
rWrArrr�test_newversion_bare<r^z'CreatedUpdateTests.test_newversion_bare)rrr�maxDiffr.rKrTrXr[r]r`rdrerkrmrnrorqrrrsrurvrrrrrS�s($$+,,45R$,4F5V0rSc@s$eZdZdd�Zdd�Zdd�ZdS)�ScriptTestscs�t�����_�j���j�d����j�d��d�}|��|�d��d�|�d��d��fdd��_|�_Gd	d
�d
t��G�fdd�dt�}|��_	dS)
NrOrrr
r/rGcrrrrrrrr�rz#ScriptTests.setUp.<locals>.<lambda>c@r)zScriptTests.setUp.<locals>.DaterrNrrrrrr"�r#r"cseZdZ�fdd�ZdS)z%ScriptTests.setUp.<locals>.DateModulecs��Srrr�r"rr�today�sz+ScriptTests.setUp.<locals>.DateModule.todayN)rrrrzrryrr�
DateModule�sr{r$)rr*r{r)r"rrr.js 

�
�zScriptTests.setUpcCspt�}|�td|�|�t��
}tdg�Wd�n1swY|�|jjdd�|�	d|�
��dS)�I
        Calling run() with no args will cause it to print help.
        �stdoutz--helpNrzShow this message and exit)rr2�sysrI�
SystemExitrr?rgrh�assertIn�getvalue�r�stringiorjrrr�test_run�s�zScriptTests.test_runcCs�t�}|�td|�|�td|j�|�td|j�|�t��}t	ddg�Wd�n1s0wY|�
|jjdd�|�
d|���|�
|j�d	���d
�|�
|j�d���d�dS)
r|r}r)r,rz--rcNrzUpdating codebaser/rbrrc)rr2r~�osr)�datetimer,rIrrr?rgrhr�r�r*r'r@r�rrr�test_insufficient_args�s"���z"ScriptTests.test_insufficient_argsN)rrrr.r�r�rrrrrxis%
rx)�__doc__�
__future__rrr~r�r��twisted.python.filepathr�twisted.python.compatr�twisted.trial.unittestr�incremental.updaterrr
rDrNrSrxrrrr�<module>s(@8g{
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY