403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python315/Lib/test/__pycache__/test_configparser.cpython-315.pyc
R
>lqj=wc��]PHs]PHs]PHs]PHs]PHs]PHs]QHGs]QH G	s	QQ\O2sQQ2sQQ\2s
Q	Q
\
\O2sQQ\
\O2sQ
Q\
\O2sQQ\O2sQQ\2sQQ\2sQQ\
\O2sQQ\
\O2sQQ\2sQQ\\O2sQQ\
\O2sQQ \2sQ!Q"\2sQ#Q$\\O2sQ%Q&\\O2sQ'Q(\\O2sQ)Q*\O2sQ+Q,\2s Q-Q.\\O2s!Q/Q0\
\O2s"Q1Q22s#Q3s$Q4Q5\O2s%Q6Q7\O2s&Q8Q9\O2s'Q:Q;\O2s(Q<Q=\O2s)Q>Q?\
\O2s*Q@QA\O2s+QBQC\O2s,QDQE\O2s-QFQG\O2s.QHQI\O2s/\0QJ6Xc\Ob2P!P!)K�)�support)�	os_helperc�J`�\sQs]snQsQsQsQsQsQs	\s
QsUsP!)�
SortedDictc�J�[UOO22!�N)�sorted�data�items��selfs&�+C:\Python315\\Lib\test\test_configparser.pyr
�SortedDict.itemss���d�i�i�o�o�'�(�(�c�J�[UOO22!r)rr	�keysrs&r
r�SortedDict.keyss���d�i�i�n�n�&�'�'rc�\�UO2Tt,tFDp]*MJ
	to!ttoh)�)r
)r�is& r
�values�SortedDict.valuess$��"�j�j�l�+�l��!���l�+�+��+s�)c�6�[UO22!r)�iterr
rs&r
�	iteritems�SortedDict.iteritemss���D�J�J�L�!�!rc�6�[UO22!r)rrrs&r
�iterkeys�SortedDict.iterkeyss���D�I�I�K� � rc�6�[UO22!r)rrrs&r
�
itervalues�SortedDict.itervaluess���D�K�K�M�"�"r�)
�__name__�
__module__�__qualname__�__firstlineno__r
rrrrr �__iter__�__static_attributes__�__classdictcell__��
__classdict__s@r
rrs*����)�(�,�"�!�#��Hrrc�`�\sQs]#snP
sQsQsQsP	s\	OsP
s\	Os\	OsQQksQQksQsUsP!)�CfgParserTestCaseClassc
��[UUOUOUOUOUO
UOUOUOUOQ5
oUOQ-U@oU!))
�defaults�allow_no_value�
delimiters�comment_prefixes�inline_comment_prefixes�empty_lines_in_values�	dict_type�strict�default_section�
interpolationr")�dictr0r1r2r3r4r5r6r7r8�config_class)rr/�	arguments�instances&&  r
�	newconfig� CfgParserTestCaseClass.newconfig.st�����.�.����!�2�2�$(�$@�$@�"&�"<�"<��n�n��;�;� �0�0��,�,�
�	��$�$�1�y�1���rc�L�UOU2oUOU2U!r)r=�read_string)r�stringr/�cfs&&& r
�
fromstring�!CfgParserTestCaseClass.fromstring>s!��
�^�^�H�
%��
���v���	rr")�=�:)�;�#r)r#r$r%r&r0r1r2r3r4�configparser�
_default_dictr5r6�DEFAULTSECTr7�_UNSETr8r=rCr(r)r*s@r
r-r-#sV�����N��J�!��(�� ���*�*�I�
�F�"�.�.�O� �'�'�M�� �rr-c�`�\sQs]DsnQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsUsP!)�
BasicTestCasec��%�,Q8NoUO%cUOQ2UO2Q9Q:,oUO2oUO2UOoUVB2UOQ2oUO2UVC2STt,tFDpfMJ	ooUO2UOUO2UO2UVB2UQ*O2o[[U22oUVC2UO2o[[U22oUO	[U2[U22SFDvqvUVvO2J	UUO2VO*2UUOQQ2Q
2UUOQQ2Q2UUOQQ2Q2UUOQQ	2Q
2UUOQQ2Q2UUOQQ	2Q
2UUOQQ2Q2UUOQQ2Q2UUOQQ2]*2UUOQQ2Q2UOUOQQ2Q2UUOQQ2Q2UUO!QQ2P
2UUOQQ2Q2UUOQQ2Q2UO%cUUOQQ2P2UUOQQQ	Q5Q
2UUOQQQQ	-Q 5Q	2UO#[$O&29^tt^2UOQ!Q2PPP2UO#[$O(29^tt^2UOQQ"2PPP2UUOQ!QQ	Q5Q	2UUOQQ"Q	Q5Q	2UUOQQPQ5Q2UUOQ#QPQ5P2UUOQQ]Q5]*2UUOQQ$]Q5]2UUOQQ$Q%Q5Q%2UO#[$O(29^tt^2UOQQ$2PPP2UOUOQQQ&Q5Q2UOUOQQ'Q&Q5Q&2UUOQQ'Q(Q5Q(2UO#[$O(29^tt^2UOQQ'2PPP2UUO!QQP	Q5P
2UUO!QQ)Q*Q5Q*2UUO!QQ)P	Q5P	2UO#[$O(29^tt^2UO!QQ)2PPP2UUO!Q+QP	Q5P	2UO%c7UUOQQP
Q5P2UUOQQ,P
Q5P
2UUQ*Q*Q
2UUQ*Q*Q2UQ*oUUOQ2UO+UO,U2UO#[.29^tt^2Q-Um
PPP2UO#[.29^tt^2Q.UmPPP2UUQ*Q2UUQ	*Q
2UUQ*Q*Q2UUQ*Q	*Q
2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q/2UO%cUUQ*Q*P2UUQ*OQQ	2Q
2UUQ*OQQ	Q5Q
2UUQ*OQQQ	-Q 5Q	2UO#[029^tt^2UQ!*Q*PPP2UO#[029^tt^2UQ*Q"*PPP2UO#[029^tt^2UQ!*OQQ	Q5PPP2UUQ*OQ"Q	2Q	2UUQ*OQ"Q	Q5Q	2UUQ*OQ"2P2UUQ*OQP2Q2UUQ*OQPQ5Q2UO#[029^tt^2UQ#*OQP2PPP2UUQ*OQ]2]*2UUQ*OQ]Q5]*2UUQ*OQ$]2]2UUQ*OQ$]Q5]2UUQ*OQ$Q%2Q%2UUQ*OQ$Q%Q5Q%2UUQ*OQ$2P2UOUQ*OQQ&2Q2UOUQ*OQQ&Q5Q2UOUQ*OQ'Q&2Q&2UOUQ*OQ'Q&Q5Q&2UUQ*OQ'Q(2Q(2UUQ*OQ'Q(Q5Q(2UUQ*OQ'2P2UUQ*O!QP	2P
2UUQ*O!QP	Q5P
2UUQ*O!Q)Q*2Q*2UUQ*O!Q)Q*Q5Q*2UUQ*O!Q)P	2P	2UUQ*O!Q)P	Q5P	2UUQ*O!Q)2P2UO%c�UUQ*OQP
2P2UUQ*OQP
Q5P2UUQ*OQ,P
2P
2UUQ*OQ,P
Q5P
2Q0VO*Q1$Q2VO*Q3$UO3UO5Q22UO7UO9QQ22UO7UO5Q22UO7UO5UO22UO3UO;QQ2Q42UO7UO9QQ2Q52UO7UO;QQ2Q62UO3UO9QQ122UO7UO;QQ122UO3UO;UOQ122UO7UO9QQ122UO7UO;UOQ122UO#[$O&29^tt^2oUO;Q7Q2PPP2UO	WO<O>Q;2UUOQQ2Q/2UQUO7QU72UO#[029^tt^2UQPPP2UO#[@29^tt^2VOPPP2UQ*QUO7QUQ*72UO#[029^tt^2UQ*QPPP2UO3Q3UQ*72UO#[029^tt^2UQ*Q3PPP2VO*Q3UO7Q3UQ*72UO#[029^tt^2VO*Q3PPP2UO#[029^tt^2UQ7*QPPP2P!ttoh)%fhC
K�9h)%fhC
K�9h)%fhCK�9h)%fhCK9h)%fhCK�9h)%fhC
K�9h)%fhC
K�9h)%fhC	KV9h)%fhC	K49h)%fhC	K9h)%fhCK<9h)%fhCK�9h)%fhCKq9h)%fhCKS9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhP!9h)<�
Commented Bar�Foo Bar�	Long Line�Spaces�
Spacey Bar�Spacey Bar From The Beginning�Types�This One Has A ] In It�NoValue�baz�qwe�foo�bar3�bar1�bar2�bar4�key with spaces�value�another with spaces�splat!�int�42�float�)\��(�?z0.44�boolean�123�strange but acceptable�forks�spoons�option-without-value��fallback��varszNo Such Foo Barzno-such-foozNo Such Spacey Barzno-such-int�18gz
no-such-floatz0.0zno-such-boolean�yesz
No Such Typeszno-such-option-without-valuezName is read-onlyzParser is read-only�7this line is much, much longer than my editor
likes it.�1�
this_value�2�
that_valuez4remove_option() failed to report existence of optionz'remove_option() failed to remove optionzIremove_option() failed to report non-existence of option that was removed�No Such Section)
rPrQ�Internationalized StuffrR�Section\with$weird%characters[	rSrTrUrVrW)rYrZ)r[r\)ry)!r0�append�sort�sections�assertEqualr
r7r�list�len�namer/�get�getint�assertAlmostEqual�getfloat�
getboolean�assertRaisesrI�NoSectionError�
NoOptionError�assertIs�parser�AttributeError�KeyError�
assertTrue�remove_section�assertFalse�
has_option�
remove_option�	exception�args�
ValueError)	rrB�E�F�L�eq�sectionr��cms	&&       r
�
basic_test�BasicTestCase.basic_testFsX��

