
    Sf                         d Z ddlmZmZ ddlZddlZddlZddlmZ ddl	m
Z
 ddlmZ ddlmZmZ  G d d	e          Z G d
 de          Z G d de          Z G d de          Z G d de          ZdS )z"
Tests for L{incremental.update}.
    )divisionabsolute_importN)FilePath)NativeStringIO)TestCase)_runrunc                       e Zd Zd Zd ZdS )NonCreatedUpdateTestsc                     t                                                      _         j                                          j                            d          }|                                 |                    d                              d            fd _        | _         G d dt                    } |             _	        d S )N
inctestpkg__init__.py   
from incremental import Version
introduced_in = Version("inctestpkg", "NEXT", 0, 0).short()
next_released_version = "inctestpkg NEXT"
c                       j         j        S Nsrcdirpathselfs   O/var/www/html/env/lib/python3.11/site-packages/incremental/tests/test_update.py<lambda>z-NonCreatedUpdateTests.setUp.<locals>.<lambda>$       dk.     c                       e Zd ZdZdZdS ))NonCreatedUpdateTests.setUp.<locals>.Date     N__name__
__module____qualname__yearmonth r   r   Dater   '           DEEEr   r&   
r   mktempr   makedirschild
setContentgetcwd
packagedirobjectdater   r.   r&   s   `  r   setUpzNonCreatedUpdateTests.setUp   s    t{{}}--[&&|44
''22	
 	
 	
 /...$	 	 	 	 	6 	 	 	 DFF			r   c                    |                      | j                            d                                                     g }t	          dddddddd| j        | j        |j                   |                     | j                            d                                                     | 	                    | j                            d          
                                d           dS )zP
        `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__"]
)assertFalser.   r+   existsr   r0   r-   append
assertTrueassertEqual
getContentr   outs     r   test_createz!NonCreatedUpdateTests.test_create-   s     	..}==DDFFGGG)K:	
 	
 	
 	
 	--m<<CCEEFFFO!!-00;;==	
 	
 	
 	
 	
r   N)r    r!   r"   r2   rH   r%   r   r   r   r      s2          .$
 $
 $
 $
 $
r   r   c                       e Zd Zd Zd ZdS )MissingTestsc                 f    t                                                      _         j                                          j                            d                                            j                            d                              d          }|                                 |                    d                              d           |                    d                              d            fd _        | _         G d d	t                    } |             _	        d S )
Nsrcar   r   r   r4   h   
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3)
__all__ = ["__version__"]
c                       j         j        S r   r   r   s   r   r   z$MissingTests.setUp.<locals>.<lambda>l   r   r   c                       e Zd ZdZdZdS ) MissingTests.setUp.<locals>.Dater   r   Nr   r%   r   r   r&   rP   o   r'   r   r&   r(   r1   s   `  r   r2   zMissingTests.setUpU   s3   t{{}}--&!!**,,,[&&v..44\BB
''22	
 	
 	
 	''22	
 	
 	
 /...$	 	 	 	 	6 	 	 	 DFF			r   c                     g }|                      t                    5  t          dddddddd| j        | j        |j                   ddd           dS # 1 swxY w Y   dS )zk
        `incremental.update package --dev` raises and quits if it can't find
        the package.
        r   NFTr5   )assertRaises
ValueErrorr   r0   r-   rB   rF   s     r   	test_pathzMissingTests.test_pathu   s    
 z** 	 	iz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   *AAANr    r!   r"   r2   rT   r%   r   r   rJ   rJ   T   s3          @    r   rJ   c                       e Zd Zd Zd ZdS )CreatedUpdateInSrcTestsc                 f    t                                                      _         j                                          j                            d                                            j                            d                              d          }|                                 |                    d                              d           |                    d                              d            fd _        | _         G d d	t                    } |             _	        d S )
