
    h                         S r SSKJrJr  SSKrSSKrSSKrSSKJr  SSK	J
r
  SSKJr  SSKJrJr   " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      rg)z"
Tests for L{incremental.update}.
    )divisionabsolute_importN)FilePath)NativeStringIO)TestCase)_runrunc                        \ rS rSrS rS rSrg)NonCreatedUpdateTests   c                 f  ^  [        T R                  5       5      T l        T R                  R                  5         T R                  R	                  S5      nUR                  5         UR	                  S5      R                  S5        U 4S jT l        UT l         " S S[        5      nU" 5       T l	        g )N
inctestpkg__init__.py   
from incremental import Version
introduced_in = Version("inctestpkg", "NEXT", 0, 0).short()
next_released_version = "inctestpkg NEXT"
c                  0   > T R                   R                  $ Nsrcdirpathselfs   d/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/incremental/tests/test_update.py<lambda>-NonCreatedUpdateTests.setUp.<locals>.<lambda>$       dkk..    c                       \ rS rSrSrSrSrg))NonCreatedUpdateTests.setUp.<locals>.Date'         N__name__
__module____qualname____firstlineno__yearmonth__static_attributes__r"   r   r   Dater   '       DEr   r+   
r   mktempr   makedirschild
setContentgetcwd
packagedirobjectdater   r3   r+   s   `  r   setUpNonCreatedUpdateTests.setUp   s    t{{}-[[&&|4
'22	
 /$	6 	 F	r   c                    U R                  U R                  R                  S5      R                  5       5        / n[	        SSSSSSSSU R
                  U R                  UR                  S9  U R                  U R                  R                  S5      R                  5       5        U R                  U R                  R                  S5      R                  5       S5        g)z@
`incremental.update package --create` initialises the version.
_version.pyr   NFT
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__"]
)assertFalser3   r0   existsr   r5   r2   append
assertTrueassertEqual
getContentr   outs     r   test_create!NonCreatedUpdateTests.test_create-   s     	..}=DDFG))KK::	
 	--m<CCEFOO!!-0;;=	
r   r5   r2   r3   r   N)r$   r%   r&   r'   r7   rN   r*   r"   r   r   r   r      s    .$
r   r   c                        \ rS rSrS rS rSrg)MissingTestsT   c                   ^  [        T R                  5       5      T l        T R                  R                  5         T R                  R	                  S5      R                  5         T R                  R	                  S5      R	                  S5      nUR                  5         UR	                  S5      R                  S5        UR	                  S5      R                  S5        U 4S jT l        UT l         " S S	[        5      nU" 5       T l	        g )
Nsrcar   r   r   r:   h   
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3)
__all__ = ["__version__"]
c                  0   > T R                   R                  $ r   r   r   s   r   r   $MissingTests.setUp.<locals>.<lambda>l   r   r   c                       \ rS rSrSrSrSrg) MissingTests.setUp.<locals>.Dateo   r    r!   r"   Nr#   r"   r   r   r+   rZ   o   r,   r   r+   r-   r6   s   `  r   r7   MissingTests.setUpU   s    t{{}-&!**,[[&&v.44\B
'22	
 	'22	
 /$	6 	 F	r   c                     / nU R                  [        5         [        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        g! , (       d  f       g= f)zS
`incremental.update package --dev` raises and quits if it can't find
the package.
r   NFTr;   )assertRaises
ValueErrorr   r5   r2   rH   rL   s     r   	test_pathMissingTests.test_pathu   sX    
 z*iizz +**s   2A
A!rP   Nr$   r%   r&   r'   r7   r`   r*   r"   r   r   rR   rR   T   s    @r   rR   c                        \ rS rSrS rS rSrg)CreatedUpdateInSrcTests   c                   ^  [        T R                  5       5      T l        T R                  R                  5         T R                  R	                  S5      R                  5         T R                  R	                  S5      R	                  S5      nUR                  5         UR	                  S5      R                  S5        UR	                  S5      R                  S5        U 4S jT l        UT l         " S S	[        5      nU" 5       T l	        g )
Nsrcr   r   r   r:   rV   c                  0   > T R                   R                  $ r   r   r   s   r   r   /CreatedUpdateInSrcTests.setUp.<locals>.<lambda>   r   r   c                       \ rS rSrSrSrSrg)+CreatedUpdateInSrcTests.setUp.<locals>.Date   r    r!   r"   Nr#   r"   r   r   r+   rk      r,   r   r+   r-   r6   s   `  r   r7   CreatedUpdateInSrcTests.setUp   s    t{{}-% ))+[[&&u-33LA
'22	
 	'22	
 /$	6 	 F	r   c                    / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       5        U R                  U R
                  R                  S5      R                  5       S5        [        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       5        U R                  U R
                  R                  S5      R                  5       S5        g)	n
`incremental.update package --path=<path> --dev` increments the dev
version of the package on the given path
r   NFTr;   r:     """
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__"]

r   r5   r2   rH   rI   r3   r0   rG   rJ   rK   rL   s     r   r`   !CreatedUpdateInSrcTests.test_path   s   
 ))KK::	
 	--m<CCEFOO!!-0;;=	
  	))KK::	
 	--m<CCEFOO!!-0;;=	