������
�H�H�Y��	����
�_�-��
�K�K�M��	����
�
�
��
�1���H�H�4�5��	����
�1��%'�'�B��W�B��'�	����	����%�%�&�	����
�1���.�/�5�5�7���4��7�O��
�1���H�H�J���4��7�O������Q���Q��(��M�D��t�\�\�"��
�2�;�;�=�"�1�1�2�3�	�2�6�6�)�U�#�V�,�
�2�6�6�,��&��/�
�2�6�6�1�5�9�6�B�
�2�6�6�1�5�9�5�A�
�2�6�6�/�5�)�6�2�
�2�6�6�/�5�)�5�1�
�2�6�6�(�-�.��8�
�2�6�6�(�1�2�H�=�
�2�9�9�W�e�$�b�)�
�2�6�6�'�5�!�4�(����r�{�{�7�G�<�d�C�
�2�6�6�'�7�#�V�,�
�2�=�=��)�,�e�4�
�2�6�6�'�5�!�#;�<�
�2�6�6�*�G�4�h�?������r�v�v�i�!7�8�$�?�	�2�6�6�)�U�U�6�3�V�<�
�2�6�6�)�U�%���6�8�%�@�
�
�
�|�:�:�
;�
;��F�F�$�e�,�<�
�
�
�|�9�9�
:�
:��F�F�9�m�,�;�
�2�6�6�#�U�U�6�;�U�C�
�2�6�6�)�]�U�6�;�U�C�
�2�6�6�,���6�5�v�>�
�2�6�6�&���6�=�t�D�
�2�9�9�W�e�b�9�1�2�6�
�2�9�9�W�m�b�9�9�2�>�
�2�9�9�W�m�d�9�;�T�B�
�
�
�|�9�9�
:�
:��I�I�g�}�-�;����r�{�{�7�G�47� +� 9�:>�	@����r�{�{�7�O�47� +� 9�:=�	?�
�2�;�;�w��%�;�@�%�H�
�
�
�|�9�9�
:�
:��K�K���1�;�
�2�=�=��)�d�=�;�U�C�
�2�=�=��"3�e�=�D��	�
�2�=�=��"3�d�=�C�T�J�
�
�
�|�9�9�
:�
:��M�M�'�#4�5�;�
�2�=�=��)�d�=�C�T�J������r�v�v�i�!7�%�v�H�$�O��r�v�v�i�!?�$��&�',�
.�	�2�i�=����(�
�2�l��E�"�F�+��4�5��
�7�<�<�8�9��
�
�g�n�n�b�)�
�
�
�~�
.�
.�.�G�L�/�
�
�
�~�
.�
.�2�G�N�/�
�7�5�>�6�"�
�7�5�>�5�!�
�2�o��u�%�v�.�
�2�o��u�%�u�-�
�2�h�<�)�*�G�4�
�2�h�<�-�.��9�
�2�k�?�5�!�E�	G������r�)�}�3�4�d�;�
�2�i�=���U�E�*�F�3�
�2�i�=���U�U��3�V�<�
�2�i�=���U�%����8�%�@�
�
�
�x�
(�
(�� �!�%�(�)�
�
�
�x�
(�
(��y�M�-�(�)�
�
�
�x�
(�
(�� �!�%�%�e�e�%�<�)�
�2�i�=���]�E�2�E�:�
�2�i�=���]�U��;�U�C�
�2�i�=���]�+�T�2�
�2�l�����t�,�f�5�
�2�l�������5�v�>�
�
�
�x�
(�
(��#�$�(�(���5�)�
�2�g�;���e�R�(�"�-�
�2�g�;���e�b��1�2�6�
�2�g�;���m�R�0�"�5�
�2�g�;���m�b��9�2�>�
�2�g�;���m�T�2�D�9�
�2�g�;���m�d��;�T�B�
�2�g�;���m�,�d�3����r�'�{�3�3�G�S�A�4�H����r�'�{�3�3�G�=@� 4� B�CG�	I����r�'�{�3�3�O�S�I�3�O����r�'�{�3�3�O�=@� 4� B�CF�	H�
�2�g�;�����7��?�
�2�g�;����%��@�%�H�
�2�g�;����0�$�7�
�2�g�;�!�!�)�T�2�E�:�
�2�g�;�!�!�)�d�!�;�U�C�
�2�g�;�!�!�"3�U�;�U�C�
�2�g�;�!�!�"3�e�!�D��	�
�2�g�;�!�!�"3�T�:�D�A�
�2�g�;�!�!�"3�d�!�C�T�J�
�2�g�;�!�!�"3�4�d�;������r�)�}� � �!7��?��F��r�)�}� � �!7�%� �H�$�O��r�)�}� � �!?��G��O��r�)�}� � �!?�$�!�&�',�
.�25���� ��.�14���� ��.�	
����)�)�(�3�4�������x�1B�C�D�����*�*�8�4�5�����*�*�4�+?�+?�@�A�����(�(��E�:�N�	P�������y�%�8�=�	?�����)�)�)�U�;�(�	)�	
����
�
�i��>�?�����)�)�)�\�B�C�����(�(��)=�)=�|�L�M�������y�,�?�@�����)�)�$�*>�*>��M�N�
�
�
�|�:�:�
;�
;�r����.��6�<�������*�*�,@�A�
�2�6�6�+�u�%�E�	G�
�w�K�����B��'�
�
�
�x�
(�
(��7��)�
�
�
�z�
*�
*��'�'�(�+��|��U�#�����"�\�"2�2�3�
�
�
�x�
(�
(��<� ��'�)������<�(8�8�9�
�
�
�x�
(�
(��<� ��.�)��#�#�$�\�2������L�)9�9�:�
�
�
�x�
(�
(��'�'�(��6�)�
�
�
�x�
(�
(��$�%�e�,�)�
(��}
(�R<�
;�
;��
:�
:�
:��;�
:�
:��;�
:�
:��;�
:�
:��/�
.�
.��
.�
.�
.�� )�
(�
(��
(�
(�
(��
(�
(�
(��)�
(�
(��r<�
;�
;��)�
(�
(��
*�
*�
*��)�
(�
(��)�
(�
(��)�
(�
(��
(�
(�
(�s��AE9�8AE>�:AF�9AF&�AF:�1AG�2AG"�AG6�,AH
�"AH�AH2�9AI�4AI�@AI.�@+
AJ�BAJ�C
AJ*�D+AJ>�E$AK�E>AF	�FAF	�FAF#	�FAF#	�F&AF7	�F/AF7	�F:AG	�GAG	�GAG	�GAG	�G"AG3	�G+AG3	�G6AH	�G?AH	�H
AH	�HAH	�HAH/	�H'AH/	�H2AI	�H;AI	�IAI	�IAI	�IAI+	�I#AI+	�I.AI?	�I7AI?	�JAJ	�JAJ	�JAJ'	�JAJ'	�J*AJ;	�J3AJ;	�J>AK	�KAK	�KAK#	�KAK#	c	���QOUOUO2oUO%c
UQ*
oUO	U2oUOU2UO%c�UO[O29^tt^2UO[OQOUO222PPP2UO[O29^tt^2UO[OQOUO222PPP2P!UO[OQOUO222UO[OQOUO222P!)%fhK�9h)%fhP!9h)ax[Foo Bar]
foo{0[0]}bar1
[Spacey Bar]
foo {0[0]} bar2
[Spacey Bar From The Beginning]
  foo {0[0]} bar3
  baz {0[0]} qwe
[Commented Bar]
foo{0[1]} bar4 {1[1]} comment
baz{0[0]}qwe {1[0]}another one
[Long Line]
foo{0[1]} this line is much, much longer than my editor
   likes it.
[Section\with$weird%characters[	]
[Internationalized Stuff]
foo[bg]{0[1]} Bulgarian
foo{0[0]}Default
foo[en]{0[0]}English
foo[de]{0[0]}Deutsch
[Spaces]
key with spaces {0[1]} value
another with spaces {0[0]} splat!
[Types]
int {0[1]} 42
float {0[0]} 0.44
boolean {0[0]} NO
123 {0[1]} strange but acceptable
[This One Has A ] In It]
  forks {0[0]} spoons
z[NoValue]
option-without-value
z�                    [Duplicate Options Here]
                    option {0[0]} with a value
                    option {0[1]} with another value
                z�                    [And Now For Something]
                    completely different {0[0]} True
                    [And Now For Something]
                    the larch {0[1]} 1
                z�                [Duplicate Options Here]
                option {0[0]} with a value
                option {0[1]} with another value
            z�                [And Now For Something]
                completely different {0[0]} True
                [And Now For Something]
                the larch {0[1]} 1
            )�formatr1r2r0rCr�r6r�rI�DuplicateOptionErrorr@�textwrap�dedent�DuplicateSectionError�r�
config_stringrBs&  r
�
test_basic�BasicTestCase.test_basic&sp���<�F�4�?�?�D�1�1�2�=	�>�����)�
�M��_�_�]�
+��������;�;�;��"�"�<�#D�#D�E�E����x���0��F�4�?�?�+�	 -�.�F��"�"�<�#E�#E�F�F����x���0�
�F�4�?�?�+� -�.�G�F�
�N�N�8�?�?�,���t���'�	)�
*�
�N�N�8�?�?�,�
��t���'�)�
*�)F�E��G�F�F�s$�?G�?G&�G#	�G#	�&G7	�/G7	c�$�QQQ-QQQ-QQQQQ-Q	QQ
QQ-QQQ-Q
-QQQQQQQQQ-QQQQQ-QQ]*QQQP
]{Q -Q!Q"Q#--
oUO%cUOQ$Q%P--2UO2oUOU2UO	U2UO
%c�UO
[O29^tt^2UOQ&Q'Q-]Q(Q)--2PPP2UO
[O29^tt^2UOQ*Q+Q,Q-Q.--2PPP2P!UOQ/Q'Q-Q0Q(Q)--2UOQ*Q+Q,Q-Q.--2P!)%fhK�9h)%fhP!9h)1rQr[r]rTr^rUr\rYrZrPr_rRrtr{rzzfoo[bg]�	Bulgarian�Defaultzfoo[en]�Englishzfoo[de]�DeutschrSr`rarbrcrVrdrfrgrhrjrWrkrlrXrmru�key�key2�value2zDuplicate Options Here�optionzwith a value�OPTIONzwith another valuer��SECTION)
r0�updater=�	read_dictr�r6r�rIr�r��r�configrBs&  r
�test_basic_from_dict�"BasicTestCase.test_basic_from_dictis����v��
��v��
,��v��u�.�
��v��u��
����
0�2�%��;��y��9��9�	(�
�!�7�%�x��
��r����5��-�	�
%���'�K(
��R�����M�M��*�D���
�
�^�^�
��
���V��������;�;�;��"�"�<�#E�#E�F�F�����%��)����)���G�
�"�"�<�#D�#D�E�E����,� �.� �"6�/���F�E�
�L�L��E�7�+��F�H�-��
�
�L�L�(��n��2�+��
�#G�F��
F�E�E�s$�E+�E>�+E;	�4E;	�>F	�F	c�b�UO2oUOQ2UOQ2UOQ2UO2oUO2UOoUU,QN2UOQQQ2UUO
Q2Q,2UUOQQ2QQ2UO[O29^tt^2UOQQQ2PPP2UOUOQQ22UOUOQQ22UOQQQ2QFD%oUOUOQU2Q	2J'	UUO
Q2Q,2UUO
Q2Q,2UOQQ2UUO
Q2,2UOQ
O!UO"]*22oUUO
Q2Q,2UUOQQ
2Q2UOQO!UO"]*2QQ-Q5oUOUOQQ22P!)%fhCK�9h)�A�a�Bra�b�@could not locate option, expecting case-insensitive option names�A-B�	A-B value�a-b�9has_option() returned false for option which should exist�3[MySection]
Option{} first line   
	second line   
�	MySectionr��Option�first line
second line�[section]
nekey{}nevalue
r��r/r��Key)r�r�r��r�zA-bza-Br�)r=�add_sectionr~r}r�set�optionsr�r�rIr�r�r�r�r�rCr�r1)rrBr�r��opts&    r
�test_case_sensitivity�#BasicTestCase.test_case_sensitivity�s,��
�^�^�
��
���s��
���s��
���s���K�K�M��	����
�
�
��
�1�o��
���s�C��!�
�2�:�:�c�?�S�E�"�
�2�6�6�#�s��W�M�	O�
�
�
�|�:�:�
;�
;��F�F�3��W�%�<�	
����
�
�c�3�/�0�������s�C�0�1�
���s�E�;�'�/�C��O�O��
�
�c�3�'�K�
M�0�	�2�:�:�c�?�U�G�$�
�2�:�:�c�?�S�E�"�
����c�"�
�2�:�:�c�?�B���_�_�E�L�L�����"�
$�%��	�2�:�:�k�"�X�J�/�
�2�6�6�+�x�(�*C�D��_�_�0�06��t���q�7I�0J�',�W�o��7��	
����
�
�i��7�8�5<�
;�
;�s�)J�J.	�&J.	c	���UO2o-UQ$QQ-UQ$-UQ$STt,tFDp"MJ	ooUO2UOoUOoUU[	QQUO
Q,22UUQ*O
2Q.2UUQ*Q*QQ2UO[29^tt^2QUQ*Q$PPP2UOQUQ*72QUQ*Q$QFDoUOVaQ*7Q	2J 	UUQ*O
2Q.2UUQ*O
2Q.2UQ*QUUQ*O
2-2UOQ
OUO]*22oUUQ*O
2Q.2UUQ*Q
*Q2UOQOUO]*2QQ-Q5oUOQUQ*72P!ttoh)%fhCK�9h)r�r�rar�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)
r=r}r�assertCountEqualrr7rr�r�r�rCr�r1)rrBr�r�r��elem_eqr�s&      r
�$test_case_sensitivity_mapping_access�2BasicTestCase.test_case_sensitivity_mapping_access�s��
�^�^�
����3����.��3����3��$&�'�B��W�B��'�	����
�
�
���'�'��
�1�f�c�3�� 4� 4�c�:�;�<�
�2�c�7�<�<�>�C�5�!�
�2�c�7�3�<��M�	O�
�
�
�x�
(�
(�"�B�s�G�C�L�)�	
����r�#�w��'�$��3����/�C��O�O��#�w��K�
M�0�	�2�c�7�<�<�>�E�7�#�
�2�c�7�<�<�>�C�5�!��s�G�C�L���3������#��_�_�E�L�L�����"�
$�%��	�2�k�?���!�H�:�.�
�2�k�?�8�$�&?�@��_�_�0�06��t���q�7I�0J�',�W�o��7��	
�����I��.�/��C
(�)�
(�
(�s�I�
I�I&	�I&	c��UOQQ-2oUOUOUOQ2QQ2UOQQ-2oUOUOUOQ2QQ2P!)r[�Bar�Foor�z<could not locate option, expecting case-insensitive defaults)r=rr�r7�rrBs& r
�test_default_case_sensitivity�+BasicTestCase.test_default_case_sensitivitysx��
�^�^�U�E�N�
+������F�F�4�'�'��/��N�	P��^�^�U�E�N�
+������F�F�4�'�'��/��J�	Lrc
��UOQQQQQQQQ-2o[O2oUOU2UO	2oUOQU2UOQU2UO
UOQ	2]
2UO
UOQ
2]2UOUOQ22P!)�key1za
br�za
b�key3za
b�key4�
z
�
z
	z

)
r=�io�StringIO�write�getvalue�assertNotInr�countr��endswith)rrB�buf�cf_strs&   r
�test_crlf_normalization�%BasicTestCase.test_crlf_normalizations���
�^�^�V�V�F�F�F�H�f�V^�_�
`���k�k�m��
����
����������v�&������(�������d�+�R�0�������f�-�q�1��������/�0rc��UO2oUOU[OQO	UO
]*22UOU[OQO	UO
]*22UOU[OQ2oUOUOQ
2UO%f�UOU[OQ2oUOUOQ2[OQQQ5oUO
]*Q6Xc[OoU1oL[OoU]Q1o[UQQ	59^tt^2oUOVU2oPPP2UOUOU2P!P!)%fhK09h)z[Foo]
{}val-without-opt-name
�No Section!
z[Foo]
  wrong-indent
�cfgparser.3�
configdata��subdirrEz.  # INI with as many tricky parts as possible
�utf-8��encoding)�<???>rr�)r�)
r=�parse_errorrI�ParsingErrorr�r1�MissingSectionHeaderErrorrr�r0r�findfile�open)rrB�e�tricky�error�expected�fs&      r
�test_parse_errors�BasicTestCase.test_parse_errorss{��
�^�^�
������\�6�6�4�4:�F�4�?�?�1�;M�4N�	P�	
����\�6�6�4�4:�F�4�?�?�1�;M�4N�	P�
���R��!G�!G�,�
.��������!>�?��"�"�"�� � ��\�%>�%>� 9�;�A����Q�V�V�Z�0��%�%�m�L�I�F����q�!�S�(�$�1�1��"�9��$�>�>��"�A�M�O���f�w�/�/�1��$�$�R��2��0����Q�V�V�X�.�#�0�/�s�G	�	G	�G	c��[UQ2%cSoL[OU2oUOU29^tt^2oUO	U2PPP2UO
!)%fhWO
!9h��readline)�hasattrr�r�r��	read_filer�)rrB�exc�src�sior�s&&&&  r
r��BasicTestCase.parse_error8sc���3�
�#�#��C��+�+�c�"�C�
�
�
�s�
#�
#�r��L�L���$��|�|��$�
#��|�|��s�A,�,B	�5B	c��UO2oUOUO2,Q2UOUO	Q2Q2UO[O29^tt^2UOQ2PPP2UO[O29^tt^2UOQQQ2PPP2UOU[OQQ2oUOUOQ2UOQ2UOU[OQQ2oUOUOQ2P!)%fhK�9h)%fhK�9h)z0new ConfigParser should have no defined sectionsr�z5new ConfigParser should have no acknowledged sectionsr[�barra)r[)rr[)r=rr~r��has_sectionr�rIr�r�r��	get_errorr�r�r��rrBr�s&  r
�test_query_errors�BasicTestCase.test_query_errorsAs��
�^�^�
����������K�	M��������.�$�	%��
�
�|�:�:�
;�
;��J�J�u��<�
�
�
�|�:�:�
;�
;��F�F�5�%��)�<��N�N�2�|�:�:�E�5�I���������*�
���u���N�N�2�|�9�9�5�%�H���������0�<�
;��
;�
;�s$�;E'�<E:�'E7	�0E7	�:F
	�F
	c��UOV42UOQUO8QUO802P!Sc
oStPo=!Po=hh9h)zexpected exception type �.)r��failr$r%)rrBr	r�r�r�s&&&&& r
r�BasicTestCase.get_errorRsL��	<��F�F�7�#�
�I�I�����)9�)9�;�
<���	��H��	�s#�A�A�	A�
A�A�Ac	��UOQOUO]*Q52o[]]2FD|oUO	UOQQU*22UO
UOQQU*22UO[UO
QQU*2J~	P!)z�[BOOLTEST]
T1{equals}1
T2{equals}TRUE
T3{equals}True
T4{equals}oN
T5{equals}yes
F1{equals}0
F2{equals}FALSE
F3{equals}False
F4{equals}oFF
F5{equals}nO
E1{equals}2
E2{equals}foo
E3{equals}-1
E4{equals}0.1
E5{equals}FALSE AND MORE��equals�BOOLTESTzt%dzf%dze%d)	rCr�r1�ranger�r�r�r�r�)rrB�xs&  r
�test_boolean�BasicTestCase.test_boolean[s���
�_�_�
'�(.�v�T�_�_�Q�5G�v�'H�!��$�q�!��A��O�O�B�M�M�*�e�a�i�@�A����R�]�]�:�u�q�y�A�B����j� �m�m�Z����
D�rc
�z�UO2oUOQ2UO[O29^tt^2oUOQ2PPP2WO
oUO
[U2Q2UO
UOQ
2UO%CcHUO[O29^tt^2oUO[OQOUO]*Q52QQ5PPP2UO
oUO
[U2Q2UO
UOQ2UO[O29^tt^2oUO!QQQ	Q
Q--2PPP2UO
oUO
[U2Q2UO
UOQ2P!P!)%fhCK�9h)%fhK�9h)%fhK~9h)r�zSection 'Foo' already existsz�                    [Foo]
                    will this be added{equals}True
                    [Bar]
                    what about this{equals}True
                    [Foo]
                    oops{equals}this won't
                r�	<foo-bar>��sourcezFWhile reading from '<foo-bar>' [line  5]: section 'Foo' already existsr�r��val�OPTzis really `opt`zIWhile reading from '<dict>': option 'opt' in section 'Bar' already exists)r�NN)r�r!�)r�r�z<dict>N)r=r�r�rIr�r�r�strr�r6r@r�r�r�r1r�r�)rrBr�r�s&   r
�test_weird_errors�BasicTestCase.test_weird_errorsts���
�^�^�
��
���u��
�
�
�|�A�A�
B�
B�b��N�N�5�!�C��L�L������Q��!?�@�������!4�5��;�;�;��"�"�<�#E�#E�F�F�"����x���0��F�$�/�/�!�"4�F�5� 7�@K��L�G����A����S��V�&O�
P����Q�V�V�%<�=��"�"�<�#D�#D�E�E�����e�e�U�E�;L�%M�N�O�F����A����S��V�&M�
N����Q�V�V�%C�D�)�
C�
B�
B��G�F��F�E�s7�
H�!A	H�H*�H	�H	�H'	� H'	�*H:	�3H:	c���UO2o[OQOUO]*Q52oUO
%cCUO
[O29^tt^2UOU2PPP2LUOU2UOUOQQ2Q2P!)%fhK49h)z_            [Foo]
            x{equals}1
            y{equals}2
            y{equals}3
        rr�rru)r=r�r�r�r1r6r�rIr�r@rr�)rrB�inis&  r
�%test_get_after_duplicate_option_error�3BasicTestCase.test_get_after_duplicate_option_error�s���
�^�^�
���o�o��

�F�$�/�/�!�,�F�-�/���;�;�;��"�"�<�#D�#D�E�E����s�#�F�E�
�N�N�3���������s�+�S�1�	F�E�s�C�C"	�C"	c�<�QOUOUO]*UOQ5oUO%c
UQ*
oUOU2oQFD�o[O2oUOVCQ5UO]*oU%cQOU2oQOUUOQ5oUO%c
UQ*
oUOUO2U2J�	P!)	a8[Long Line]
foo{0[0]} this line is much, much longer than my editor
   likes it.
[{default_section}]
foo{0[1]} another very
 long line
[Long Line - With Comments!]
test {0[1]} we        {comment} can
            also      {comment} place
            comments  {comment} in
            multiline {comment} values
)�commentr7z![Valueless]
option-without-value
)�space_around_delimitersz {} z�[{default_section}]
foo{equals}another very
	long line

[Long Line]
foo{equals}this line is much, much longer than my editor
	likes it.

[Long Line - With Comments!]
test{equals}we
	also
	comments
	multiline

)rr7z"[Valueless]
option-without-value

)TF)r�r1r2r7r0rCr�r�r�rr�)rr�rBr0�output�	delimiter�
expect_strings&      r
�
test_write�BasicTestCase.test_write�s��
�������1F�1F�q�1I�(,�(<�(<��>�	������
%�
�M�
�_�_�]�
+��'4�#��[�[�]�F��H�H�V�H�M�����*�I�&�"�M�M�)�4�	�
��V�9�,0�,@�,@��B�
�"�"�"�"����
�

���V�_�_�.�
�>�;(5rc��UOQOUO]*Q52oQQ[2oUO	QQQ2UO	QQUQ22UO	QQQ2UO	QQUQ22UO	QQQ2UO	QQQ2P!)�[sect]
option1{eq}foo
�r�c��\sQsQsQsP!)�2BasicTestCase.test_set_string_types.<locals>.mystr��r")r#r$r%r&r(r"rr
�mystrr:�s��rr<�sect�option1�splat�option2)rCr�r1r'r�)rrBr<s&  r
�test_set_string_types�#BasicTestCase.test_set_string_types�s���
�_�_�0�06��$�/�/�!�:L��0M�O��	�C�	�
���v�y�'�*�
���v�y�%��.�1�
���v�y�'�*�
���v�y�%��.�1�
���v�y�'�*�
���v�y�'�*rc�r�UO]*Q6wcUOQ2[OQQQ5oUO	2oUOUQ,QQ5oUO
V1,2UO
UOQ	Q
2Q2UO	2oUOUQQ5oUO
V1,2UO
UOQ	Q
2Q2UO	2oUO[OU2QQ5oUO
V1,2UO
UOQ	Q
2Q2UO	2oUO[OU2U,QQ5oUO
V1U,2UO
UOQ	Q
2Q2UO	2oUOQ,QQ5oUO
U,2UO	2oUO,QQ5oUO
U,2P!)rrE�incompatible format�cfgparser.1r�r��nonexistent-filer�r�rQr[�newbar)
r1�skipTestrr�r=�readrr�r�FakePath)r�file1rB�parsed_filess&   r
�test_read_returns_file_list�)BasicTestCase.test_read_returns_file_list�s����?�?�1���$��M�M�/�0�� � ��|�D��
�^�^�
���w�w��'9�:�W�w�M������w�/�������	�5�1�8�<�
�^�^�
���w�w�u�w�w�7������w�/�������	�5�1�8�<�
�^�^�
���w�w�y�1�1�%�8�7�w�K������w�/�������	�5�1�8�<�
�^�^�
���w�w�	� 2� 2�5� 9�5�A�G�w�T������u�~�6�������	�5�1�8�<�
�^�^�
���w�w� 2�3�g�w�F������r�*�
�^�^�
���w�w�r�G�w�4������r�*rc���UO]*Q6wcUOQ2[OQQQ5O	2oUO2oUO
UQQ5oUOV1,2UO2oUO
QQQ5oUOU,2UO2oUO
UQ,QQ5oUOV1,2P!)	rrErDrEr�r�r�r�snonexistent-file)r1rHrr��encoder=rIr)r�file1_bytestringrBrLs&   r
�0test_read_returns_file_list_with_bytestring_path�>BasicTestCase.test_read_returns_file_list_with_bytestring_paths����?�?�1���$��M�M�/�0�"�+�+�M�,�O�V�V�X��
�^�^�
���w�w�/�'�w�B������'9�:�
�^�^�
���w�w�2�W�w�E������r�*�
�^�^�
���w�w� 0�2E�F�QX�w�Y������'9�:rc�h�UOQOUO]*Q52!)ah[Foo]
bar{equals}something %(with1)s interpolation (1 step)
bar9{equals}something %(with9)s lots of interpolation (9 steps)
bar10{equals}something %(with10)s lots of interpolation (10 steps)
bar11{equals}something %(with11)s lots of interpolation (11 steps)
with11{equals}%(with10)s
with10{equals}%(with9)s
with9{equals}%(with8)s
with8{equals}%(With7)s
with7{equals}%(WITH6)s
with6{equals}%(with5)s
With5{equals}%(with4)s
WITH4{equals}%(with3)s
with3{equals}%(with2)s
with2{equals}%(with1)s
with1{equals}with

[Mutual Recursion]
foo{equals}%(bar)s
bar{equals}%(foo)s

[Interpolation Error]
name{equals}%(reference)s
r)rCr�r1rs&r
�get_interpolation_config�&BasicTestCase.get_interpolation_configs1�����
*�.+1�&�����8J�&�*K�1M�	Mrc��UOQOUO2QQ-Q5o[UO	QQQ-Q52oUO2UO
V12UO[O29^tt^2UO	Q2PPP2P!)%fhP!9h)z�
            [section]
            name {0[0]} %(value)s
            key{0[1]} |%(name)s|
            getdefault{0[1]} |%(default)s|
        �default�	<default>r�r�rarpzno such section)
rCr�r1r�r
r}rr�rIr�)rrrBr�s&&  r
�check_items_config� BasicTestCase.check_items_config4s���
�_�_��

�F�4�?�?�#�y�+�.F��H��
����)�7�G�*<��=�>��	��������%�
�
�
�|�:�:�
;�
;��H�H�&�'�<�
;�
;�
;�s�B2�2C	�;C	c���UOQOUO2QQ-Q5oUOUO	2]*Q2UOUO	2]*Q2UOUO	2]*Q2UO[29^tt^2UO	2PPP2P!)%fhP!9h)��
            [section1]
            name1 {0[0]} value1
            [section2]
            name2 {0[0]} value2
            [section3]
            name3 {0[0]} value3
        rXrYr��section1�section2�section3)rCr�r1r�popitemr�r�r�s& r
�test_popitem�BasicTestCase.test_popitemAs���
�_�_��
�F�4�?�?�#�y�+�.F��H��	
�������a��*�5��������a��*�5��������a��*�5�
�
�
�x�
(�
(��J�J�L�)�
(�
(�
(�s�C�C.	�&C.	c�6�UOQQ-2oUOUOUOQ2QQ2QQQQ-UQ$UOUO	2Q,2UO[UQ*O
22.Q	l2UO2UO[UO	22[22UO[VO*O
22Q.2P!)
r[r�r�r�r>�value1r@r��zing>r[r>r@)r=rr�r7r~r�r�clearr�s& r
�
test_clear�BasicTestCase.test_clearPs���
�^�^�U�E�N�
+������F�F�4�'�'��/��N�	P� ��9�h�?��6�
����������1�����R��Z�_�_�.�/�1N�O�
���
�����R�[�[�]�+�S�U�3�����R� 4� 4�5�:�:�<�=��w�Grc���UOQOUO2QQ-Q5oUO[	UQ*O22QQ.2UO[	UQ*O22QQ.2UO[	UQ	*O22Q
Q.2UOUQ*Q*Q2UOUQ*Q*Q2UOUQ	*Q
*Q
2UOUO
2,QN2QQ-UQ$UO[	UQ*O22QQ.2UOUQ*Q*Q2UOQUQ*2UOUO
2,QN2-UQ	$UO[	UQ	*O22Q.2UOQ
UQ	*2UOUO
2,QN2VO*VO$UO[	VO*O22[	22-VO$UO[	VO*O22[	22UO[	UQ*O22Q.2UO[	UQ*O22Q.2UO[	UQ	*O22[	22UOUO
2,QN2UQ*UQ$UO[	UQ*O22Q.2P!)r]�nameD�valueDr�r^�name1�namedr_�name2r`�name3rer��value3�name22�value22)r^r_r`)
rCr�r1rr�rr~r�r7�assertNotEqualr�s& r
�test_setitem�BasicTestCase.test_setitem\s��
�_�_��
�F�4�?�?�#�w��.A��C��	
����R�
�^�0�0�2�3�g�w�5G�H�����R�
�^�0�0�2�3�g�w�5G�H�����R�
�^�0�0�2�3�g�w�5G�H�����J���0�(�;�����J���0�(�;�����J���0�(�;��������(L�M�"�I�.��:������R�
�^�0�0�2�3�h��5H�I�����J���1�9�=�����"�Z�.�1��������(L�M���:������R�
�^�0�0�2�3�g�Y�?�����"�Z�.�1��������(L�M�#%�&:�&:�#;���� ����C��#7�#7� 8� =� =� ?�@�#�%�H�#%���� �����R� 4� 4�5�:�:�<�=�s�u�E�����R�
�^�0�0�2�3�g�Y�?�����R�
�^�0�0�2�3�h�Z�@�����R�
�^�0�0�2�3�S�U�;��������(L�M��J���:������R�
�^�0�0�2�3�h�Z�@rc��UO%cUOQ2[OQO	UO
]*22oUO
2oUO[O29^tt^2UOU2PPP2UOUOQQ2Q2UOUQ*Q*Q2P!)%fhKT9h)z2if no_value is allowed, ParsingError is not raisedzC            [DEFAULT]
            test {0} test
            invalid�DEFAULT�test)
r0rHr�r�r�r1r=r�rIr�r@rr�)r�invalidrBs&  r
�test_invalid_multiline_value�*BasicTestCase.test_invalid_multiline_value�s��������M�M�N�O��/�/�#��v�d�o�o�a�0�1�
��
�^�^�
��
�
�
�|�8�8�
9�
9��N�N�7�#�:�������	�6�2�F�;�����I��v�.��7�:�
9�s�C0�0D	�9D	r")r#r$r%r&r�r�r�r�r�r�r�rr�rrrr(r,r4rArMrRrUrZrbrhrur{r(r)r*s@r
rNrNDs�����[-�@A*�FJ�X'9�T&0�PL�	1�/�8�1�"<�D�2E�>
2�4?�l+�+�B;�$M�6(�
�
H�$A�L
8�
8rrNc�4�\sQsQs\O
sP	sQsP!)�StrictTestCase�r")	r#r$r%r&rI�RawConfigParserr:r6r(r"rr
r~r~�s���/�/�L�
�Frr~c�j`�\sQsQsn\O
sQsQsQs	Qs
QsQsQs
Q	sQ
sUsP!)�ConfigParserTestCase�c��UO2oUOoUUOQQ2Q2UUOQQ2Q2UUOQQ2Q2UOU[O
QQ2oUO[O6XcUOUOQ2P!P!)	r�rz%something with interpolation (1 step)�bar9z.something with lots of interpolation (9 steps)�bar10z/something with lots of interpolation (10 steps)�bar11)r�r��5something %(with11)s lots of interpolation (11 steps))	rUrr�rrI�InterpolationDepthErrorr8rLr�)rrBr�r�s&   r
�test_interpolation�'ConfigParserTestCase.test_interpolation�s���
�
*�
*�
,��
�
�
��
�2�6�6�%���!H�I�
�2�6�6�%�� �;�	=�
�2�6�6�%��!�<�	>��N�N�2�|�C�C�U�G�T������!4�!4�4����Q�V�V�&I�
J�5rc��UO2oUOU[OQQ2oUO	UO
Q2UO	UOQ2UO	UOQ2UO[O6XcUO	UOQ2P!P!)�Interpolation Errorr��	reference)r�r�z
%(reference)sr�)rUrrI�InterpolationMissingOptionErrorrr�r�r�r8rLr�rs&  r
� test_interpolation_missing_value�5ConfigParserTestCase.test_interpolation_missing_value�s���
�
*�
*�
,���N�N�2�|�K�K�0�&�
:��������k�2�������$9�:�������6�*�����!4�!4�4����Q�V�V�&B�
C�5rc�.�UO,QN2P!)rX)�rXrY)�
getdefaultz|<default>|)r�z|value|)r�ra�rZrs&r
�
test_items�ConfigParserTestCase.test_items�s�����!4�	5rc�6�UOQOUO]*Q52oUOUO	QQ2Q2UO
[O6Xc%UOUO	QQ2Q2P!P!)zc[section]
option1{eq}xxx
option2{eq}%(option1)s/xxx
ok{eq}%(option1)s/%%s
not_ok{eq}%(option2)s/%%sr8r��okzxxx/%s�not_okz
xxx/xxx/%s)rCr�r1rr�r8rIrLr�s& r
�test_safe_interpolation�,ConfigParserTestCase.test_safe_interpolation�s���
�_�_�9�:@��$(�O�O�A�$6�:@�:8�	9��	
������	�4�0�(�;�����!4�!4�4����R�V�V�I�x�8�,�G�5rc�0�UOQOUO]*Q52oUOUO	QQ2Q2UO[UOQQQ2UO[UOQQQ2UO[UOQQQ2UOUO	QQ2Q2UOQQQ	2UOUO	QQ2Q
2P!)r7r8r=r>r[z%foozfoo%zf%oor@zfoo%%barzfoo%bar)rCr�r1rr�r�r�r�r�s& r
�#test_set_malformatted_interpolation�8ConfigParserTestCase.test_set_malformatted_interpolation�s���
�_�_�0�06��$�/�/�!�:L��0M�O��	
�������	�2�E�:����*�b�f�f�f�i��H����*�b�f�f�f�i��H����*�b�f�f�f�i��H��������	�2�E�:�	���v�y�*�-��������	�2�I�>rc��UOQOUO]*Q52oUO[UO
QQ]2UO[UO
QQQ2UO[UO
QQ[
22UO[UO
QQ]2UO[UO
QQQ2UO[UO
QQ[
22UO[UO
Q]{Q2UO[UO]{2P!)r7r8r=r>g�?r@zinvalid opt name!)rCr�r1r��	TypeErrorr��objectr�r�s& r
�test_set_nonstring_types�-ConfigParserTestCase.test_set_nonstring_types�s���
�_�_�0�06��$�/�/�!�:L��0M�O��	
���)�R�V�V�V�Y��B����)�R�V�V�V�Y��D����)�R�V�V�V�Y���I����)�R�V�V�V�Y��B����)�R�V�V�V�Y��D����)�R�V�V�V�Y���I����)�R�V�V�V�S�:M�N����)�R�^�^�S�9rc�~�UO2oUO[UOUO2P!r)r=r�r�r�r7r�s& r
�test_add_section_default�-ConfigParserTestCase.test_add_section_default�s*��
�^�^�
�����*�b�n�n�d�6J�6J�Krc��UO]Q-Q5oUOVO*Q*Q2UOVO*O	Q2Q2UOQQ-Q5oUOVO*Q*Q2UOVO*O	Q2Q2P!)	zbpo-23835 fix for ConfigParserg@r�ruz2.5r�g@r�z5.25)r=rr7r�r�r�s& r
�test_defaults_keyword�*ConfigParserTestCase.test_defaults_keyword�s���
�^�^�a��X�^�
.������0�0�1�#�6��>����r�"6�"6�7�@�@��E�s�K�
�^�^�c�4�[�^�
1������0�0�1�#�6��?����r�"6�"6�7�@�@��E�t�Lrr")r#r$r%r&rI�ConfigParserr:r�r�r�r�r�r�r�r�r(r)r*s@r
r�r��sC�����,�,�L�J�	C�5�
H�?� :�L�M�Mrr�c�`�\sQsQsn\O
sPs\OQ2O2sQsQs
QsQsQsUsP!)�#ConfigParserTestCaseNoInterpolation��z�
        [numbers]
        one = 1
        two = %(one)s * 2
        three = ${common:one} * 3

        [hexen]
        sixteen = ${numbers:two} * 8
    c��UOUQ*Q*Q2UOUQ*Q*Q2UOUQ*Q*Q2UOUQ*Q*Q	2P!)
�numbers�oneru�twoz%(one)s * 2�threez${common:one} * 3�hexen�sixteenz${numbers:two} * 8)rr�s&&r
�assertMatchesIni�4ConfigParserTestCaseNoInterpolation.assertMatchesIni�sh������I��u�-�s�3�����I��u�-�}�=�����I��w�/�1D�E�����G��Y�/�1E�Frc�`�UOUO2oUOU2P!r)rCr+r�r�s& r
�test_no_interpolation�9ConfigParserTestCaseNoInterpolation.test_no_interpolations"��
�_�_�T�X�X�
&�����b�!rc�h�UO2oUOUOP22P!��)r=�assertIsNoner@r�s& r
�test_empty_case�3ConfigParserTestCaseNoInterpolation.test_empty_cases%��
�^�^�
�����"�.�.��,�-rc��QQ[O2oU2oUOUO2UO	U2P!)c��\sQsQsPsQsP!)�bConfigParserTestCaseNoInterpolation.test_none_as_default_interpolation.<locals>.CustomConfigParserir")r#r$r%r&�_DEFAULT_INTERPOLATIONr(r"rr
�CustomConfigParserr�s��%)�"rr�)rIr�r@r+r�)rr�rBs&  r
�"test_none_as_default_interpolation�FConfigParserTestCaseNoInterpolation.test_none_as_default_interpolations<��	*��!:�!:�	*� �
!��
���t�x�x� ����b�!rr")r#r$r%r&rIr�r:r8r�r��stripr+r�r�r�r�r(r)r*s@r
r�r��sN�����,�,�L��M�
�/�/��	�
����G�"�.�"�"rr�c�(`�\sQsQsnQsQsUsP!)�,ConfigParserTestCaseInvalidInterpolationTypeic�L�[O]*Q1FDcoUOUQ59^tt^2UO[29^tt^2[O
UQ5PPP2PPP2Je	P!)%fhK9h)%fhJ�9h)�*za string)ra�r8)rI�ExtendedInterpolation�subTestr�r�r�)rras& r
�*test_error_on_wrong_type_for_interpolation�WConfigParserTestCaseInvalidInterpolationType.test_error_on_wrong_type_for_interpolationsj��"�8�8�2�
�K�E����E��*�*��&�&�y�1�1� �-�-�E�B�2�+�*�L�1�1��+�*�*�s/�B	�A?
�)B	�?B�B�
B	�B#
�B#
r")r#r$r%r&r�r(r)r*s@r
r�r�s����C�Crr�c�$�\sQsQsQsQsQsQsP!)�)ConfigParserTestCaseNonStandardDelimitersir"�z:=�$��//�"�r#r$r%r&r1r2r3r(r"rr
r�r�����J�"��)�rr�c��\sQsQsQsQsP!)�-ConfigParserTestCaseNonStandardDefaultSectioni!�generalr")r#r$r%r&r7r(r"rr
r�r�!s���Orr�c�p`�\sQsQsn\O
sQOQQ2sQs	Qs
QsQsUs
P!)	�MultilineValuesTestCasei%zSI'm having spam spam spam spam spam spam spam beaked beans spam spam spam and spam!� �	
c
��UO2o[]d2FDdoQOU2oUOU2[]
2FD/oUO	UQOU2UO
2J1	Jf	[
[OQQQ59^tt^2oUOU2PPP2P!)%fhP!9h)�dz	section{}z
lovely_spam{}�wr�r�)
r=rr�r�r��wonderful_spamr�r�TESTFNr�)rrBr�s�jrs&     r
�setUp�MultilineValuesTestCase.setUp+s���
�^�^�
���s��A��"�"�1�%�A��N�N�1���2�Y�����q�/�0�0��3�T�5H�5H�I���
�)�"�"�C�'�
:�
:�a��H�H�Q�K�;�
:�
:�
:�s�*C�C	�C	c�P�[O[O2P!r)�os�unlinkrr�rs&r
�tearDown� MultilineValuesTestCase.tearDown5s��
�	�	�)�"�"�#rc�@�UO2o[[OQQ59^tt^2oUO	U2PPP2UOUO
QQ2UOOQQ22P!)%fhKN9h)r�r��section8�lovely_spam4r�r�)	r=r�rr�rrr�r��replace)r�cf_from_filers&  r
� test_dominating_multiline_values�8MultilineValuesTestCase.test_dominating_multiline_values8su���~�~�'��
�)�"�"�W�
5�
5���"�"�1�%�6�����)�)�*�n�E��,�,�4�4�V�T�B�	D�6�
5�s�B
�
B	�B	r")r#r$r%r&rIr�r:r�r�r�r�r�r(r)r*s@r
r�r�%s<�����,�,�L�,�-4�W�S�&�-A���$�D�Drr�c�R`�\sQsQsn\O
sQsQsQs	Qs
QsUsP!)�RawConfigParserTestCaseiBc��UO2oUOoUUOQQ2Q2UUOQQ2Q2UUOQQ2Q2UUOQQ2Q2P!)	r�rz*something %(with1)s interpolation (1 step)r�z3something %(with9)s lots of interpolation (9 steps)r�z5something %(with10)s lots of interpolation (10 steps)r�r�)rUrr��rrBr�s&  r
r��*RawConfigParserTestCase.test_interpolationEs~��
�
*�
*�
,��
�
�
��
�2�6�6�%���7�	9�
�2�6�6�%�� �@�	B�
�2�6�6�%��!�B�	D�
�2�6�6�%��!�B�	Drc�.�UO,QN2P!)rX)r�)r�z
|%(default)s|)r�z
|%(name)s|)r�z	%(value)sr�rs&r
r��"RawConfigParserTestCase.test_itemsQs�����!8�	9rc���UO2oUOQ2UOQQ]2UOQQ,QN2UOQQQQ-2UOUO	QQ2]2UOUO	QQ2,QN2UOUO	QQ2QQ-2UO]{2UO]{QP	2UOUO	]{Q2P	2UO
[OIc@QUmUOQ]]2UOUO	Q]2]2P!P!)	z
non-stringrdr�r9�pign��!	@zthis is sickc��U!rr")rs&r
�<lambda>�BRawConfigParserTestCase.test_set_nonstring_types.<locals>.<lambda>gs��qr)rrr��r&��
)	r=r�r�rr��_dictrIrJ�optionxformr�s& r
r��0RawConfigParserTestCase.test_set_nonstring_typesWs)��
�^�^�
��
���|�$�
���|�U�A�&�
���|�V�%>�?�
���|�V�d�G�_�5��������e�4�a�8��������f�5�2�	4��������f�5��g��G�
���s��
���s�N�D�)��������^�4�d�;�
�8�8�|�1�1�1�)�B�N��F�F�<��A�&����R�V�V�L�!�4�a�8�2rc�j�UO[29^tt^2oUO]Q-Q5PPP2WOoUO	[U2Q2UOQQ-Q5oUO
V0O*Q*Q2P!)%fhKv9h)z-bpo-23835 legacy behavior for RawConfigParserg333333@r�z%'int' object has no attribute 'lower'r�g������@r�)r�r�r=r�rr'r�r7)r�ctx�errrBs&   r
r��-RawConfigParserTestCase.test_defaults_keywordks���
�
�
�~�
.�
.�#��N�N�Q��H�N�-�/��m�m������S��#J�K�
�^�^�c�3�Z�^�
0�����r�"6�"6�7��<�c�B�/�
.�s�B"�"B2	�+B2	r")
r#r$r%r&rIr�r:r�r�r�r�r(r)r*s@r
r�r�Bs,�����/�/�L�
D�9�9�(C�Crr�c�$�\sQsQsQsQsQsQsP!)�,RawConfigParserTestCaseNonStandardDelimitersiur"r�r�r�r"rr
rrur�rrc�L`�\sQsQsn\O
sQsQsP
s	Qs
QsUsP!)�RawConfigParserTestSambaConfi{c��[OQQQ5oUO2oUOUQ,QQ5oUO	V1,2,QNoUO	UO2U2UO	UO
QQ2Q	2UO	UOQQ
2]22UO	UO
QQ2Q2UO	UO
QQ
2Q2P!)zcfgparser.2r�r�rFr�r��global�tmp�	workgroup�MDKGROUPzmax log sizezhosts allowz127.zecho commandz
cat %s; rm %s)r�homes�printerszprint$z
pdf-generatorr�Agustin)rr�r=rIrr~r�r�)r�smbconfrBrLr~s&    r
�test_reading�)RawConfigParserTestSambaConf.test_reading�s����"�"�=��F��
�^�^�
���w�w��);�<�w�w�O������y�1�A����������1��������+�6�
�C�������8�^�<�b�A��������-�8�&�A��������~�6��Hrr")rHrGz----)r�)
r#r$r%r&rIr�r:r2r3r4rr(r)r*s@r
rr{s.�����/�/�L�)��%��!��I�Irrc�`�\sQsQsn\O
s\O2sQs	P	s
QQksQsQs
QsQsQsQ	sQ
sUsP!)�)ConfigParserTestCaseExtendedInterpolationi��commonc�h�UOU2oU%cV4mUOU2U!r)r=rr@)rrAr/rrBs&&&& r
rC�4ConfigParserTestCaseExtendedInterpolation.fromstring�s)��
�^�^�H�
%���(�N�
���v���	rc��UO[OQ2O22oUOoUUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q	*Q
2UUQ*Q*Q2UUQ
*Q*Q2UUQ
*Q*Q2UUQ
*Q*Q2UUQ
*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q	*Q
2UUQ*Q*Q2P!)a
            [common]
            favourite Beatle = Paul
            favourite color = green

            [tom]
            favourite band = ${favourite color} day
            favourite pope = John ${favourite Beatle} II
            sequel = ${favourite pope}I

            [ambv]
            favourite Beatle = George
            son of Edward VII = ${favourite Beatle} V
            son of George V = ${son of Edward VII}I

            [stanley]
            favourite Beatle = ${ambv:favourite Beatle}
            favourite pope = ${tom:favourite pope}
            favourite color = black
            favourite state of mind = paranoid
            favourite movie = soylent ${common:favourite color}
            favourite song = ${favourite color} sabbath - ${favourite state of mind}
        rzfavourite Beatle�Paulzfavourite color�green�tomzfavourite bandz	green dayzfavourite popezJohn Paul II�sequelz
John Paul III�ambv�Georgezson of Edward VIIzGeorge Vzson of George Vz	George VI�stanley�blackzfavourite state of mind�paranoidzfavourite moviez
soylent greenzfavourite songzblack sabbath - paranoid)rCr�r�r�rr�s&  r
�test_extended_interpolation�EConfigParserTestCaseExtendedInterpolation.test_extended_interpolation�s���
�_�_�X�_�_�.�
�,�U�W�-��0�
�
��
�2�h�<�*�+�V�4�
�2�h�<�)�*�G�4�
�2�e�9�'�(�&�1�
�2�e�9�&�'��1�
�2�e�9�%�&��4�
�2�e�9�%�&��7�
�2�e�9�X���0�
�2�f�:�(�)�8�4�
�2�f�:�'�(�'�2�
�2�f�:�)�*�J�7�
�2�f�:�'�(�+�6�
�2�i�=�+�,�h�7�
�2�i�=�*�+�W�5�
�2�i�=�2�3�Z�@�
�2�i�=�*�+�_�=�
�2�i�=�)�*�N�;�
�2�i�=�)�*�%�	'rc��UO[OQ2O22oUO	[
O29^tt^2UQ*Q*PPP2UO	[
O29^tt^2UQ*Q*PPP2P!)%fhKR9h)%fhP!9h)z�
            [one for you]
            ping = ${one for me:pong}

            [one for me]
            pong = ${one for you:ping}

            [selfish]
            me = ${me}
        zone for you�ping�selfish�me)rCr�r�r�r�rIr�r�s& r
