
    h                     D    S r SSKrSSKrSSKJrJrJrJr   " S S5      rg)a]  
http://yaml.org/type/timestamp.html specifies the regexp to use
for datetime.date and datetime.datetime construction. Date is simple
but datetime can have 'T' or 't' as well as 'Z' or a timezone offset (in
hours and minutes). This information was originally used to create
a UTC datetime and then discarded

examples from the above:

canonical:        2001-12-15T02:59:43.1Z
valid iso8601:    2001-12-14t21:59:43.10-05:00
space separated:  2001-12-14 21:59:43.10 -5
no time zone (Z): 2001-12-15 2:59:43.10
date (00:00:00Z): 2002-12-14

Please note that a fraction can only be included if not equal to 0

    N   )
round_tripdedentround_trip_loadround_trip_dumpc                   h    \ 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)TestDateTime   c                 "    SnSn[        X5        g )Nz
        - 2011-10-02
        r   selfinpexps      _/home/james-whalen/.local/lib/python3.13/site-packages/srsly/tests/ruamel_yaml/test_datetime.pytest_date_onlyTestDateTime.test_date_only        	3    c                 "    SnSn[        X5        g )Nz)
        - 2011-10-02 16:45:00.0
        '
        - 2011-10-02 16:45:00
        r   r   s      r   test_zero_fractionTestDateTime.test_zero_fraction&   r   r   c                 "    SnSn[        X5        g )Na  
        - 2011-10-02 16:45:00.1234      # expand with zeros
        - 2011-10-02 16:45:00.123456
        - 2011-10-02 16:45:00.12345612  # round to microseconds
        - 2011-10-02 16:45:00.1234565   # round up
        - 2011-10-02 16:45:00.12345678  # round up
        a  
        - 2011-10-02 16:45:00.123400    # expand with zeros
        - 2011-10-02 16:45:00.123456
        - 2011-10-02 16:45:00.123456    # round to microseconds
        - 2011-10-02 16:45:00.123457    # round up
        - 2011-10-02 16:45:00.123457    # round up
        r   r   s      r   test_long_fractionTestDateTime.test_long_fraction/   s     	3r   c                 "    SnSn[        X5        g )Nz*
        - 2011-10-02T16:45:00.1Z
        z/
        - 2011-10-02T16:45:00.100000Z
        r   r   s      r   test_canonicalTestDateTime.test_canonical@   r   r   c                 "    SnSn[        X5        g )Nz*
        - 2011-10-02T11:45:00 -5
        z)
        - 2011-10-02T11:45:00-5
        r   r   s      r   test_spaced_timezone!TestDateTime.test_spaced_timezoneI   r   r   c                     [        S5        g )Nz
        - 2011-10-02T11:45:00-5
        - 2011-10-02 11:45:00-5
        - 2011-10-02T11:45:00-05:00
        - 2011-10-02 11:45:00-05:00
        r   r   s    r   test_normal_timezone!TestDateTime.test_normal_timezoneR   s    	
r   c                 "    SnSn[        X5        g )Nz&
        - 2011-10-02 6:45:00
        z'
        - 2011-10-02 06:45:00
        r   r   s      r   test_no_timezoneTestDateTime.test_no_timezone\   r   r   c                 "    SnSn[        X5        g )N'
        - 2011-10-02T16:45:00
        r   r   s      r   test_explicit_TTestDateTime.test_explicit_Te   r   r   c                 "    SnSn[        X5        g )Nz'
        - 2011-10-02t16:45:00
        r+   r   r   s      r   test_explicit_tTestDateTime.test_explicit_tn   r   r   c                 "    SnSn[        X5        g )Nz)
        - 2011-10-02   16:45:00
        r   r   r   s      r   test_no_T_multi_space"TestDateTime.test_no_T_multi_spacew   r   r   c                     [        S5        g )Nz-
        - 2011-10-02T15:45:00+01:00
        r   r$   s    r   test_isoTestDateTime.test_iso       	
r   c                     [        S5        g )Nz)
        - 2011-10-02T15:45:00+0
        r   r$   s    r   test_zero_tzTestDateTime.test_zero_tz   r7   r   c                     [        S5        g )Nz*
        dt: 2016-08-19T22:45:47Z
        r   r$   s    r   test_issue_45TestDateTime.test_issue_45   r7   r   c                 z    [        S5      n[        R                  " [        U5      5      n[	        U5      U:X  d   eg )Nz)        foo: 2016-10-12T12:34:56
        )r   copydeepcopyr   r   )r   xdatas      r   test_deepcopy_datestring%TestDateTime.test_deepcopy_datestring   s9    

 }}_Q/0t$)))r    N)__name__
__module____qualname____firstlineno__r   r   r   r   r!   r%   r(   r,   r/   r2   r5   r9   r<   rC   __static_attributes__rE   r   r   r	   r	      sH    "



*r   r	   )	__doc__r?   pytest	roundtripr   r   r   r   r	   rE   r   r   <module>rN      s$   &   K KA* A*r   