
    X-Ph                    ~    d dl mZ d dlZd dlmZmZ d dlmZ d dlm	Z	m
Z
  G d de          Z G d d	e          ZdS )
    )annotationsN)TestCasemockparse_location)_generate_junit_contentsget_terminal_widthc                      e Zd ZddZddZdS )TestGetTerminalSizereturnNonec                   t          j        d          }t           j                                        }|                    dd            t
          j                            t           d|          5  t
          j                            t           j        |d          5  t                      dk    sJ 	 d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )N)r   r   COLUMNSget_terminal_size)return_valueT)valuesclearP   )
osterminal_sizeenvironcopypopr   patchobjectdictr	   )selfretmock_environs      R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mypy/test/testutil.py,test_get_terminal_size_in_pty_defaults_to_80z@TestGetTerminalSize.test_get_terminal_size_in_pty_defaults_to_80   sF   v&&z((D)))Zr#6SII 	2 	2LMM 2 2)++r111112 2 2 2 2 2 2 2 2 2 2 2 2 2 2	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2s6   0-CB?3C?C	CC	CCCc                j    t          d          dddgfk    sJ t          d          dg dfk    sJ d S )NzC:\test.py:1:1z
C:\test.py   zC:\test.py:1:1:1:1)r#   r#   r#   r#   r   )r   s    r    test_parse_location_windowsz/TestGetTerminalSize.test_parse_location_windows   sN    /00]QF4KKKKK3448UUUUUUU    Nr   r   )__name__
__module____qualname__r!   r$    r%   r    r   r   
   sB        2 2 2 2V V V V V Vr%   r   c                  .    e Zd ZddZddZddZddZdS )	TestWriteJunitXmlr   r   c                J    d}i }d}t          d||dd          }||k    sJ d S )NFz<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="mypy" skips="0" tests="1" time="1.230">
  <testcase classname="mypy" file="mypy" line="1" name="mypy-py3.14-test-plat" time="1.230">
  </testcase>
</testsuite>
Gz?3.14	test-platdtseriousmessages_by_fileversionplatformr   r   r3   r4   expectedresults        r    test_junit_passz!TestWriteJunitXml.test_junit_pass   sR    8: *- 
 
 
 !!!!!!r%   c                R    d}dddgi}d}t          d||dd	          }||k    sJ d S )
NFfile1.pyTest failedzanother line < > &a^  <?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="1" name="mypy" skips="0" tests="1" time="1.230">
  <testcase classname="mypy" file="file1.py" line="1" name="mypy-py3.14-test-plat file1.py" time="1.230">
    <failure message="mypy produced messages">Test failed
another line &lt; &gt; &amp;</failure>
  </testcase>
</testsuite>
r.   r/   r0   r1   r7   r8   s        r     test_junit_fail_escape_xml_charsz2TestWriteJunitXml.test_junit_fail_escape_xml_chars,   s_    (<=9
 *- 
 
 
 !!!!!!r%   c                X    d}ddgddgd}d}t          d||d	d
          }||k    sJ d S )NFr>   zanother linezAnother failurezline 2)r=   zfile2.pya  <?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="2" name="mypy" skips="0" tests="2" time="1.230">
  <testcase classname="mypy" file="file1.py" line="1" name="mypy-py3.14-test-plat file1.py" time="1.230">
    <failure message="mypy produced messages">Test failed
another line</failure>
  </testcase>
  <testcase classname="mypy" file="file2.py" line="1" name="mypy-py3.14-test-plat file2.py" time="1.230">
    <failure message="mypy produced messages">Another failure
line 2</failure>
  </testcase>
</testsuite>
r.   r/   r0   r1   r7   r8   s        r    test_junit_fail_two_filesz+TestWriteJunitXml.test_junit_fail_two_filesB   si    &7*H59
 9
 *- 
 
 
 !!!!!!r%   c                R    d}d ddgi}d}t          d||dd          }||k    sJ d S )	NTzError line 1zError line 2aB  <?xml version="1.0" encoding="utf-8"?>
<testsuite errors="1" failures="0" name="mypy" skips="0" tests="1" time="1.230">
  <testcase classname="mypy" file="mypy" line="1" name="mypy-py3.14-test-plat" time="1.230">
    <failure message="mypy produced messages">Error line 1
Error line 2</failure>
  </testcase>
</testsuite>
r.   r/   r0   r1   r7   r8   s        r    test_serious_errorz$TestWriteJunitXml.test_serious_error]   s]    9=P^?_8` *- 
 
 
 !!!!!!r%   Nr&   )r'   r(   r)   r;   r?   rA   rC   r*   r%   r    r,   r,      sd        " " " "$" " " "," " " "6" " " " " "r%   r,   )
__future__r   r   unittestr   r   mypy.inspectionsr   	mypy.utilr   r	   r   r,   r*   r%   r    <module>rH      s    " " " " " " 				 # # # # # # # # + + + + + + B B B B B B B BV V V V V( V V VV" V" V" V" V" V" V" V" V" V"r%   