r   rP   Nrb   r"   r   r   rd   rd      s    @B
r   rd   c                       \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rS rS rSrg)CreatedUpdateTests   Nc                   ^  [        T R                  5       5      T l        T R                  R                  5         T R                  R	                  S5      nUR                  5         UR	                  S5      R                  S5        UR	                  S5      R                  S5        U 4S jT l        UT l         " S S[        5      nU" 5       T l	        g )	Nr   r   r   r:   rV   c                  0   > T R                   R                  $ r   r   r   s   r   r   *CreatedUpdateTests.setUp.<locals>.<lambda>	  r   r   c                       \ rS rSrSrSrSrg)&CreatedUpdateTests.setUp.<locals>.Datei  r    r!   r"   Nr#   r"   r   r   r+   rz     r,   r   r+   r-   r6   s   `  r   r7   CreatedUpdateTests.setUp   s    t{{}-[[&&|4
'22	
 	'22	
 /$	6 	 F	r   c                 ^   / n[        SU R                  R                  SSSSSSU R                  UR                  S9
  U R                  U R                  R                  S5      R                  5       5        U R                  U R                  R                  S5      R                  5       S5        g)ro   r   NFT)	r   r<   r=   r>   r?   r@   rA   rB   rD   r:   rp   )
r   r3   r   r5   rH   rI   r0   rG   rJ   rK   rL   s     r   r`   CreatedUpdateTests.test_path  s    
 %%))::	
 	--m<CCEFOO!!-0;;=	
r   c                 L   / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       5        U R                  U R
                  R                  S5      R                  5       S5        g)z@
`incremental.update package --dev` increments the dev version.
r   NFTr;   r:   rp   rq   rL   s     r   test_devCreatedUpdateTests.test_dev6  s     ))KK::	
 	--m<CCEFOO!!-0;;=	
r   c                 N   / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       S5        U R	                  U R
                  R                  S5      R                  5       S	5        g)
zD
`incremental.update package --patch` increments the patch version.
r   NTFr;   r:     """
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"
r   r5   r2   rH   rJ   r3   r0   rK   rL   s     r   
test_patchCreatedUpdateTests.test_patchZ  s     ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   c                 0   U R                   R                  S5      R                  S5        / n[        SSSSSSSSU R                  U R
                  UR                  S9  U R                  U R                   R                  S5      R                  5       S5        g)	zt
`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__"]
r   NTFr;   r   	r3   r0   r1   r   r5   r2   rH   rJ   rK   rL   s     r   "test_patch_with_prerelease_and_dev5CreatedUpdateTests.test_patch_with_prerelease_and_dev  s    
 	m,77	
 ))KK::	
 	OO!!-0;;=	
r   c                 N   / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       S5        U R	                  U R
                  R                  S5      R                  5       S	5        g)
zj
`incremental.update package --patch --rc` increments the patch
version and makes it a release candidate.
r   NTFr;   r:   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.4rc1"
r   rL   s     r   test_rc_patch CreatedUpdateTests.test_rc_patch  s    
 ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   c                    U R                   R                  S5      R                  S5        / n[        SSSSSSSSU R                  U R
                  UR                  S9  U R                  U R                   R                  S5      R                  5       S5        U R                  U R                   R                  S	5      R                  5       S
5        g)z}
`incremental.update package --rc` increments the rc version if the
existing version is an rc, and discards any dev version.
r:   r   r   NFTr;   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, 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.3rc2"
r   rL   s     r   test_rc_with_existing_rc+CreatedUpdateTests.test_rc_with_existing_rc  s    
 	m,77	
 ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   c                    U R                   R                  S5      R                  S5        / n[        SSSSSSSSU R                  U R
                  UR                  S9  U R                  U R                   R                  S5      R                  5       S5        U R                  U R                   R                  S	5      R                  5       S
5        g)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__"]
r   NFTr;   "  """
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.0rc1"
r   rL   s     r   test_rc_with_no_rc%CreatedUpdateTests.test_rc_with_no_rc  s     	m,77	
 ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   c                    / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       S5        U R	                  U R
                  R                  S5      R                  5       S	5        [        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       S
5        U R	                  U R
                  R                  S5      R                  5       S5        g)z