Nsrcr   r   r   r4   rM   c                       j         j        S r   r   r   s   r   r   z/CreatedUpdateInSrcTests.setUp.<locals>.<lambda>   r   r   c                       e Zd ZdZdZdS )+CreatedUpdateInSrcTests.setUp.<locals>.Dater   r   Nr   r%   r   r   r&   r\      r'   r   r&   r(   r1   s   `  r   r2   zCreatedUpdateInSrcTests.setUp   s3   t{{}}--%  ))+++[&&u--33LAA
''22	
 	
 	
 	''22	
 	
 	
 /...$	 	 	 	 	6 	 	 	 DFF			r   c                    g }t          dddddddd| j        | j        |j                   |                     | j                            d                                                     |                     | j                            d          	                                d           t          dddddddd| j        | j        |j                   |                     | j                            d                                                     |                     | j                            d          	                                d           dS )	
        `incremental.update package --path=<path> --dev` increments the dev
        version of the package on the given path
        r   NFTr5   r4     """
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   r0   r-   rB   rC   r.   r+   rA   rD   rE   rF   s     r   rT   z!CreatedUpdateInSrcTests.test_path   si   
 )K:	
 	
 	
 	
 	--m<<CCEEFFFO!!-00;;==	
 	
 	
  	)K:	
 	
 	
 	
 	--m<<CCEEFFFO!!-00;;==	
 	
 	
 	
 	
r   NrU   r%   r   r   rW   rW      s8          @B
 B
 B
 B
 B
r   rW   c                       e 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 Zd Zd Zd Zd Zd ZdS )CreatedUpdateTestsNc                     t                                                      _         j                                          j                            d          }|                                 |                    d                              d           |                    d                              d            fd _        | _         G d dt                    } |             _	        d S )	Nr   r   r   r4   rM   c                       j         j        S r   r   r   s   r   r   z*CreatedUpdateTests.setUp.<locals>.<lambda>	  r   r   c                       e Zd ZdZdZdS )&CreatedUpdateTests.setUp.<locals>.Dater   r   Nr   r%   r   r   r&   rf     r'   r   r&   r(   r1   s   `  r   r2   zCreatedUpdateTests.setUp   s   t{{}}--[&&|44
''22	
 	
 	
 	''22	
 	
 	
 /...$	 	 	 	 	6 	 	 	 DFF			r   c                 b   g }t          d| j        j        dddddd| j        |j        
  
         |                     | j                            d                                                     |                     | j                            d          	                                d           dS )r^   r   NFT)	r   r6   r7   r8   r9   r:   r;   r<   r>   r4   r_   )
r   r.   r   r0   rB   rC   r+   rA   rD   rE   rF   s     r   rT   zCreatedUpdateTests.test_path  s    
 %):	
 	
 	
 	
 	--m<<CCEEFFFO!!-00;;==	
 	
 	
 	
 	
r   c                 Z   g }t          dddddddd| j        | j        |j                   |                     | j                            d                                                     |                     | j                            d          	                                d           dS )zP
        `incremental.update package --dev` increments the dev version.
        r   NFTr5   r4   r_   r`   rF   s     r   test_devzCreatedUpdateTests.test_dev6  s     )K:	
 	
 	
 	
 	--m<<CCEEFFFO!!-00;;==	
 	
 	
 	
 	
r   c                 \   g }t          dddddddd| j        | j        |j                   |                     | j                            d                                          d           |                     | j                            d                                          d	           dS )
zT
        `incremental.update package --patch` increments the patch version.
        r   NTFr5   r4     """
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   r0   r-   rB   rD   r.   r+   rE   rF   s     r   
test_patchzCreatedUpdateTests.test_patchZ  s     )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                 6   | j                             d                              d           g }t          dddddddd| j        | j        |j                   |                     | j                             d                                          d           dS )	z
        `incremental.update package --patch` increments the patch version, and
        disregards any old prerelease/dev versions.
        r4      
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3, release_candidate=1, dev=2)
__all__ = ["__version__"]
r   NTFr5   rk   	r.   r+   r,   r   r0   r-   rB   rD   rE   rF   s     r   "test_patch_with_prerelease_and_devz5CreatedUpdateTests.test_patch_with_prerelease_and_dev  s    
 	m,,77	
 	
 	
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                 \   g }t          dddddddd| j        | j        |j                   |                     | j                            d                                          d           |                     | j                            d                                          d	           dS )
z
        `incremental.update package --patch --rc` increments the patch
        version and makes it a release candidate.
        r   NTFr5   r4   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"
rl   rF   s     r   test_rc_patchz CreatedUpdateTests.test_rc_patch  s    
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                    | j                             d                              d           g }t          dddddddd| j        | j        |j                   |                     | j                             d                                          d           |                     | j                             d	                                          d
           dS )z
        `incremental.update package --rc` increments the rc version if the
        existing version is an rc, and discards any dev version.
        r4   ro   r   NFTr5   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"
rp   rF   s     r   test_rc_with_existing_rcz+CreatedUpdateTests.test_rc_with_existing_rc  s    
 	m,,77	
 	
 	
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                    | j                             d                              d           g }t          dddddddd| j        | j        |j                   |                     | j                             d                                          d           |                     | j                             d	                                          d
           dS )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.
        r4   so   
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3, dev=2)
__all__ = ["__version__"]
r   NFTr5   "  """
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"
rp   rF   s     r   test_rc_with_no_rcz%CreatedUpdateTests.test_rc_with_no_rc  s     	m,,77	
 	
 	
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                    g }t          dddddddd| j        | j        |j                   |                     | j                            d                                          d           |                     | j                            d                                          d	           t          dddddddd| j        | j        |j                   |                     | j                            d                                          d
           |                     | j                            d                                          d           dS )z
        `incremental.update package`, when the package is a release
        candidate, will issue the major/minor, sans release candidate or dev.
        r   NFTr5   r4   rw   r   rx   r?   s   