�test_endless_loop�;ConfigParserTestCaseExtendedInterpolation.test_endless_loop�s���
�_�_�X�_�_�	.�	
��U�W�	���
�
�|�C�C�
D�
D��}��f�%�E�
�
�
�|�C�C�
D�
D��y�M�$��E�
D�E�
D��
D�
D�
D�s$�B7�C
�7C	�C	�
C	�C	c�:�UOQ2oUOUQ*Q*Q2UOUQ*Q*Q2UOUQ*Q*Q2[OoUO	U29^tt^2oUQ*Q*PPP2UOWO
OQ	2UOUO
O]*Q
2P!)%fhKe9h)z�
            [dollars]
            $var = $$value
            $var2 = ${$var}
            ${sick} = cannot interpolate me

            [interpolated]
            $other = ${dollars:$var}
            $trying = ${dollars:${sick}}
        �dollarsz$varz$value�interpolatedz$otherz${sick}zcannot interpolate mez$tryingzdollars:${sickz${dollars:${sick}})rCrrIr�r�r�r�r�)rrB�exception_classr�s&   r
�test_strange_options�>ConfigParserTestCaseExtendedInterpolation.test_strange_options�s���
�_�_�	�	
��	
����I��v�.��9�����N�+�H�5�x�@�����I��y�1�3J�K�&�F�F��
�
�
��
/�
/�2��~��y�)�0�������/�/�1A�B�������*�*�1�-�/C�D�0�
/�s�D
�
D	�D	c��[OQ2O2oUOU2oUOoUUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q2UUQ	*Q
*Q2UUQ	*Q*Q
2P!)aj
            [common]
            optionlower = value
            OptionUpper = Value

            [Common]
            optionlower = a better ${common:optionlower}
            OptionUpper = A Better ${common:OptionUpper}

            [random]
            foolower = ${common:optionlower} redefined
            FooUpper = ${Common:OptionUpper} Redefined
        r�optionlowerra�OptionUpper�Value�Common�a better value�A Better Value�random�foolower�value redefined�FooUpper�A Better Value Redefined)r�r�r�rCr�rr+rBr�s&   r
