
    -Ph-                     J    d dl mZ ddlmZmZ ddlmZ  G d de          ZdS )	    )TestCase   )render_fragmentssplit_fragments   )read_pkg_resourcec                   6    e Zd ZdZd Zd Zd Zd Zd Zd Z	dS )FormatterTestsNc                     dddddddddd}ddd	gidd
dgiddgidddgiddgidd}dddddddddd}t          ||          }|                     ||           d S )N 
Foo added.zFoo added.    
)1miscr   )bazr   r   2featurer   )5r   r   )6bugfixr   zWeb fixed.    )3r   r   4r   r   )r   Webr   r   r   r   r   )r   r   r   
Web fixed.r   r   )r   r   FeaturesTnameshowcontentBugfixesMiscFr   r   r   )r   assertEqual)self	fragmentsexpected_outputdefinitionsoutputs        Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/towncrier/test/test_format.py
test_splitzFormatterTests.test_split   s     #%$&%1%7$0  %5%1 
 
	  c5\*(3*5'#/  (#/(3%0 

 

 !+4@@)$??#E::
 
 !K88&11111    c                 V   dddddddddd	i ddid}d	d
ddd
ddddd}d}t          d          }t          ||          }t          |d||ddgd
dddd          }|                     ||           d}t          |d||ddgd
dddd          }|                     ||           dS )z
        Basic functionality -- getting a bunch of news fragments and formatting
        them into a rST file -- works.
        r   Stuff!r   Fun!)	142r   r   r   9r   r   barr   r   r   r   72r   r   r4   r   r   r   r   r   r   r   r   Namesr   r   Tr   r"   r#   Fr$   zMyProject 1.0 (never)
=====================

Features
--------

- Fun! (baz)
- Foo added. (#2, #9, #72)
- Stuff! (#4)


Misc
----

- bar, #1, #9, #142


Names
-----

No significant changes.


Web
---

Bugfixes
~~~~~~~~

- Web fixed. (#3)


templates/default.rstN-~	MyProject1.0neverr    versiondatewrapversiondatazMyProject 1.0 (never)
=====================

Features
********

- Fun! (baz)
- Foo added. (#2, #9, #72)
- Stuff! (#4)


Misc
****

- bar, #1, #9, #142


Names
*****

No significant changes.


Web
***

Bugfixes
^^^^^^^^

- Web fixed. (#3)


*^r   r   r   r%   )r&   r'   r)   r(   templater*    expected_output_weird_underliness          r+   
test_basiczFormatterTests.test_basic3   sH    %'"$"$$&%-%1&2%1'-  &5
 
	& !+4@@)$??#E::
 
 D %%<==#I{;;	!#J!,PP
 
 
 	111 ,(D "#J!,PP
 
 
 	!ABBBBBr-   c                 Z   ddddddddddd
i ddd	d
}dddddddddd}d}t          d          }t          ||          }t          |d||ddgddddd          }|                     ||           d}t          |d||ddgddddd          }|                     ||           dS )z?
        Check formating of default markdown template.
        r   r/   r   zMulti-line
herer0   )
r1   r   r3   r5   r   r   r7   r9   r   r   r   r:   r   z Multi-line bulleted
- fix
- here)r   )r   r   r   r;   r   Tr   r"   r#   Fr$   a  # MyProject 1.0 (never)

### Features