`incremental.update package`, when the package is a release
candidate, will issue the major/minor, sans release candidate or dev.
r   NFTr;   r:   r   r   r   rE   s   
from incremental import Version
introduced_in = Version("inctestpkg", 16, 8, 0).short()
next_released_version = "inctestpkg 16.8.0"
r   rL   s     r   test_full_with_rc$CreatedUpdateTests.test_full_with_rcF  s5   
 ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
 	))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   c                    / nU R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  WR                  R                  S   S5        g! , (       d  f       N8= f)za
`incremental.update package`, when the package is NOT a release
candidate, will raise an error.
r   NFr;   r   z6You need to issue a rc before updating the major/minor	r^   r_   r   r5   r2   rH   rJ   	exceptionargsr   rM   es      r   test_full_without_rc'CreatedUpdateTests.test_full_without_rc  s    
 z*aiizz + 	KKQD	
 +*s   2A<<
B
c                 L   / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       5        U R                  U R
                  R                  S5      R                  5       S5        g)zB
`incremental.update package --post` increments the post version.
r   NFTr;   r:     """
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__"]
rq   rL   s     r   	test_postCreatedUpdateTests.test_post  s     ))KK::	
 	--m<CCEFOO!!-0;;=	
r   c                 0   U R                   R                  S5      R                  S5        / n[        SSSSSSSSU R                  U R
                  UR                  S9  U R                  U R                   R                  S5      R                  5       S5        g)	zr
`incremental.update package --post` increments the post version, and
disregards any old prerelease/dev versions.
r:   r   r   NFTr;   r   r   rL   s     r   !test_post_with_prerelease_and_dev4CreatedUpdateTests.test_post_with_prerelease_and_dev  s    
 	m,77	
 ))KK::	
 	OO!!-0;;=	
r   c                    U R                   R                  S5      R                  S5        / n[        SSSSSSSSU R                  U R
                  UR                  S9  U R                  U R                   R                  S5      R                  5       S5        U R                  U R                   R                  S	5      R                  5       S
5        g)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__"]
r   NFTr;   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, 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"
r   rL   s     r   test_post_with_existing_post/CreatedUpdateTests.test_post_with_existing_post  s    
 	m,77	
 ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   c                 T   / nU R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  WR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        g! , (       d  f       GN= f! , (       d  f       GN;= f! , (       d  f       N= f! , (       d  f       Nm= f)	zN
The `--newversion` flag can't be mixed with --patch, --rc, --post,
or --dev.
r   N1TFr;   r   zOnly give --newversionr   r   s      r   test_no_mix_newversion)CreatedUpdateTests.test_no_mix_newversion6  s   
 z*aiizz + 	))!,.FGz*aiizz + 	))!,.FGz*aiizz + 	))!,.FGz*aiizz + 	))!,.FG} +*  +*  +*  +*s/   2G$2G62H 2H$
G36
H
H
H'c                 @   / nU R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  WR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        g! , (       d  f       GN)= f! , (       d  f       N= f! , (       d  f       N[= f)z@
The `--dev` flag can't be mixed with --patch, --rc, or --post.
r   NTFr;   r   zOnly give --devr   r   s      r   test_no_mix_dev"CreatedUpdateTests.test_no_mix_dev|  si    z*aiizz + 	))!,.?@z*aiizz + 	))!,.?@z*aiizz + 	))!,.?@] +*  +*  +*s#   2E,2E>2F,
E;>
F
Fc                 h   / nU R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  WR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        U R                  [        5       n[        SSSSSSSSU R                  U R                  UR
                  S9  SSS5        U R                  UR                  R                  S   S5        g! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GNM= f! , (       d  f       N= f! , (       d  f       N= f)	zX
The `--create` flag can't be mixed with --patch, --rc, --post,
--dev, or --newversion.
r   NTFr;   r   zOnly give --creater   r   r   s      r   test_no_mix_create%CreatedUpdateTests.test_no_mix_create  sS   
 z*aiizz + 	))!,.BCz*aiizz + 	))!,.BCz*aiizz + 	))!,.BCz*aiizz + 	))!,.BCz*aiizz + 	))!,.BC] +*  +*  +*  +*  +*s;   2I2I.2J  2J82J#
I+.
I= 
J
J #
J1c                 N   / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       S5        U R	                  U R
                  R                  S5      R                  5       S	5        g)
zf
`incremental.update package --newversion=1.2.3rc1.post2.dev3`, will
set that version in the package.
r   Nz1.2.3rc1.post2.dev3Fr;   r:   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.3rc1.post2.dev3"
r   rL   s     r   test_newversion"CreatedUpdateTests.test_newversion  s    
 ,))KK::	
 	OO!!-0;;=	
  	OO!!-0;;=
	
r   c                 N   / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       S5        U R	                  U R
                  R                  S5      R                  5       S	5        g)
zT
`incremental.update package --newversion=1`, will set that
version in the package.
r   Nr   Fr;   r:   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"
r   rL   s     r   test_newversion_bare'CreatedUpdateTests.test_newversion_bare7  s    
 ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   c                 N   / n[        SSSSSSSSU R                  U R                  UR                  S9  U R	                  U R
                  R                  S5      R                  5       S5        U R	                  U R
                  R                  S5      R                  5       S	5        g)
zV
`incremental.update package --newversion=1.1`, will set that
version in the package.
r   Nz1.1Fr;   r:   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, 1, 0)
__all__ = ["__version__"]
r   s   
from incremental import Version
introduced_in = Version("inctestpkg", 1, 1, 0).short()
next_released_version = "inctestpkg 1.1.0"
r   rL   s     r    test_newversion_bare_major_minor3CreatedUpdateTests.test_newversion_bare_major_minorc  s    
 ))KK::	
 	OO!!-0;;=	
 	OO!!-0;;=	
r   rP   )r$   r%   r&   r'   maxDiffr7   r`   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r*   r"   r   r   rt   rt      s|    G<"
H"
H)
V*
X*
X2
h3
jP
d
4"
H*
X2
hDHL3AjTDl.
`*
X*
r   rt   c                   &    \ rS rSrS rS rS rSrg)ScriptTestsi  c                 <  ^ ^ [        T R                  5       5      T l        T R                  R                  5         T R                  R	                  S5      R                  5         T R                  R	                  S5      R	                  S5      nUR                  5         UR	                  S5      R                  S5        UR	                  S5      R                  S5        U 4S jT l        UT l         " S S	[        5      m " U4S
 jS[        5      nU" 5       T l	        g )Nrg   r   r   r   r:   rV   c                  0   > T R                   R                  $ r   r   r   s   r   r   #ScriptTests.setUp.<locals>.<lambda>  r   r   c                       \ rS rSrSrSrSrg)ScriptTests.setUp.<locals>.Datei  r    r!   r"   Nr#   r"   r   r   r+   r     r,   r   r+   c                   "   > \ rS rSrU 4S jrSrg)%ScriptTests.setUp.<locals>.DateModulei  c                    > T" 5       $ r   r"   )r   r+   s    r   today+ScriptTests.setUp.<locals>.DateModule.today  s
    vr   r"   N)r$   r%   r&   r'   r   r*   )r+   s   r   
DateModuler     s     r   r   r-   )r   r3   r   r+   s   `  @r   r7   ScriptTests.setUp  s    t{{}-% ))+[[&&u-33LA
'22	
 	'22	
 /$	6 		 	 L	r   c                 N   [        5       nU R                  [        SU5        U R                  [        5       n[        S/5        SSS5        U R                  WR                  R                  S   S5        U R                  SUR                  5       5        g! , (       d  f       NX= f)9
Calling run() with no args will cause it to print help.
stdoutz--helpNr   zShow this message and exit)r   r=   sysr^   
SystemExitr	   rJ   r   r   assertIngetvaluer   stringior   s      r   test_runScriptTests.test_run  s|     "#

3(+z*a
O + 	))!,a02H4E4E4GH	 +*s   B
B$c                    [        5       nU R                  [        SU5        U R                  [        SU R                  5        U R                  [
        SU R                  5        U R                  [        5       n[        SS/5        SSS5        U R                  WR                  R                  S   S5        U R                  SUR                  5       5        U R                  U R                  R!                  S	5      R#                  5       S
5        U R                  U R                  R!                  S5      R#                  5       S5        g! , (       d  f       N= f)r   r   r2   r5   r   z--rcNr   zUpdating codebaser:   r   r   r   )r   r=   r   osr2   datetimer5   r^   r   r	   rJ   r   r   r   r   r3   r0   rK   r   s      r   test_insufficient_args"ScriptTests.test_insufficient_args  s    "#

3(+

2x-

8VTYY/z*av&' + 	))!,a0)8+<+<+>?OO!!-0;;=	
 	OO!!-0;;=	
+ +*s   9E
ErP   N)r$   r%   r&   r'   r7   r   r   r*   r"   r   r   r   r     s    "!HI%
r   r   )__doc__
__future__r   r   r   r   r   twisted.python.filepathr   twisted.python.compatr   twisted.trial.unittestr   incremental.updater   r	   r   rR   rd   rt   r   r"   r   r   <module>r      sj    1 
 	  , 0 + (<
H <
~48 4nc
h c
L\
 \
~W
( W
r   