�test_case_sensitivity_basic�EConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_basic�s����o�o��
��U�W�	��_�_�S�
!��
�
�
��
�2�h�<�
�&��0�
�2�h�<�
�&��0�
�2�h�<�
�&�(8�9�
�2�h�<�
�&�(8�9�
�2�h�<�
�#�%6�7�
�2�h�<�
�#�%?�@rc�L�[OQ2O2oUO[O
29^tt^2UO
U2oPPP2UO
UQQ5oUOoUUQ*Q*Q2UUQ*Q*Q2UUQ*Q*Q	2UUQ*Q*Q
2UUQ*Q*Q
2UUQ*Q*Q2P!)%fhK�9h)a8
            [common]
            option = value
            Option = Value

            [Common]
            option = a better ${common:option}
            Option = A Better ${common:Option}

            [random]
            foo = ${common:option} redefined
            Foo = ${Common:Option} Redefined
        c��U!rr")r�s&r
r�[ConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflicts.<locals>.<lambda>s��#r)rrr�rar�r=r>r?r@rAr[rCr�rE)r�r�r�r�rIr�rCrrFs&   r
�test_case_sensitivity_conflicts�IConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflictss����o�o��
��U�W�	��
�
�|�@�@�
A�
A�����%�B�B��_�_�S�o�_�
>��
�
�
��
�2�h�<��!�7�+�
�2�h�<��!�7�+�
�2�h�<��!�#3�4�
�2�h�<��!�#3�4�
�2�h�<��� 1�2�
�2�h�<��� :�;�B�
A�s�
D�D#	�D#	c��UOQ2oUO[O29^tt^2UQ*Q*PPP2UO[O29^tt^2UQ*Q*PPP2UO[O29^tt^2UQ*Q*PPP2UO[O29^tt^2UQ*Q*PPP2UO[O29^tt^2UQ*Q*PPP2UO[
29^tt^2QUQ*Q$PPP2P!)%fhCKE9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)	a
            [interpolation fail]
            case1 = ${where's the brace
            case2 = ${does_not_exist}
            case3 = ${wrong_section:wrong_value}
            case4 = ${i:like:colon:characters}
            case5 = $100 for Fail No 5!
        zinterpolation fail�case1�case2�case3�case4�case5z
BLACK $ABBATH�case6)rCr�rI�InterpolationSyntaxErrorr�r�r�s& r
�test_other_errors�;ConfigParserTestCaseExtendedInterpolation.test_other_errors"sM��
�_�_��
���
�
�|�D�D�
E�
E��#�$�W�-�F�
�
�
�|�K�K�
L�
L��#�$�W�-�M�
�
�
�|�K�K�
L�
L��#�$�W�-�M�
�
�
�|�D�D�
E�
E��#�$�W�-�F�
�
�
�|�D�D�
E�
E��#�$�W�-�F�
�
�
�z�
*�
*�0?�B�#�$�W�-�+�
*�F�
E�
E��
L�
L�
L��
L�
L��
E�
E��
E�
E��
*�
*�
*�sk�F�:F�:F/�:G�:G�0
G(�F	�F	�F,	�$F,	�/F?	�8F?	�G	�G	�G%	�G%	�(G9	�1G9	r")NN)r#r$r%r&rIr�r:r�r8r7r6rCr,r2r8rGrLrVr(r)r*s@r
rr�sU�����,�,�L� �6�6�8�M��O�
�F��+'�Z �"E�*A�0<�6@�@rrc��\sQsQsP	sQsP!)�ConfigParserTestCaseNoValuei:r")r#r$r%r&r0r(r"rr
rYrY:s���NrrYc�T`�\sQsQsn\O
2sP	sQsQs	Qs
UsP!)�NoValueAndExtendedInterpolationi>c���[OQ2oUOU2oUOUQ*Q*P2UO	UQ*Q*P2P!)z@
            [dummy]
            a
            b = ${a}
        �dummyr�r�)r�r�rCr�rr�s&  r
�&test_interpolation_with_allow_no_value�FNoValueAndExtendedInterpolation.test_interpolation_with_allow_no_valueBsU�����"�
��
�_�_�V�
$���
�
�b��k�#�&��-�����G��S�)�2�.rc���[OQ2oUOU2oUOUQ*Q*Q2UOUQ*Q*Q2P!)zG
            [dummy]
            a = None
            b = ${a}
        r]r��Noner�)r�r�rCrr�s&  r
�test_explicit_none�2NoValueAndExtendedInterpolation.test_explicit_noneMsW�����"�
��
�_�_�V�
$������G��S�)�6�2�����G��S�)�6�2rr")r#r$r%r&rIr�r8r0r^rbr(r)r*s@r
r[r[>s'���� �6�6�8�M��N�	/�	3�	3rr[c�0�\sQsQs\O
sQsP!)�/ConfigParserNoValueAndExtendedInterpolationTestiYr")r#r$r%r&rIr�r:r(r"rr
rereYs�� �,�,�Lrrec�0�\sQsQs\O
sQsP!)�2RawConfigParserNoValueAndExtendedInterpolationTesti`r")r#r$r%r&rIr�r:r(r"rr
rgrg`s�� �/�/�Lrrgc�V`�\sQsQsn\O
sQ.sQ.sP	s	Qs
QsQsUs
P!)�ConfigParserTestCaseTrickyFileigrErHc	�d�[OQQQ5oUO2oUO[	UOUQQ52]2UOUO
2,QN2UOUOUOQQ
Q-Q5P2UO[29^tt^2UOUOQP	Q
Q-Q5PPP2UO[	UOQQ2OQ22]2UO[	UOQQ2OQ22]
2QoUOUOUQ22UOUOUQ2Q2UO[	UOQ22]2UO[ O"29^tt^2UOQ	2PPP2UOUOQ
Q2Q2UOUOQ
Q2UOQ
Q22UOUOQQ2Q2P!)%fhCK�9h)%fhK�9h)r�r�r�r�r��strange�
corruption�&yeah, sections can be indented as well�another one!�no values here�tricky interpolation�more interpolation�go�interpolatez-1rp)�rawrq�otherr�razare they subsectionszlets use some Unicodeu	片仮名�letszdo thiszgo shopping)rkrlrmrnrorprq)rr�r=rr�rIr~r�r7r�r�r��splitr�r�r
rIr�)rr�rB�longnames&   r
�test_cfgparser_dot_3�3ConfigParserTestCaseTrickyFile.test_cfgparser_dot_3ms#���!�!�-��E��
�^�^�
������R�W�W�V�g�W�>�?��C��������)?�	@�	
������4�#7�#7��)6��(=�#�?�@B�	D�
�
�
�z�
*�
*��I�I�d�*�*�D�d�)�4�0�
�
2�+�	
����R�V�V�I�w�7�=�=�d�C�D�a�H�����R�V�V�L�'�:�@�@��F�G��L�;��������x�1G�H�I��������*A�B�K�P�����R�X�X�n�5�6��:�
�
�
�|�K�K�
L�
L��H�H�%�&�M������� 6��?��K������� 6��?���� 6��=�	?������� 4�f�=�}�M�!+�
*�
*��M�
L�s$�"J�9J�J	�J	�J/	�(J/	c���[OQQQ5oUO2oUO[29^tt^2UOUQQ5PPP2P!)%fhP!9h)r�r�r��asciir�)rr�r=r��UnicodeDecodeErrorrI)rr�rBs&  r
�test_unicode_failure�3ConfigParserTestCaseTrickyFile.test_unicode_failure�sQ���!�!�-��E��
�^�^�
��
�
�
�1�
2�
2��G�G�F�W�G�-�3�
2�
2�
2���A%�%A6	�.A6	r")r#r$r%r&rIr�r:r1r2r0ryr~r(r)r*s@r
ririgs5�����,�,�L���J��u���N�N�@.�.rric�<`�\sQsQsnQsQsQsQsQsQs	Us
P!)�Issue7005TestCasei�zjTest output when None is set() as a value and allow_no_value == False.

http://bugs.python.org/issue7005

z[section]
option = None

c���UP
Q5oUOQ2UOQQP2[O2oUO	U2UO2!�F�r0r�r�)r�r�r�r�r�r�)rr:�cprs&&  r
�prepare�Issue7005TestCase.prepare�sJ��
��
/��
���y�!�
���y�(�D�)��k�k�m��
����
��|�|�~�rc���[OP
Q5oUOQ2UO[29^tt^2UOQQP2PPP2P!)%fhP!9hr�)rIr�r�r�r�r�)rr�s& r
�test_none_as_value_stringified�0Issue7005TestCase.test_none_as_value_stringified�sN��
�
&�
&�e�
<��
���y�!�
�
�
�y�
)�
)��F�F�9�h��-�*�
)�
)�
)�r�c�|�UO[O2oUOVO2P!r)r�rIr�r�expected_output)rr1s& r
�"test_none_as_value_stringified_raw�4Issue7005TestCase.test_none_as_value_stringified_raw�s*�����l�:�:�;������!5�!5�6rr")r#r$r%r&�__doc__r�r�r�r�r(r)r*s@r
r�r��s%�����5�O��.�7�7rr�c�,`�\sQsQsn\sQsQsUsP!)�SortedTestCasei�c��UOQ2o[O2oUOU2UO	UO2Q2P!)z [b]
o4=1
o3=2
o2=3
o1=4
[a]
k=v
z,[a]
k = v