- Fun! (baz)
- Foo added. (#2, #9, #72)
- Multi-line
  here (#3)
- Stuff! (#4)

### Misc

- bar, #1, #9, #142


## Names

No significant changes.


## Web

### Bugfixes

- Multi-line bulleted
  - fix
  - here

  (#2)
- Web fixed. (#3)


ztemplates/default.mdNr>   r?   r@   rA   rB   rC   rF   a  # MyProject 1.0 (never)

### Features

- Fun! ([baz])
- Foo added. ([2], [9], [72])
- Multi-line
  here ([3])
- Stuff! ([4])

[baz]: https://github.com/twisted/towncrier/issues/baz
[2]: https://github.com/twisted/towncrier/issues/2
[3]: https://github.com/twisted/towncrier/issues/3
[4]: https://github.com/twisted/towncrier/issues/4
[9]: https://github.com/twisted/towncrier/issues/9
[72]: https://github.com/twisted/towncrier/issues/72

### Misc

- [bar], [1], [9], [142]

[bar]: https://github.com/twisted/towncrier/issues/bar
[1]: https://github.com/twisted/towncrier/issues/1
[9]: https://github.com/twisted/towncrier/issues/9
[142]: https://github.com/twisted/towncrier/issues/142


## Names

No significant changes.


## Web

### Bugfixes

- Multi-line bulleted
  - fix
  - here

  ([2])
- Web fixed. ([3])

[2]: https://github.com/twisted/towncrier/issues/2
[3]: https://github.com/twisted/towncrier/issues/3


z>[{issue}]: https://github.com/twisted/towncrier/issues/{issue}rK   r&   r'   r)   r(   rL   r*   s         r+   test_markdownzFormatterTests.test_markdown   sQ    %'"$"$$&%-%1&2%1%7'-  $0$H !
 
	. !+4@@)$??#E::
 
 D %%;<<#I{;;	!#J!,PP
 
 
 	111/b "L#J!,PP
 
 
 	11111r-   c                     ddddddi}ddddi}d}t          d          }t          ||          }t          |d	||d
dgddddd          }|                     ||           dS )z
        issue_format option can be used to format issue text.
        And sorting happens before formatting, so numerical issues are still
        ordered numerically even if that doesn't match asciibetical order on
        the final text.
        r   )r1   r   r3   r5   r   r#   Fr   zSMyProject 1.0 (never)
=====================

Misc
----

- xxbar, xx1, xx9, xx142


r=   z	xx{issue}r>   r?   Tr@   rA   rB   rC   rF   NrK   rQ   s         r+   test_issue_formatz FormatterTests.test_issue_format<  s      %'"$"$$& 	
	 uEEF	 %%<==#I{;;	!#J!,PP
 
 
 	11111r-   c                     d| _         dddddi}ddd	d
i}d}t          d          }t          ||          }t          |d||ddgd	dddd          }|                     ||           dS )zg
        Output is nicely wrapped, but doesn't break up words (which can mess
        up URLs)
        Nr   
                asdf asdf asdf asdf looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong newsfragment.
                zhttps://google.com/q=?----------------------------------------------------------------------------------------------------a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a )r   r   r   r   rP   r   r   Tr   a  MyProject 1.0 (never)
=====================

Features
--------

- asdf asdf asdf asdf
  looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
  newsfragment. (#1)
-
  https://google.com/q=?----------------------------------------------------------------------------------------------------
  (#2)
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
  a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
  a a (#3)


r=   r>   r?   r@   rA   rB   rC   rF   maxDiffr   r   r   r%   rQ   s         r+   test_line_wrappingz!FormatterTests.test_line_wrappingi  s    
  
 &J%.
 

	 !:d"K"KL& %%<==#I{;;	!#J!,PP
 
 
 	11111r-   c                     d| _         dddddi}ddd	d
i}d}t          d          }t          ||          }t          |d||ddgddddd          }|                     ||           dS )z9
        Output is not wrapped if it's disabled.
        Nr   rV   rW   rX   rY   r   r   Tr   a  MyProject 1.0 (never)
=====================

Features
--------

- asdf asdf asdf asdf looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong newsfragment. (#1)
- https://google.com/q=?---------------------------------------------------------------------------------------------------- (#2)
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a (#3)


r=   r>   r?   Fr@   rA   rB   rC   rF   rZ   rQ   s         r+   test_line_wrapping_disabledz*FormatterTests.test_line_wrapping_disabled  s      
 &J%.
 

	 !:d"K"KL %%<==#I{;;	!#J!,PP
 
 
 	11111r-   )
__name__
__module____qualname__r[   r,   rN   rR   rT   r\   r^    r-   r+   r
   r
      s        G#2 #2 #2JyC yC yCvL2 L2 L2\+2 +2 +2Z62 62 62p/2 /2 /2 /2 /2r-   r
   N)twisted.trial.unittestr   _builderr   r   helpersr   r
   rb   r-   r+   <module>rf      s   
 , + + + + + 8 8 8 8 8 8 8 8 & & & & & &E2 E2 E2 E2 E2X E2 E2 E2 E2 E2r-   