from incremental import Version
introduced_in = Version("inctestpkg", 16, 8, 0).short()
next_released_version = "inctestpkg 16.8.0"
rl   rF   s     r   test_full_with_rcz$CreatedUpdateTests.test_full_with_rcF  s   
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	)K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                    g }|                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           dS )zy
        `incremental.update package`, when the package is NOT a release
        candidate, will raise an error.
        r   NFr5   r   z6You need to issue a rc before updating the major/minor	rR   rS   r   r0   r-   rB   rD   	exceptionargsr   rG   es      r   test_full_without_rcz'CreatedUpdateTests.test_full_without_rc  s    
 z** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	KQD	
 	
 	
 	
 	
s   *AAAc                 Z   g }t          dddddddd| j        | j        |j                   |                     | j                            d                                                     |                     | j                            d          	                                d           dS )zR
        `incremental.update package --post` increments the post version.
        r   NFTr5   r4     """
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__"]
r`   rF   s     r   	test_postzCreatedUpdateTests.test_post  s     )K:	
 	
 	
 	
 	--m<<CCEEFFFO!!-00;;==	
 	
 	
 	
 	
r   c                 6   | j                             d                              d           g }t          dddddddd| j        | j        |j                   |                     | j                             d                                          d           dS )	z
        `incremental.update package --post` increments the post version, and
        disregards any old prerelease/dev versions.
        r4   ro   r   NFTr5   r   rp   rF   s     r   !test_post_with_prerelease_and_devz4CreatedUpdateTests.test_post_with_prerelease_and_dev  s    
 	m,,77	
 	
 	
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                    | j                             d                              d           g }t          dddddddd| j        | j        |j                   |                     | j                             d                                          d           |                     | j                             d	                                          d
           dS )z
        `incremental.update package --post` increments the post version if the
        existing version is an postrelease, and discards any dev version.
        r4   sw   
from incremental import Version
__version__ = Version("inctestpkg", 1, 2, 3, post=1, dev=2)
__all__ = ["__version__"]
r   NFTr5   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"
rp   rF   s     r   test_post_with_existing_postz/CreatedUpdateTests.test_post_with_existing_post  s    
 	m,,77	
 	
 	
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                    g }|                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           dS )	zf
        The `--newversion` flag can't be mixed with --patch, --rc, --post,
        or --dev.
        r   N1TFr5   r   zOnly give --newversionr}   r   s      r   test_no_mix_newversionz)CreatedUpdateTests.test_no_mix_newversion6  s+   
 z** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.FGGGz** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.FGGGz** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.FGGGz** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.FGGGGGsG   *AAA*CCC*EEE *GGGc                    g }|                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           dS )zP
        The `--dev` flag can't be mixed with --patch, --rc, or --post.
        r   NTFr5   r   zOnly give --devr}   r   s      r   test_no_mix_devz"CreatedUpdateTests.test_no_mix_dev|  sd    z** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.?@@@z** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.?@@@z** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.?@@@@@s5   *AAA*CCC*EEEc                    g }|                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           |                      t                    5 }t          dddddddd| j        | j        |j                   ddd           n# 1 swxY w Y   |                     |j        j        d         d           dS )	zp
        The `--create` flag can't be mixed with --patch, --rc, --post,
        --dev, or --newversion.
        r   NTFr5   r   zOnly give --creater   r}   r   s      r   test_no_mix_createz%CreatedUpdateTests.test_no_mix_create  s   
 z** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.BCCCz** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.BCCCz** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.BCCCz** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.BCCCz** 	aiz   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,.BCCCCCsY   *AAA*CCC*EEE *GGG!*IIIc                 \   g }t          dddddddd| j        | j        |j                   |                     | j                            d                                          d           |                     | j                            d                                          d	           dS )
z~
        `incremental.update package --newversion=1.2.3rc1.post2.dev3`, will
        set that version in the package.
        r   Nz1.2.3rc1.post2.dev3Fr5   r4   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"
rl   rF   s     r   test_newversionz"CreatedUpdateTests.test_newversion  s    
 ,)K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
  	O!!-00;;==
	
 
	
 
	
 
	
 
	
r   c                 \   g }t          dddddddd| j        | j        |j                   |                     | j                            d                                          d           |                     | j                            d                                          d	           dS )
zl
        `incremental.update package --newversion=1`, will set that
        version in the package.
        r   Nr   Fr5   r4   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"
rl   rF   s     r   test_newversion_barez'CreatedUpdateTests.test_newversion_bare7  s    
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   c                 \   g }t          dddddddd| j        | j        |j                   |                     | j                            d                                          d           |                     | j                            d                                          d	           dS )
zn
        `incremental.update package --newversion=1.1`, will set that
        version in the package.
        r   Nz1.1Fr5   r4   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"
rl   rF   s     r    test_newversion_bare_major_minorz3CreatedUpdateTests.test_newversion_bare_major_minorc  s    
 )K:	
 	
 	
 	
 	O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
r   )r    r!   r"   maxDiffr2   rT   ri   rm   rq   rs   ru   ry   r{   r   r   r   r   r   r   r   r   r   r   r%   r   r   rb   rb      sX       G  <"
 "
 "
H"
 "
 "
H)
 )
 )
V*
 *
 *
X*
 *
 *
X2
 2
 2
h3
 3
 3
jP
 P
 P
d
 
 
4"
 "
 "
H*
 *
 *
X2
 2
 2
hDH DH DHL3A 3A 3AjTD TD TDl.
 .
 .
`*
 *
 *
X*
 *
 *
 *
 *
r   rb   c                        e Zd Zd Zd Zd ZdS )ScriptTestsc                     t                                                      _         j                                          j                            d                                            j                            d                              d          }|                                 |                    d                              d           |                    d                              d            fd _        | _         G d d	t                     G fd
dt                    } |             _	        d S )NrY   r   r   r   r4   rM   c                       j         j        S r   r   r   s   r   r   z#ScriptTests.setUp.<locals>.<lambda>  r   r   c                       e Zd ZdZdZdS )ScriptTests.setUp.<locals>.Dater   r   Nr   r%   r   r   r&   r     r'   r   r&   c                       e Zd Z fdZdS )%ScriptTests.setUp.<locals>.DateModulec                                  S r   r%   )r   r&   s    r   todayz+ScriptTests.setUp.<locals>.DateModule.today  s    tvvr   N)r    r!   r"   r   )r&   s   r   
DateModuler     s.              r   r   r(   )r   r.   r   r&   s   `  @r   r2   zScriptTests.setUp  sh   t{{}}--%  ))+++[&&u--33LAA
''22	
 	
 	
 	''22	
 	
 	
 /...$	 	 	 	 	6 	 	 		 	 	 	 	 	 	 	 	 	 JLL			r   c                 z   t                      }|                     t          d|           |                     t                    5 }t          dg           ddd           n# 1 swxY w Y   |                     |j        j        d         d           | 	                    d|
                                           dS )I
        Calling run() with no args will cause it to print help.
        stdoutz--helpNr   zShow this message and exit)r   r7   sysrR   
SystemExitr	   rD   r~   r   assertIngetvaluer   stringior   s      r   test_runzScriptTests.test_run  s     "##

3(+++z** 	a
OOO	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	)!,a0002H4E4E4G4GHHHHHs   A""A&)A&c                     t                      }|                     t          d|           |                     t          d| j                   |                     t
          d| j                   |                     t                    5 }t          ddg           ddd           n# 1 swxY w Y   | 
                    |j        j        d         d           |                     d|                                           | 
                    | j                            d	                                          d
           | 
                    | j                            d                                          d           dS )r   r   r-   r0   r   z--rcNr   zUpdating codebaser4   rw   r   rx   )r   r7   r   osr-   datetimer0   rR   r   r	   rD   r~   r   r   r   r.   r+   rE   r   s      r   test_insufficient_argsz"ScriptTests.test_insufficient_args  s    "##

3(+++

2x---

8VTY///z** 	(av&'''	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	)!,a000)8+<+<+>+>???O!!-00;;==	
 	
 	
 	O!!-00;;==	
 	
 	
 	
 	
s   B%%B),B)N)r    r!   r"   r2   r   r   r%   r   r   r   r     sE        "! "! "!HI I I%
 %
 %
 %
 %
r   r   )__doc__
__future__r   r   r   r   r   twisted.python.filepathr   twisted.python.compatr   twisted.trial.unittestr   incremental.updater   r	   r   rJ   rW   rb   r   r%   r   r   <module>r      s    1 0 0 0 0 0 0 0 



 				  , , , , , , 0 0 0 0 0 0 + + + + + + ( ( ( ( ( ( ( (<
 <
 <
 <
 <
H <
 <
 <
~4 4 4 4 48 4 4 4nc
 c
 c
 c
 c
h c
 c
 c
L\
 \
 \
 \
 \
 \
 \
 \
~W
 W
 W
 W
 W
( W
 W
 W
 W
 W
r   