[b]
o1 = 4
o2 = 3
o3 = 2
o4 = 1

)rCr�r�r�rr�)rrBr1s&  r
�test_sorted�SortedTestCase.test_sorted�sJ��
�_�_�%�&�������
�����������*�&�	'rr")	r#r$r%r&rr5r�r(r)r*s@r
r�r��s�����I�'�'rr�c�H`�\sQsQsn\O
sQsQsQs	Qs
UsP!)�CompatibleTestCasei�z#;rGc�"�[OQ2oUOU2oUOUO	QQ2Q2UOUO	QQ2Q2UOUO	QQ2Q2P!)z�        [Commented Bar]
        baz=qwe ; a comment
        foo: bar # not a comment!
        # but this is a comment
        ; another comment
        quirk: this;is not a comment
        ; a space must precede an inline comment
        rPr[zbar # not a comment!rYrZ�quirkzthis;is not a comment)r�r�rCrr�r�s&  r
�test_comment_handling�(CompatibleTestCase.test_comment_handling�s|�� ���)�
�
��_�_�]�
+����������7�/�	1���������7��?���������9�0�	2rr")r#r$r%r&rIr�r:r2r3r�r(r)r*s@r
r�r��s&�����/�/�L���!��2�2rr�c�D`�\sQsQsn\O
sQQksQsUs	P!)�CopyTestCasei�c�n�UOU2oUOU2UO2oUOU2UO2FD[oUOUO
6XcJ V0O
*O
2FDvqgVV*U6XfJVVJ	J]	U!r)r=r@r�rr�r7r
)rrAr/rB�cf_copyr�rXras&&&     r
rC�CopyTestCase.fromstring�s���
�^�^�H�
%��
���v���.�.�"�����"���~�~�'�G��|�|�t�3�3�3��"$�%9�%9�":�"@�"@�"B����#�u�,��(�#C�(��rr"r)
r#r$r%r&rIr�r:rCr(r)r*s@r
r�r��s�����,�,�L�
�
rr�c�.`�\sQsQsnQsQsQsUsP!)�FakeFilei�c��[OQQQ5o[UQQ59^tt^2oUO2UmUOO2PPP2P!)%fhP!9h)rEr�r�r�r�)rr�r��	readlines�lines�reverse)r�	file_pathrs&  r
�__init__�FakeFile.__init__�sO���$�$�]�<�H�	�
�)�g�
.�
.�!�����D�J��J�J��� �/�
.�
.�
.�s�0A)�)A:	�2A:	c�r�[UO2%cUOO2!P!r�)r�r��poprs&r
r�FakeFile.readline�s#���t�z�z�?�?��:�:�>�>�#�#�r)r�)r#r$r%r&r�rr(r)r*s@r
r�r��s����!��rr�c#�n �UO2oU%cUw�	UO2oJP!3h)z+As advised in Doc/library/configparser.rst.r)r�lines& r
�readline_generatorr��s(����:�:�<�D�
��
��z�z�|���s�5�5c�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�ReadFileTestCaseic	��[OQQQ5,oUOU]*OQ22SFD�o[
O2o[UQQ59^tt^2oUOU2PPP2UOQU2UOQUQ*2UOUQ*Q*Q2J�	P![cK�h9h)%fhKr9h)	rEr�r��utf8r�r�rQr[rG)rr�r|rP�UnicodeEncodeErrorrIr�r�r�assertInr)r�
file_pathsr�r�rs&    r
�	test_file�ReadFileTestCase.test_files����&�&�}�\�J�K�
�	����j��m�2�2�6�:�;�$�I�!�.�.�0�F��i�'�2�2�a�� � ��#�3��M�M�)�V�,��M�M�%��	�!2�3����V�I�.�u�5�x�@�
$��"�	��	��3�2�s)�'C�3C/	�	C,�(C,�+C,�/C?
�8C?
c�P�[OQ2O2OQ2o[O
2oUO
U2UOQU2UOQUQ*2UOUQ*Q*Q2P!)z%
        [Foo Bar]
        foo=newbarr�rQr[rG)	r�r�r�rwrIr�rr�r)rr�r�s&  r
�
test_iterable�ReadFileTestCase.test_iterables������!���u�w�u�u�T�{�	��*�*�,��������
�
�i��(��
�
�e�V�I�.�/�����	�*�5�1�8�<rc��[O2oUO[29^tt^2UO	[22PPP2UO	[
[222UOQU2UOQUQ*2UOUQ*Q*Q2P!)%fhK9h)z
Issue #11670.rQr[rG)	rIr�r�r�rr�r�r�r�rr�s& r
�test_readline_generator�(ReadFileTestCase.test_readline_generators����*�*�,��
�
�
�y�
)�
)����X�Z�(�*����+�H�J�7�8��
�
�i��(��
�
�e�V�I�.�/�����	�*�5�1�8�<�*�
)�s�C�C	�C	c�&�[OQ2O2OQ2o[O
2oUO
[O29^tt^2oUOUQQ5PPP2UO[WO2Q2[OQ2O2OQ2o[O
2oUO
[O29^tt^2oUOUQQ5PPP2UO[UO2Q2[OQ2O2OQ2o[O
2oUO
[O29^tt^2oUOUQQ5PPP2UO[UO2Q	2[OQ
2O2OQ2o[O
2oUO
[O29^tt^2oUOUQQ5PPP2UO[UO2Q2P!)%fhCKH9h)%fhCK�9h)%fhCK9h)%fhKs9h)z
Issue #18260.z"
        [badbad]
        [badbad]r�sbadbadr"zGWhile reading from b'badbad' [line  2]: section 'badbad' already existsz5
        [badbad]
        bad = bad
        bad = badzWWhile reading from b'badbad' [line  3]: option 'bad' in section 'badbad' already existsz
        [badbad]
        = badz=Source contains parsing errors: b'badbad'
	[line  2]: '= bad'z"
        [badbad
        bad = badzDFile contains no section headers.
file: b'badbad', line: 1
'[badbad')r�r�r�rwrIr�r�r�rrr'r�r�r�r��rr�r��dses&   r
�test_source_as_bytes�%ReadFileTestCase.test_source_as_bytes)sP�����!���U�W�U�U�4�[�	��*�*�,��
�
�
�|�A�A�
B�
B�c����U�9��5�C������
�
��
�	
�
���!���e�g�e�e�D�k�	��*�*�,��
�
�
�|�@�@�
A�
A�S����U�9��5�B������
�
��
&�	
�
���!���%�'�%�%��+�	��*�*�,��
�
�
�|�8�8�
9�
9�S����U�9��5�:������
�
��M�	
����!���e�g�e�e�D�k�	��*�*�,��
�
�
�|�E�E�
F�
F�#����U�9��5�G������
�
��
�	
�GC�
B�
B��B�
A�
A��:�
9�
9��G�
F�sH�1K�!K�K,�L�K	�
K	�K)	�!K)	�,K=	�5K=	�L	�	L	c�8�,QNo[OPP	P
QPQ5oUO[O29^tt^2oUO	U2PPP2UO[
WO2Q2P!)%fhK79h)�[SECT]
)r2r0r6r1r8zZKey without value continued with an indented line.
file: '<???>', line: 3
' KEY2 = VAL2\n')r�zKEY1
z
 KEY2 = VAL2
)rE)rIr�r��MultilineContinuationErrorrrr'r�r�s&   r
�-test_keys_without_value_with_extra_whitespace�>ReadFileTestCase.test_keys_without_value_with_extra_whitespaceXs���
��
�*�*������
���
�
�|�F�F�
G�
G�3����U�#�H������
�
��
 �	
�H�
G�s�B	�	B	�B	r")r#r$r%r&r�r�r�r�r�r(r)r*s@r
r�r�s%����A�=�=�-
�^
�
rr�c�J`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
�CoverageOneHundredTestCaseiqz"Covers edge cases in the codebase.c��[OQQ2oUOUOQ2UOUOQ2UOUO
P2UOUOP2UOUOQ2UO[U2Q2P!)r�r�z3Option 'option' in section 'section' already exists)r�r�NN)	rIr�rr�r�r#�linenor�r'�rr�s& r
�test_duplicate_option_error�6CoverageOneHundredTestCase.test_duplicate_option_errorts����1�1�)�X�F��������	�2�������x�0�������t�,�������t�,�������%F�G�����U��&6�	7rc���[OQQQ2oUOUOQ2UOUOQ2UOUO
Q2P!)r�r��rawval)r�r�r�)rIr�rr�r�r�r�s& r
�test_interpolation_depth_error�9CoverageOneHundredTestCase.test_interpolation_depth_error~sV���4�4�X�y�5=�?��������%D�E�������x�0�������	�2rc�n�UO[29^tt^2o[O2PPP2[OQQ5oUO	UO
Q2[OQ2oUO	UO
Q2P!)%fhKw9h)Nr#r")r�r�rIr�rr#)rr�r�s&  r
�test_parsing_error�-CoverageOneHundredTestCase.test_parsing_error�sw��
�
�
�y�
)�
)�R��%�%�'�*��)�)��:��������x�0��)�)�(�3��������x�0�*�
)�s�B$�$B4	�-B4	c�4�[O2oUOQ2UO[O29^tt^2oUQ*Q*PPP2UO[
WO2Q2UO[O29^tt^2oUQ*Q*PPP2UO[
UO2Q2P!)%fhK�9h)%fhKJ9h)z�
            [section]
            invalid_percent = %
            invalid_reference = %(()
            invalid_variable = %(does_not_exist)s
        r��invalid_percentz.'%' must be followed by '%' or '(', found: '%'�invalid_referencez+bad interpolation variable reference '%(()')rIr�r@r�rUrr'r��rr�r�s&  r
�test_interpolation_validation�8CoverageOneHundredTestCase.test_interpolation_validation�s����*�*�,������	
��
�
�|�D�D�
E�
E���9��/�0�F�����R�\�\�*�->�	?�
�
�
�|�D�D�
E�
E���9��1�2�F�����R�\�\�*�-?�	@�
F�
E��F�
E�s$�C4�4D�4D	�=D	�D	�D	c��[O2oUOQ2UO[	UQ*2Q2P!)z7
            [section]
            key = value
        r�z<Section: section>)rIr�r@r�reprr�s& r
�test_sectionproxy_repr�1CoverageOneHundredTestCase.test_sectionproxy_repr�s@���*�*�,������	
�	
����f�Y�/�0�2F�Grc���[O2o]PH
oUOUOQ$UOQ2UO
QUO2UOUOQQ2]2UOUOQQ2]2UOUQ*OQ2]2UOUQ*OQ2]2U;UO[29^tt^2UOQQ2PPP2UO
QUO2UOQUOQUO2UO[29^tt^2UOQQ2PPP2UO[29^tt^2UQ*OQ2PPP2UO[29^tt^2UQ*OQ2PPP2P!)%fhCK9h)%fhK�9h)%fhKw9h)%fhP!9h)r�decimalzS
            [s1]
            one = 1
            [s2]
            two = 2
        �s1r��s2r�)rIr�r��Decimal�
convertersr@r�r�
getdecimalr�r�r�)rr�r�s&  r
�"test_inconsistent_converters_state�=CoverageOneHundredTestCase.test_inconsistent_converters_state�s����*�*�,���'.������)�$�����	
�	
�
�
�i��!2�!2�3�����*�*�4��7��;�����*�*�4��7��;�������0�0��7��;�������0�0��7��;���
�
�
�~�
.�
.����d�E�*�/��
�
�i��!2�!2�3����i�(�����F�$5�$5�6�
�
�
�~�
.�
.����d�E�*�/�
�
�
�~�
.�
.��4�L�#�#�E�*�/�
�
�
�~�
.�
.��4�L�#�#�E�*�/�
.�/�
.�
.��
/�
.��
.�
.��
.�
.�
.�sH�H*�H>�	I�I$�*H;	�3H;	�>I	�I	�I!	�I!	�$I5	�-I5	r")
r#r$r%r&r�r�r�r�r�r�r�r(r)r*s@r
r�r�qs-����,�7�3�1�@�"H�+�+rr�c�n`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsUsP!)�ExceptionPicklingTestCasei�zBTests for issue #13760: ConfigParser exceptions are not picklable.c�\�]PHo[OQ2o[UO]*2FDooUOV#2oUO
U2oUOUOUO2UO[U2[U22Jq	P!)rra)
�picklerI�Errorr�HIGHEST_PROTOCOL�dumps�loadsr�messager��rr��e1�proto�pickled�e2s&     r
�
test_error�$ExceptionPicklingTestCase.test_error�s{���
�
�
��
(���6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����T�"�X�t�B�x�0�	8rc��QoQQ9p!**o[OP
Q5oUO[O29^tt^2oUO	U2PPP2WO
OO2oUO[U2U]*2UOU]*Q2UOU]**Q]+Q
QU802P!)%fhK�9h)iP�z[*]
z=
)r6z Source contains parsing errors: z	[line �2dz]: )rIr�r�r�r@r�r��
splitlinesrr��assertStartsWith)r�n�err_liner��pr��errliness&      r
�$test_combine_error_linear_complexity�>ExceptionPicklingTestCase.test_combine_error_linear_complexity�s���
���5�(�x�-�-���%�%�U�3��
�
�
�|�8�8�
9�
9�R�
�M�M�!��:��<�<�'�'�2�2�4������X���A��.����h�q�k�+M�N�����"���"�R���H�<�'H�I�:�
9�s�C/�/C?	�8C?	c���]PHo[OQ2o[UO]*2FD�oUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UO[U2[U22J�	P!)rr�)r�rIr�rr�r�r�rr�r�r�r�r�s&     r
�test_nosectionerror�-ExceptionPicklingTestCase.test_nosectionerror�s����
�
(�
(��
3���6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����T�"�X�t�B�x�0�
8rc�B�]PHo[OQQ2o[UO]*2FD�oUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22J�	P!)rr�r�)
r�rIr�rr�r�r�rr�r�r�r�r�r�s&     r
�test_nooptionerror�,ExceptionPicklingTestCase.test_nooptionerror�s����
�
'�
'��)�
<���6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rc��]PHo[OQQ]{2o[UO]*2FCDoUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22CJ	P!)rr�r#)r�rIr�rr�r�r�rr�r�r�r#r�r�r�s&     r
�test_duplicatesectionerror�4ExceptionPicklingTestCase.test_duplicatesectionerror�s����
�
/�
/�	�8�S�
I���6�2�2�Q�6�7�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����R�Y�Y��	�	�2����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rc���]PHo[OQQQ]{2o[UO]*2FCD.oUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22CJ1	P!)rr�r�r#)r�rIr�rr�r�r�rr�r�r�r�r#r�r�r�s&     r
�test_duplicateoptionerror�3ExceptionPicklingTestCase.test_duplicateoptionerrors����
�
.�
.�y�(�H�����6�2�2�Q�6�7�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����R�Y�Y��	�	�2����R�Y�Y��	�	�2����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rc�D�]PHo[OQQQ2o[UO]*2FD�oUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22J�	P!�rr�r��msg)
r�rI�InterpolationErrorrr�r�r�rr�r�r�r�r�r�s&     r
�test_interpolationerror�1ExceptionPicklingTestCase.test_interpolationerrors����
�
,�
,�X�y�%�
H���6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rc��]PHo[OQQQQ2o[UO]*2FCDoUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22CJ	P!)rr�r�r�r�)r�rIr�rr�r�r�rr�r�r�r�r�r�r�s&     r
�$test_interpolationmissingoptionerror�>ExceptionPicklingTestCase.test_interpolationmissingoptionerrors����
�
9�
9�(�I��k�#���6�2�2�Q�6�7�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����R�Y�Y��	�	�2����R�\�\�2�<�<�8����T�"�X�t�B�x�0�8rc�D�]PHo[OQQQ2o[UO]*2FD�oUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22J�	P!r)
r�rIrUrr�r�r�rr�r�r�r�r�r�s&     r
�test_interpolationsyntaxerror�7ExceptionPicklingTestCase.test_interpolationsyntaxerror)s����
�
2�
2�8�Y��
N���6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rc�D�]PHo[OQQQ2o[UO]*2FD�oUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22J�	P!)rr�r�r�)
r�rIr�rr�r�r�rr�r�r�r�r�r�s&     r
�test_interpolationdeptherror�6ExceptionPicklingTestCase.test_interpolationdeptherror5s����
�
1�
1�(�I�����6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Z�Z����4����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rc�H�]PHo[OQ2oUO]Q2UO]Q2UO]Q2[	UO
]*2FD�oUO
V#2oUOU2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22J�	[OQ2oUO]Q2UO]Q2UO]Q2[	UO
]*2FD�oUO
V#2oUOU2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22J�	P!)rr#�line1�line2�line3�filename)r�rIr�r|rr�r�r�rr�r�r#�errorsr�r�s&     r
�test_parsingerror�+ExceptionPicklingTestCase.test_parsingerrorBs����
�
&�
&�x�
0��
�	�	�!�W��
�	�	�!�W��
�	�	�!�W���6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Y�Y��	�	�2����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8��
&�
&�z�
2��
�	�	�!�W��
�	�	�!�W��
�	�	�!�W���6�2�2�Q�6�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�Y�Y��	�	�2����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rc��]PHo[OQ]{Q2o[UO]*2FCDoUOV#2oUO
U2oUOUOUO2UOUOUO2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22CJ	P!)rr$r�)r�rIr�rr�r�r�rr�r�r�r#r�r�r�s&     r
�test_missingsectionheadererror�8ExceptionPicklingTestCase.test_missingsectionheadererror]s����
�
3�
3�J��V�
L���6�2�2�Q�6�7�7�E��l�l�2�-�G����g�&�B����R�Z�Z����4����R�W�W�b�g�g�.����R�W�W�b�g�g�.����R�Y�Y��	�	�2����R�Y�Y��	�	�2����T�"�X�t�B�x�0�8rr")r#r$r%r&r�r�rrr	rrrrrrr&r)r(r)r*s@r
r�r��sJ����L�1�J�	1�
1�1�
1�
1�1�
1�1�1�61�1rr�c�,`�\sQsQsnQsQsQsUsP!)�InlineCommentStrippingTestCaseikzyTests for issue #14590: ConfigParser doesn't strip inline comment when
delimiter occurs earlier without preceding space..c�p�[OQQ5oUOQ2UQ*oUOUQ*Q2UOUQ*Q2UOUQ*Q	2UOUQ
*Q2UOUQ*Q
2UOUQ*Q2UOUQ*Q2UQ*oUOUQ*Q2UOUQ*Q2UOUQ*Q2P!)rG)r3a�
        [section]
        k1 = v1;still v1
        k2 = v2 ;a comment
        k3 = v3 ; also a comment
        k4 = v4;still v4 ;a comment
        k5 = v5;still v5 ; also a comment
        k6 = v6;still v6; and still v6 ;a comment
        k7 = v7;still v7; and still v7 ; also a comment

        [multiprefix]
        k1 = v1;still v1 #a comment ; yeah, pretty much
        k2 = v2 // this already is a comment ; continued
        k3 = v3;#//still v3# and still v3 ; a comment
        r��k1zv1;still v1�k2�v2�k3�v3�k4zv4;still v4�k5zv5;still v5�k6zv6;still v6; and still v6�k7zv7;still v7; and still v7�multiprefixzv3;#//still v3# and still v3)rGrHr�)rIr�r@r)r�cfgr�s&  r
�test_stripping�-InlineCommentStrippingTestCase.test_strippingos	���'�'�A�������	
�
�	�N������4��-�0�����4��$�'�����4��$�'�����4��-�0�����4��-�0�����4��"=�>�����4��"=�>��
�������4��-�0�����4��$�'�����4��"@�Arr")r#r$r%r&r�r9r(r)r*s@r
r,r,ks����:�B�Brr,c�D`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�ExceptionContextTestCasei�zJTest that implementation details doesn't leak
through raising exceptions. c�N�[O2oUOQ2UO[O2oU9^tt^2UOQQ2PPP2UO
UOOP	2P!)%fhK89h)z�
        [Paths]
        home_dir: /Users
        my_dir: %(home_dir1)s/lumberjack
        my_pictures: %(my_dir)s/Pictures
        �Paths�my_dir)	rIr�r@r�r�r�r�r��__suppress_context__r�s&  r
�test_get_basic_interpolation�5ExceptionContextTestCase.test_get_basic_interpolation�ss���*�*�,������	
��
�
�|�K�K�
L��
�R��J�J�w��)���
�
�b�l�l�7�7��>��R�s�B�B$	�B$	c�x�[O[O2Q5oUOQ2UO	[O
2oU9^tt^2UO
QQ2PPP2UOUOOP	2P!)%fhK89h)r�z�
        [Paths]
        home_dir: /Users
        my_dir: ${home_dir1}/lumberjack
        my_pictures: ${my_dir}/Pictures
        r>r?)
rIr�r�r@r�r�r�r�r�r@r�s&  r
�test_get_extended_interpolation�8ExceptionContextTestCase.test_get_extended_interpolation�s����*�*�$�:�:�<�>������	
��
�
�|�K�K�
L��
�R��J�J�w��)���
�
�b�l�l�7�7��>��R�s�&B)�)B9	�2B9	c�H�[O2oUOQ2UO[O29^tt^2oUOQ2PPP2UO
WOOP	2P!)%fhK89h)z2
        [Paths]
        home_dir: /Users
        ry)	rIr�r@r�r�r�r�r�r@r�s&  r
�test_missing_options�-ExceptionContextTestCase.test_missing_options�sp���*�*�,������	
��
�
�|�:�:�
;�
;�r��N�N�6�"�<��
�
�b�l�l�7�7��>�<�
;�s�B�B!	�B!	c�*�[O2oUO[O29^tt^2oUO	QQQ2PPP2UOWOOP	2P!)%fhK89h)�Section1�an_int�15)rIr�r�r�r�r�r�r@�rr�r�s&  r
�test_missing_section�-ExceptionContextTestCase.test_missing_section�s_���*�*�,��
�
�
�|�:�:�
;�
;�r��J�J�z�8�T�2�<��
�
�b�l�l�7�7��>�<�
;�s�B�B	�B	c�(�[O2oUO[O29^tt^2oUO	QQ2PPP2UOWOOP	2P!)%fhK89h)rJrK)rIr�r�r�r�r�r�r@rMs&  r
�test_remove_option�+ExceptionContextTestCase.test_remove_option�s_���*�*�,��
�
�
�|�:�:�
;�
;�r�� � ��X�6�<��
�
�b�l�l�7�7��>�<�
;�s�B�B	�
B	r")r#r$r%r&r�rArDrGrNrQr(r)r*s@r
r<r<�s(����$�?�?�?�?�?�?rr<c�Z``�\sQsQsnQs\OsQU1QkksQs	Qs
UsU9s!)�ConvertersTestCasei�z Introduced in 3.5, issue #18159.c�J:�[RU_UQ5oQUOQ$U!)r�c��UO2Tt,tFD+oUO2%fJUO2MJ-	to!ttohr)rwr�)�vr�s& r
r�.ConvertersTestCase.newconfig.<locals>.<lambda>�s6��A�G�G�I�1?�I�q�45�G�G�I�2;�����I�1?��1?s
�A	�A	r�)�superr=r�)rr/r<�	__class__s&& �r
r=�ConvertersTestCase.newconfig�s,����7�$�h�$�7��'?����F�#��rc��UO2oUOQUO2UOQUO2UOUOQ*2UOUOQ*2UOUOQ*2UO	UOQ*2UO[
UO2]2UO[29^tt^2QUOP$PPP2UO[29^tt^2QUOP$PPP2UOQ2UQ*oUOUQ*Q	2UOUQ*Q
2UOUQ*Q2UOUQ*Q2UOUQ
*Q2UOUOQQ2Q	2UOUOQQ2Q
2UOUOQQ2Q2UOUOQQ2Q2UOUOQQ
2Q2UOUOQQ2Q	2UOUOQQ2]2UOUOQQ2Q2UOUOQQ2,QN2UOUOQQ
2P	2UOUOQ2Q	2UOUOQ2]2UOUOQ2Q2UOUOQ2,QN2UOUOQ
2P	2UO[29^tt^2UO!QQ2PPP2UO[29^tt^2UO!Q2PPP2]PHFoUO$UOQ$UOQUO2UO	UOQ*2UO[
UO2]2UO%Q2oUOUO!QQ2U2UOUO!Q2U2UOQUO'QUO2UO[
UO2]2UO[29^tt^2UO!QQ2PPP2UO[29^tt^2UO!Q2PPP2UO[(29^tt^2UOQPPP2UO[(29^tt^2UOPPPP2UO[(29^tt^2UOPPPP2P!)%fhCKv9h)%fhCKT9h)%fhCK�9h)%fhCKy9h)%fhCK39h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)rhr�rdrfc��U!rr"�rWs&r
r�4ConvertersTestCase.test_converters.<locals>.<lambda>�s��1rc��U!rr"r^s&r
rr_�s��Qrz~
        [s]
        str = string
        int = 1
        float = 0.5
        list = a b c d e f g
        bool = yes
        r�r'rAruz0.5z
a b c d e f g�boolrsg�?r�)r�r��c�dr�r�g)r=r�r�r��assertIsNotNonerr�r�r�r@r�r�r��getlistr�r�r�r�r�r�r�)rr8r�r��dec0_5s&    r
�test_converters�"ConvertersTestCase.test_converters�s'���n�n����
�
�i����0��
�
�f�c�n�n�-����#�.�.��/�0����#�.�.��1�2����#�.�.��3�4����S�^�^�F�3�4�����S�^�^�,�a�0�
�
�
�z�
*�
*�!,�C�N�N�2��+�
�
�
�z�
*�
*�#.�C�N�N�4� �+�����	
�
��H������5��8�,�����5��3�'�����7��U�+�����6��O�4�����6��E�*��������e�,�h�7��������e�,�c�2��������g�.��6��������f�-��?��������f�-�u�5��������e�,�h�7�������C��/��3�������c�7�3�S�9�������S�&�1�4C�	D��������V�4�d�;�������u��x�0�������%��!�,�������G�,�c�2�������6�*�-<�	=�������f�-�t�4�
�
�
�~�
.�
.��N�N�3��(�/�
�
�
�~�
.�
.�
�L�L��!�/��$+�O�O����y�!��
�
�i����0����S�^�^�I�6�7�����S�^�^�,�a�0�����'���������W�5�v�>�������g�.��7��N�N�9�%�����C�N�N�3�����S�^�^�,�a�0�
�
�
�~�
.�
.��N�N�3��(�/�
�
�
�~�
.�
.�
�L�L��!�/�
�
�
�x�
(�
(����y�)�)�
�
�
�x�
(�
(����r�"�)�
�
�
�x�
(�
(����t�$�)�
(�u+�
*�
*��
*�
*�
*��B/�
.�
.��
.�
.�
.��/�
.�
.��
.�
.�
.��
(�
(��
(�
(��
(�
(�
(�s��Z�
Z&�Z:�[�%["�[6�\
�\�:\0�Z#	�Z#	�&Z7	�/Z7	�:[	�[	�[	�[	�"[3	�+[3	�6\	�?\	�
\	�\	�\-	�&\-	�0]	�9]	r"r)
r#r$r%r&r�rIr�r:r=rhr(r)�
__classcell__�rZr+s@@r
rTrT�s$����*��,�,�L��D%�D%rrTc�B`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�!BlatantOverrideConvertersTestCaseizyWhat if somebody overrode a getboolean()? We want to make sure that in
this case the automatic converters do not kick in.z�
        [one]
        one = false
        two = false
        three = long story short

        [two]
        one = false
        two = false
        three = four
    c���[OQ[-Q5oUOUO2UOU2UO
UOQ*2P!)r�)r�)rIr�r�r@r��	_test_lenrer��rr8s& r
�test_converters_at_init�9BlatantOverrideConvertersTestCase.test_converters_at_init'sI���'�'�E�3�<�@��������$����s�����S�^�^�E�2�3rc�&�QQ[O2oU2oUOUO2UO	U2UOUOQ*2UOUOQQ22UOUOQQ22UOUOQQ22UOUOQQ22UOUOQ$UOUOQQ22UOUOQQ22UOUOQQ22UOUOQQ22P!)c�``�\sQsQsnQsQP
QPQ\O-U1QkksQP
QPQ\O-QksQs	Us
U9s!)	�OBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParseri.z0a historic borough in south central Pennsylvaniartrqroc�::�V6XcP	![RU_VV4UQ5!)T�rtrqro)rYr�)rr�r�rtrqrorZs&&&$$$�r
r��ZBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getboolean1s*����$���w�)�'�s�3;�*�=�=rc	�6�UOV[V4UQ5!)rw)�	_get_convr�)rr�r�rtrqros&&&$$$r
�getlen�VBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getlen7s!���~�~�g�s��/7�&�9�9rr")r#r$r%r&�
gettysburgrIrLr�r{r(r)rjrks@@r
�StrangeConfigParserru.sQ����K�J�
=��
=�T�
=�!-�!4�!4�
=�
9�U�
9��
9� ,� 3� 3�
9�
9rr~r�r�r�rh)rIr�r@r�ror�r�r�r�r��_convert_to_boolean)rr~r8s&  r
�test_inheritance�2BlatantOverrideConvertersTestCase.test_inheritance-s)��	9�,�";�";�	9�"�#��������$����s�����#�.�.��/�0�������u�e�4�5�������u�e�4�5��������u�5�6��������u�5�6�$'�$;�$;����y�!��������u�5�6��������u�5�6��������u�5�6��������u�5�6rc���UO[UO2]2UOQUO2UOQUO2UO	QUO2UOUOQ*2UOUOQ*2UOUOQ*2UOUO
QQ2]2UOUO
QQ2]2UOUO
QQ2]2UOUO
QQ2]2UOUO
QQ2]2UOUO
QQ2]2UOUO
QQ	]Q
5]2UO[O29^tt^2UO
QQ	2PPP2UOUQ*O
Q2]2UOUQ*O
Q2]2UOUQ*O
Q2]2UOUQ*O
Q2]2UOUQ*O
Q2]2UOUQ*O
Q2]2UOUQ*O
Q	]2]2UOUQ*O
Q	2P2P!)%fhCKT9h)�rhr��tysburgrdrfr�r�r��fourrn)
rr�r�r�r�r�r{r�rIr�rps&&r
ro�+BlatantOverrideConvertersTestCase._test_lenJs�������S�^�^�,�a�0��
�
�i����0��
�
�e�S�^�^�,�����C�N�N�3����#�.�.��/�0����#�.�.��1�2����#�.�.��3�4�������E�5�1�1�5�������E�5�1�1�5�������E�7�3�R�8�������E�5�1�1�5�������E�5�1�1�5�������E�7�3�Q�7�������E�6�A��>��B�
�
�
�|�9�9�
:�
:��J�J�u�f�%�;�����U��*�*�5�1�1�5�����U��*�*�5�1�1�5�����U��*�*�7�3�R�8�����U��*�*�5�1�1�5�����U��*�*�5�1�1�5�����U��*�*�7�3�Q�7�����U��*�*�6�1�5�q�9�����U��*�*�6�2�D�9�;�
:�
:�s�8M�M'	�M'	c�v`�[O2nQRmU1QkRmRO	UO
2UO
[RO2]2UOQRO2UOQRO2UOROQ*2UOROQ*2UOROQ*2UOROQQ22UOROQQ22UOROQQ22UOROQQ22ROROQ$UOROQQ22UOROQQ22UOROQQ22UOROQQ22UO
ROQQ2]2UO
ROQQ2]2UO
ROQQ2]2UO
ROQQ2]2UO
ROQQ2]2UO
ROQQ2]2UO[ 29^tt^2UO
RQ*OQ2]2PPP2UO[ 29^tt^2UO
RQ*OQ2]2PPP2P!)%fhK`9h)%fhP!9h)	c��P	!)Tr")r�r�s&&r
r�LBlatantOverrideConvertersTestCase.test_instance_assignment.<locals>.<lambda>fs��rc�8:�[RU*U*2!r)r�)r�r�r8s&&�r
rr�gs���S��W��f�1E�-Frrhr�rdrfr�r�r�)rIr�r�r{r@r�rr�r�r�r�r�r�rr�r�r�rps&@r
�test_instance_assignment�:BlatantOverrideConvertersTestCase.test_instance_assignmentds�����'�'�)��5���F��
�������$�����S�^�^�,�a�0��
�
�i����0��������/����#�.�.��/�0����#�.�.��1�2����#�.�.��3�4�������u�e�4�5�������u�e�4�5�������u�e�4�5�������u�e�4�5�$'�$;�$;����y�!��������u�5�6��������u�5�6��������u�5�6��������u�5�6�������E�5�1�1�5�������E�5�1�1�5�������E�7�3�R�8�������E�5�1�1�5�������E�5�1�1�5�������E�7�3�Q�7��
�
�~�
.�
.����S��Z�.�.�u�5�q�9�/�
�
�
�~�
.�
.����S��Z�.�.�u�5�q�9�/�
.�/�
.��
.�
.�
.�s$�)N�!)N'�N$	�N$	�'N8	�0N8	r")r#r$r%r&r�r�rqr�ror�r(r)r*s@r
rmrms*����:�
�F�4�7�::�4:�:rrmc�L`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
�SectionlessTestCasei�c�X�[OP	Q5oUOU2U!)T��allow_unnamed_section)rIr�r@)rrAr8s&& r
rC�SectionlessTestCase.fromstring�s#���'�'�d�C��������
rc�(�UOQ2oUO[[OQ,2[UO222UOQU[O*Q*2UOQU[O*Q*2UOQUQ*Q*2[O2oUOU2UOUO22oUOQU[O*Q*2UOQU[O*Q*2UOQUQ*Q*2P!)zC
        a = 1
        b = 2
        [sect1]
        c = 3
        �sect1rur�rwr��3rb)
rCrr�rI�UNNAMED_SECTIONr~r�r�r�r��r�cfg1r1�cfg2s&   r
�test_no_first_section�)SectionlessTestCase.test_no_first_section�s"����� �
��	
����l�:�:�G�D�E�s�4�=�=�?�G[�\�����d�<�#?�#?�@��E�F�����d�<�#?�#?�@��E�F�����d�7�m�C�0�1�������
�
�6�����v���0�1��	
����d�<�#?�#?�@��E�F�����d�<�#?�#?�@��E�F�����d�7�m�C�0�1rc���UOQ2oUO[O,UO	22UOQU[O*Q*2UOQU[O*Q*2[
O2oUOU2UOUO22oUO[O,UO	22UOQU[O*Q*2UOQU[O*Q*2P!)z%
        a = 1
        b = 2
        rur�rwr�)	rCrrIr�r~r�r�r�r�r�s&   r
�test_no_section�#SectionlessTestCase.test_no_section�s����� �
��
	
���,�6�6�7�����I�����d�<�#?�#?�@��E�F�����d�<�#?�#?�@��E�F�������
�
�6�����v���0�1�����,�6�6�7�����I�����d�<�#?�#?�@��E�F�����d�<�#?�#?�@��E�Frc�"�[OP	Q5oUO[O2UOQ2[O
2oUO
U2UOUO2Q2P!)Tr�r�z[section]

)	rIr�r�r�r�r�r�rr��rr8r1s&  r
�test_empty_unnamed_section�.SectionlessTestCase.test_empty_unnamed_section�s^���'�'�d�C������4�4�5����	�"�������	�	�&��������*�O�<rc���[OP	Q5oUO[O2UO	[OQQ2UOQU[O*Q*2[O2oUOU2UOUO2Q2[OP	Q5oQQ-U[O$UOQU[O*Q*2[O2oUOU2UOUO2Q2P!)Tr�r�ruza = 1

)
rIr�r�r�r�rr�r�r�r�r�s&  r
�test_add_section�$SectionlessTestCase.test_add_section�s����'�'�d�C������4�4�5�����,�,�c�3�7�����c�,�">�">�?��D�E�������	�	�&��������*�K�8��'�'�d�C��-0�#�J��L�(�(�)�����c�,�">�">�?��D�E�������	�	�&��������*�K�8rc��UO[O29^tt^2[O2O	Q2PPP2UO[O
29^tt^2[O2O
[O2PPP2UO[O
29^tt^2QQ-[O2[O$PPP2P!)%fhK�9h)%fhK}9h)%fhP!9h)�a = 1r�ru)r�rIr�r�r@�UnnamedSectionDisabledErrorr�r�rs&r
�test_disabled_error�'SectionlessTestCase.test_disabled_error�s���
�
�
�|�E�E�
F�
F��%�%�'�3�3�G�<�G��
�
�|�G�G�
H�
H��%�%�'�3�3�L�4P�4P�Q�I��
�
�|�G�G�
H�
H�IL�c�
�L�%�%�'��(D�(D�E�I�
H�
G�
F��I�
H��I�
H�
H�s5�%D�=3D%�)D8�D"	�D"	�%D5	�.D5	�8E		�E		c��[OP	Q5oUOQ2UOQ2UO[O,UO22UOQU[O*Q*2UOQU[O*Q*2P!)Tr�r�zb = 2rur�rwr�)rIr�r@rr�r~rps& r
�test_multiple_configs�)SectionlessTestCase.test_multiple_configs�s����'�'�d�C������ ����� ����,�6�6�7�����H�����c�,�">�">�?��D�E�����c�,�">�">�?��D�Err")
r#r$r%r&rCr�r�r�r�r�r�r(r)r*s@r
r�r��s1�����
2�,G�$=�9� S�F�Frr�c�2`�\sQsQsnQsQsQsQsUsP!)�InvalidInputTestCasei�z�Tests for issue #65697, where configparser will write configs
it parses back differently. Ex: keys containing delimiters or
matching the section patternc�p�[OQQ5oUOQ2UOQQQ2[O
2oUO
[O29^tt^2UOU2PPP2UO2P!)%fhK"9h)rE)r1r^za=brb�
rIr�r�r�r�r�r��InvalidWriteErrorr��closer�s&  r
�test_delimiter_in_key�*InvalidInputTestCase.test_delimiter_in_key�ss���'�'�C�9�����
�#����
�E�3�'������
�
�
�|�=�=�
>�
>��I�I�f��?�����?�
>�s�9B%�%B5	�.B5	c�l�[O2oUOQ2UOQQQ2[O
2oUO
[O29^tt^2UOU2PPP2UO2P!)%fhK"9h)r^z[this parses back as a section]r[r�r�s&  r
�test_section_bracket_in_key�0InvalidInputTestCase.test_section_bracket_in_key�sr���'�'�)�����
�#����
�=�u�E������
�
�
�|�=�=�
>�
>��I�I�f��?�����?�
>�s�7B#�#B3	�,B3	r")	r#r$r%r&r�r�r�r(r)r*s@r
r�r��s����$���rr�c�2`�\sQsQsnQsQsQsQsUsP!)�
ReDoSTestCasei�z>Regression tests for quadratic regex backtracking (gh-146333).c��[O2oQQQ**Q*Q*oUO[O29^tt^2UO	U2PPP2P!)%fhP!9h)z
[section]
r��@��yr��[section]
x)rIr�r�r�r@�rr��contents&  r
�$test_option_regex_does_not_backtrack�2ReDoSTestCase.test_option_regex_does_not_backtrack�s`���-�-�/��%��e��3�c�9�D�@���
�
�|�8�8�
9�
9����w�'�:�
9�
9�
9�s�A8�8B		�B		c��[OP	Q5oQQQ**Q*Q*oUOU2UOUO	QQQQ**Q*22P!)	Tr�rr�r�r�r�r�r�)rIr�r@r�r�r�s&  r
�-test_option_regex_no_value_does_not_backtrack�;ReDoSTestCase.test_option_regex_no_value_does_not_backtrack	s_���-�-�T�B��%��e��3�c�9�D�@�����7�#�����)�)�)�S�3��;�5F��5L�M�Nrr")	r#r$r%r&r�r�r�r(r)r*s@r
r�r��s����H�(�O�Orr�c�(`�\sQsQsnQsQsUsP!)�MiscTestCasei
	c�D�[OU[Q.Q5P!)r�)�not_exported)r�check__all__rIrs&r
�test__all__�MiscTestCase.test__all__	s�����T�<�w�i�Hrr")r#r$r%r&r�r(r)r*s@r
r�r�
	s����I�Irr��__main__)2�collectionsrIr�r�r��unittestryr�test.supportr�UserDictrr-rN�TestCaser~r�r�r�r�r�r�r�rrrrYr[rergrir�r�r�r�r�r�r�r�r�r,r<rTrmr�r�r�r�r#�mainr"rr
�<module>r�s�����	�	����"���%�%��.��BK
8�*�K
8�\�]�H�$5�$5��
VM�=�(�*;�*;�VM�r!"�-��9J�9J�!"�FC�8�3D�3D�C�*�0D�*� �4H� �D�m�X�->�->�D�:0C�m�X�->�->�0C�f*�3J�*�I�#9�8�;L�;L�I�(h@�
�x�?P�?P�h@�V�"6��3�&<�3�6-�#����-�0�#����0�*.�%;�X�=N�=N�*.�Z7��)�)�7�:'�,�'�.2�/��1B�1B�2�,�=�(�"3�"3��&
�
��f
�x�(�(�f
�VO+��!2�!2�O+�de1�� 1� 1�e1�P!B�X�%6�%6�!B�H3?�x�0�0�3?�lO%���(9�(9�O%�dl:��(9�(9�l:�^XF�(�+�+�XF�v�8�,�,��0O�H�%�%�O�(I�8�$�$�I�
�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit