403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.6
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u119869361 ( 9600978)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/breezy/bzr/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/breezy/bzr/tests/__pycache__/test_chk_map.cpython-313.pyc
�

p��gA���T�SrSSKJrJrJr SSKJrJr SSKJrJrJ	r	J
r
 "SS\R5r"SS	\R5r"S
S\5r"SS
\5r"SS\5rSrSr"SS\5r"SS\5r"SS\5r"SS\5r"SS\5rg)z6Tests for maps built on a CHK versionedfiles facility.�)�errors�osutils�tests�)�chk_map�
groupcompress)�CHKMap�InternalNode�LeafNode�Nodec�8�\rSrSrSrSrSrSrSrSr	Sr
g	)
�TestNode�c�.�[R"X#5nUR[U5[U5:*5 UR[U5[U5:*5 UR	X$5 UR	X45 URX5 g�N)r�
common_prefix�
assertTrue�len�assertStartsWith�assertEqual)�self�expected_common�prefix�key�commons     �?/usr/lib/python3/dist-packages/breezy/bzr/tests/test_chk_map.py�assertCommonPrefix�TestNode.assertCommonPrefixsn���#�#�F�0������F��s�6�{�2�3�����F��s�3�x�/�0����f�-����c�*�����1�c�*�URSSS5 g)Nsbeg�begin�r�rs r�test_common_prefix�TestNode.test_common_prefix!s��������9rc�*�URSSS5 g)Nrr!�endr"r#s r�test_no_common_prefix�TestNode.test_no_common_prefix$s������X�v�6rc�*�URSSS5 g)Nr!r"r#s r�
test_equal�TestNode.test_equal's������(�H�=rc�*�URSSS5 g)N�br!r"r#s r�test_not_a_prefix�TestNode.test_not_a_prefix*s������h��5rc�v�URSSS5 URSSS5 URSSS5 g)Nrr'r!r"r#s r�
test_empty�TestNode.test_empty-s8������S�&�1�����X�s�3�����S�#�.r�N)�__name__�
__module__�__qualname__�__firstlineno__rr$r(r+r/r2�__static_attributes__r4rrrrs ��2�:�7�>�6�/rrc�2�\rSrSrSrSSjrSrSrSrg)	�TestCaseWithStore�3c��[R"SSS5nU"UR55UlUR$)NF�)r�make_pack_factory�
get_transport�	chk_bytes)r�factorys  r�
get_chk_bytes�TestCaseWithStore.get_chk_bytes4s5���1�1�%���B�� ��!3�!3�!5�6����~�~�rNc���UcUR5n[R"UUUUUS9n[R"UUUUUS9nUR	UUS5 [X6US9nU$)N��maximum_size�	key_width�search_key_funcz7CHKMap.from_dict() did not match CHKMap._create_via_map�rI)rCr	�	from_dict�_create_via_mapr)	r�a_dictrGrArHrI�root_key�	root_key2�chkmaps	         r�_get_map�TestCaseWithStore._get_map:s������*�*�,�I��#�#���%��+�
���*�*���%��+�
�	�	
�����E�	
�
�	�_�M���
rc���URU/SS5n[U5nURS:Xa URSR	U55 URS5$)N�	unorderedT�absentz!Store does not contain the key {}�fulltext)�get_record_stream�next�storage_kind�fail�format�get_bytes_as)rrAr�stream�records     r�
read_bytes�TestCaseWithStore.read_bytesUsX���,�,�c�U�K��F���f������(�*��I�I�9�@�@��E�F��"�"�:�.�.rc�2�[UR"U65$r)�dict�	iteritems)r�node�argss   r�to_dict�TestCaseWithStore.to_dict\s���D�N�N�D�)�*�*r�rA)�Nr>N)	r5r6r7r8rCrQr_rfr9r4rrr;r;3s���TX��6/�+rr;c�n^�\rSrSrU4SjrSSjrSSjrSSjrSSjrSSjr	SSjr
SS	jrS
rU=r
$)
�TestCaseWithExampleMaps�`c�^>�[USS5c[TU]	5UlUR$)N�
_chk_bytes)�getattr�superrCrn)r�	__class__s �rrC�%TestCaseWithExampleMaps.get_chk_bytesas+����4��t�,�4�#�g�3�5�D�O����rc�F�URUUUR5US9nU$)N)rGrArI)rQrC)rrMrGrI�c_maps     r�get_map�TestCaseWithExampleMaps.get_mapfs1���
�
��%��(�(�*�+�	�
���rc�(�URSSS.US9$)N�initial aaa content�initial abb content)��aaa�sabbrJ�ru�rrIs  r�make_root_only_map�*TestCaseWithExampleMaps.make_root_only_mapo�(���|�|�1�1�
�,��
�	
rc�(�URSSS.US9$)Nrx�initial ddd content)rz�sdddrJr}r~s  r�make_root_only_aaa_ddd_map�2TestCaseWithExampleMaps.make_root_only_aaa_ddd_mapxr�rc�,�URSSSSS.US9$)Nrxry�initial ccc contentr��rzr|�scccr�rJr}r~s  r�make_one_deep_map�)TestCaseWithExampleMaps.make_one_deep_map�s.���|�|�1�1�1�1�	
�,��
�	
rc�6�URSSSSSSSSS	S
.	US9$)Nrxry�initial acc content�initial ace content�initial add content�initial adh content�initial adl contentr�r�)	rzr|�sacc�sace�sadd�sadh�sadlr�r�rJr}r~s  r�make_two_deep_map�)TestCaseWithExampleMaps.make_two_deep_map�s?���|�|�1�1�1�1�1�1�1�1�1�

�,��

�
	
rc�,�URSSSSS.US9$)zyCreate a map with one internal node, but references are extra long.

Otherwise has similar content to make_two_deep_map.
rxr�r�r�)rzr�r�r�rJr}r~s  r�make_one_deep_two_prefix_map�4TestCaseWithExampleMaps.make_one_deep_two_prefix_map�s0��
�|�|�1�1�1�1�	
�,��
�	
rc�,�URSSSSS.US9$)z�Create a map with one internal node, but references are extra long.

Similar to make_one_deep_two_prefix_map, except the split is at the
first char, rather than the second.
r�r�r�sinitial bbb content)r�r�r��sbbbrJr}r~s  r�make_one_deep_one_prefix_map�4TestCaseWithExampleMaps.make_one_deep_one_prefix_map�s0���|�|�1�1�1�1�	
�,��
�	
r)rn)�dNr)r5r6r7r8rCrurr�r�r�r�r�r9�
__classcell__)rqs@rrkrk`s0����
�
�
�

�
�&

�
�
rrkc�`�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrg)�TestTestCaseWithExampleMaps�z'Actual tests for the provided examples.c�d�UR5nURSUR55 g)N�V'' LeafNode
      ('aaa',) 'initial aaa content'
      ('abb',) 'initial abb content'
)r�assertEqualDiff�
_dump_tree�rrts  r�test_root_only_map_plain�4TestTestCaseWithExampleMaps.test_root_only_map_plain�s1���'�'�)�����
5�
����		
rc�~�UR[RS9nURSUR	55 g)NrJr�)rr�_search_key_16r�r�r�s  r�test_root_only_map_16�1TestTestCaseWithExampleMaps.test_root_only_map_16�s<���'�'��8N�8N�'�O�����
5�
����		
rc�d�UR5nURSUR55 g)Nz�'' InternalNode
  'a' LeafNode
      ('aaa',) 'initial aaa content'
      ('abb',) 'initial abb content'
  'c' LeafNode
      ('ccc',) 'initial ccc content'
  'd' LeafNode
      ('ddd',) 'initial ddd content'
)r�r�r�r�s  r�test_one_deep_map_plain�3TestTestCaseWithExampleMaps.test_one_deep_map_plain�s1���&�&�(�����
5�
����
	
rc�~�UR[RS9nURSUR	55 g)NrJz�'' InternalNode
  '2' LeafNode
      ('ccc',) 'initial ccc content'
  '4' LeafNode
      ('abb',) 'initial abb content'
  'F' LeafNode
      ('aaa',) 'initial aaa content'
      ('ddd',) 'initial ddd content'
)r�rr�r�r�r�s  r�test_one_deep_map_16�0TestTestCaseWithExampleMaps.test_one_deep_map_16�s<���&�&�w�7M�7M�&�N�����
5�
����
	
rc�d�UR5nURSUR55 g)N�V'' LeafNode
      ('aaa',) 'initial aaa content'
      ('ddd',) 'initial ddd content'
)r�r�r�r�s  r�test_root_only_aaa_ddd_plain�8TestTestCaseWithExampleMaps.test_root_only_aaa_ddd_plain�s1���/�/�1�����
5�
����		
rc�~�UR[RS9nURSUR	55 g)NrJr�)r�rr�r�r�r�s  r�test_root_only_aaa_ddd_16�5TestTestCaseWithExampleMaps.test_root_only_aaa_ddd_16�s>���/�/��@V�@V�/�W��	
���
5�
����		
rc�d�UR5nURSUR55 g)Na�'' InternalNode
  'a' InternalNode
    'aa' LeafNode
      ('aaa',) 'initial aaa content'
    'ab' LeafNode
      ('abb',) 'initial abb content'
    'ac' LeafNode
      ('acc',) 'initial acc content'
      ('ace',) 'initial ace content'
    'ad' LeafNode
      ('add',) 'initial add content'
      ('adh',) 'initial adh content'
      ('adl',) 'initial adl content'
  'c' LeafNode
      ('ccc',) 'initial ccc content'
  'd' LeafNode
      ('ddd',) 'initial ddd content'
)r�r�r�r�s  r�test_two_deep_map_plain�3TestTestCaseWithExampleMaps.test_two_deep_map_plains1���&�&�(�����
5�"
����%	
rc�~�UR[RS9nURSUR	55 g)NrJa�'' InternalNode
  '2' LeafNode
      ('acc',) 'initial acc content'
      ('ccc',) 'initial ccc content'
  '4' LeafNode
      ('abb',) 'initial abb content'
  'C' LeafNode
      ('ace',) 'initial ace content'
  'F' InternalNode
    'F0' LeafNode
      ('aaa',) 'initial aaa content'
    'F3' LeafNode
      ('adl',) 'initial adl content'
    'F4' LeafNode
      ('adh',) 'initial adh content'
    'FB' LeafNode
      ('ddd',) 'initial ddd content'
    'FD' LeafNode
      ('add',) 'initial add content'
)r�rr�r�r�r�s  r�test_two_deep_map_16�0TestTestCaseWithExampleMaps.test_two_deep_map_16s<���&�&�w�7M�7M�&�N�����
5�&
����)	
rc�d�UR5nURSUR55 g)Nz�'' InternalNode
  'aa' LeafNode
      ('aaa',) 'initial aaa content'
  'ad' LeafNode
      ('add',) 'initial add content'
      ('adh',) 'initial adh content'
      ('adl',) 'initial adl content'
)r�r�r�r�s  r�"test_one_deep_two_prefix_map_plain�>TestTestCaseWithExampleMaps.test_one_deep_two_prefix_map_plain5�1���1�1�3�����
5�
����		
rc�~�UR[RS9nURSUR	55 g)NrJz�'' InternalNode
  'F0' LeafNode
      ('aaa',) 'initial aaa content'
  'F3' LeafNode
      ('adl',) 'initial adl content'
  'F4' LeafNode
      ('adh',) 'initial adh content'
  'FD' LeafNode
      ('add',) 'initial add content'
)r�rr�r�r�r�s  r�test_one_deep_two_prefix_map_16�;TestTestCaseWithExampleMaps.test_one_deep_two_prefix_map_16BsC���1�1�#�2�2�2�
��	
���
5�
����	
rc�d�UR5nURSUR55 g)Nz�'' InternalNode
  'a' LeafNode
      ('add',) 'initial add content'
      ('adh',) 'initial adh content'
      ('adl',) 'initial adl content'
  'b' LeafNode
      ('bbb',) 'initial bbb content'
)r�r�r�r�s  r�"test_one_deep_one_prefix_map_plain�>TestTestCaseWithExampleMaps.test_one_deep_one_prefix_map_plainSr�rc�~�UR[RS9nURSUR	55 g)NrJz�'' InternalNode
  '4' LeafNode
      ('bbb',) 'initial bbb content'
  'F' LeafNode
      ('add',) 'initial add content'
      ('adh',) 'initial adh content'
      ('adl',) 'initial adl content'
)r�rr�r�r�r�s  r�test_one_deep_one_prefix_map_16�;TestTestCaseWithExampleMaps.test_one_deep_one_prefix_map_16`sC���1�1�#�2�2�2�
��	
���
5�
����		
rr4N)r5r6r7r8�__doc__r�r�r�r�r�r�r�r�r�r�r�r�r9r4rrr�r��sA��1�
�
�
�
�
�	
�
�.
�2
�
�"
�

rr�c�@�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSr Sr!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.r0S/r1S0r2S1r3S2r4S3r5S4r6g5)6�TestMapipc��Sn[R"U5nURSU5 SU-4nURX RX55 U$)Nschkleaf:
0
1
1
a
1
b
s(90986195696b177c8895d48fdb4b7f2366f798a0�sha1:�r�
sha_stringrr_)rrA�
ab_leaf_bytes�ab_sha1rNs     r�assertHasABMap�TestMap.assertHasABMapqsQ��;�
��$�$�]�3�����D�g�N��w�&�(��������	�(L�M��rc��Sn[R"U5nURSU5 SU-4nURX RX55 U$)Nschkleaf:
0
1
0

s(8571e09bf1bcc5b9621ce31b3d4c93d6e9a1ed26r�r�)rrA�empty_leaf_bytes�
empty_sha1rNs     r�assertHasEmptyMap�TestMap.assertHasEmptyMapysT��3���'�'�(8�9�
����D�j�Q��z�)�+�����)�?�?�9�+O�P��rc
�0�UR5 UR/nUR5 UR/nU(Ga�UR5nUR5nURUR:wa,UR	URSS9URSS95 UR
URUR5 [U[5(a�UR
[URR55[URR555 UR[URUR5VVs/sHupxUPM	 snnSS95 UR[URUR5VVs/sHupxUPM	 snnSS95 O&UR
URUR5 U(aGM�UR
/U5 gs snnfs snnf)zAAssert that the internal structure is identical between the maps.T��include_keysc��UR$r��_search_prefix��as r�<lambda>�.TestMap.assertMapLayoutEqual.<locals>.<lambda>��
��a�&6�&6r�rc��UR$rr�r�s rr�r��r�rN)�_ensure_root�
_root_node�poprqr�r�rr��
isinstancer
�sorted�_items�keys�extend�_iter_nodes�_store)	r�map_one�map_two�node_one_stack�node_two_stack�node_one�node_two�n�_s	         r�assertMapLayoutEqual�TestMap.assertMapLayoutEqual�s�������!�,�,�-������!�,�,�-���%�)�)�+�H�%�)�)�+�H��!�!�X�%7�%7�7��$�$��&�&�D�&�9��&�&�D�&�9��
���X�4�4�h�6M�6M�N��(�L�1�1�� � ��8�?�?�/�/�1�2�F�8�?�?�;O�;O�;Q�4R���%�%��'/�';�';�G�N�N�'K�L�'K�t�q��'K�L�6����%�%��'/�';�';�G�N�N�'K�L�'K�t�q��'K�L�6���� � ����(�/�/�B�9�n�:	
����^�,��M��Ms�&H�.Hc��[UR55n[R"SS5nURRURR5 UHupEURXE5 M URX15 [R"SS5nURRURR5 [U5HupEURXE5 M URXa5 g)z�Assert that the chkmap is in 'canonical' form.

We do this by adding all of the key value pairs from scratch, both in
forward order and reverse order, and assert that the final tree layout
is identical.
N)
�listrcrr	r��set_maximum_sizerG�mapr�reversed)rrP�items�map_forwardr�value�map_reverses       r�assertCanonicalForm�TestMap.assertCanonicalForm�s����V�%�%�'�(���n�n�T�4�0�����/�/��0A�0A�0N�0N�O��J�C��O�O�C�'� ��!�!�+�6��n�n�T�4�0�����/�/��0A�0A�0N�0N�O�"�5�/�J�C��O�O�C�'�*��!�!�+�6rc��UR5n[US5nURRS5 [US5nURRS5 UR	X#5 URSS5 UR
[URX#5 URSS5 UR	X#5 URSS5 URUR[5 UR
[URX#5 URSS5 UR	X#5 URSS5 UR
[URX#5 URU5 g)N�rz�value��aab��aac)rCr	r�rrr�assertRaises�AssertionError�assertIsInstancer
r)r�storer�r�s    r�test_assert_map_layout_equal�$TestMap.test_assert_map_layout_equal�s.���"�"�$�����%�����+�+�B�/����%�����+�+�B�/��!�!�'�3����I�x�(����.�$�*C�*C�W�V����I�x�(��!�!�'�3�	���I�x�(����g�0�0�,�?����.�$�*C�*C�W�V����I�x�(��!�!�'�3����I�x�(����.�$�*C�*C�W�V�� � ��)rc��UR5n[R"U05nURU5nUR	X25 gr)rCr	rKr�r�rrArN�expected_root_keys    r�test_from_dict_empty�TestMap.test_from_dict_empty�sB���&�&�(�	��#�#�I�r�2�� �2�2�9�=�����*�5rc��UR5n[R"USS05nURU5nUR	X25 g�N��ar.)rCr	rKr�rrs    r�test_from_dict_ab�TestMap.test_from_dict_ab�sF���&�&�(�	��#�#�I����?�� �/�/�	�:�����*�5rc��UR5n[R"U05n[X5nURS/5nUR	U5nURXT5 URXCRR5 g)Nr )rCr	rK�apply_deltar�rr��_key�rrArNrP�new_rootrs      r�test_apply_empty_ab�TestMap.test_apply_empty_ab�s~���&�&�(�	��#�#�I�r�2���	�,���%�%�'<�&=�>�� �/�/�	�:�����*�5�	
����#4�#4�#9�#9�:rc��UR5n[R"USS05n[X5nURS/5nUR	U5nURXT5 URXCRR5 g)Nr!r.)r!NN)rCr	rKr&r�rr�r'r(s      r�test_apply_ab_empty�TestMap.test_apply_ab_empty�s����&�&�(�	��#�#�I����?���	�,���%�%�'<�&=�>�� �2�2�9�=�����*�5�	
����#4�#4�#9�#9�:rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 URUR[5 S/nURU5 URU5 URUR[5 g)Nr�)ssmallr)slittle�svery-bigsdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r0NN)
rCr	r�rrrr
r&rr)rrrP�deltas    r�"test_apply_delete_to_internal_node�*TestMap.test_apply_delete_to_internal_node�s����"�"�$����t�$��	���*�*�3�/��
�
�;��)��
�
�<��*��
�
�>�:�.����f�/�/��>�-�.�����5�!�� � ��(����f�/�/��:rc��UR5n[R"USS05n[X5nUR[R
URS/5 URX#RR5 g)Nr!r.r )
rCr	rKrr�InconsistentDeltar&rr�r'�rrArNrPs    r�test_apply_new_keys_must_be_new�'TestMap.test_apply_new_keys_must_be_newss���&�&�(�	��#�#�I����?���	�,������$�$�f�&8�&8�;P�:Q�	
�
	
����#4�#4�#9�#9�:rc�
�UR5n[US5nURRS5 UR	/SQ5 UR5nUR
U5 [US5nURRS5 UR	/SQ5 UR5nURURSS9URSS95 URX55 UR
U5 g)N�
)�Nrz�common�N��bba�target2�Nr�r<)rAr=r;Tr�)
rCr	r�rr&�_saverr�r�r)rrA�chkmap1�	root_key1�chkmap2rOs      r�!test_apply_delta_is_deterministic�)TestMap.test_apply_delta_is_deterministics����&�&�(�	���D�)�����+�+�B�/����
�	
��M�M�O�	�� � ��)���D�)�����+�+�B�/����
�	
��M�M�O�	�������D��1�7�3E�3E�SW�3E�3X�	
�	
����.�� � ��)rc�h�UR5n[US5nURRS5 UR	SS5 URSUR
55 UR	SS5 URSUR
55 URU5 UR	SS5 URSUR
55 URU5 UR	S	S5 URS
UR
55 URU5 g)N�#rz�vz'' LeafNode
      ('aaa',) 'v'
r�2'' LeafNode
      ('aaa',) 'v'
      ('aab',) 'v'
r�|'' InternalNode
  'aaa' LeafNode
      ('aaa',) 'v'
  'aab' LeafNode
      ('aab',) 'v'
  'aac' LeafNode
      ('aac',) 'v'
r�z�'' InternalNode
  'a' InternalNode
    'aaa' LeafNode
      ('aaa',) 'v'
    'aab' LeafNode
      ('aab',) 'v'
    'aac' LeafNode
      ('aac',) 'v'
  'b' LeafNode
      ('bbb',) 'v'
�rCr	r�rrr�r�r�rrrPs   r�test_stable_splitting�TestMap.test_stable_splitting7s���"�"�$����t�$�����*�*�2�.��
�
�9�d�#����@�&�BS�BS�BU�V��
�
�9�d�#����C�����	
�	
� � ��(�	�
�
�9�d�#����
#�
����		
�	
� � ��(�	�
�
�9�d�#����	
#�
����	
�	
� � ��(rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 URU5 UR
UR[5 g)Nr:rzrJ)saaaa)rCr	r�rrrrr
rNs   r�test_map_splits_with_longer_key�'TestMap.test_map_splits_with_longer_keydsp���"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�:�t�$�� � ��(����f�/�/��>rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 URU5 UR
SUR55 UR5n[X5nUR
SUR55 g)	Nr:)sa
asval1)sa
bsval2)�acsval3z�'' InternalNode
  'a\r' InternalNode
    'a\ra' LeafNode
      ('a\ra',) 'val1'
    'a\rb' LeafNode
      ('a\rb',) 'val2'
  'ac' LeafNode
      ('ac',) 'val3'
)	rCr	r�rrrr�r�rB�rrrPrNs    r�test_with_linefeed_in_key�!TestMap.test_with_linefeed_in_keyns����"�"�$����t�$�����*�*�2�.��
�
�:�w�'��
�
�:�w�'��
�
�8�W�%�� � ��(����
%�
����
	
��<�<�>����(�����
%�
����
	
rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 URSUR
55 UR	SS5 UR	SS5 URSUR
55 UR	S	S5 UR	S
S5 URSUR
55 UR	SS
5 UR	SS
5 URSUR
55 UR	SS5 URSUR
55 g)N�()saaaaaaaarJ)saaaaabaaz<'' LeafNode
      ('aaaaaaaa',) 'v'
      ('aaaaabaa',) 'v'
)saaabaaaa)saaababaaz�'' InternalNode
  'aaaa' LeafNode
      ('aaaaaaaa',) 'v'
      ('aaaaabaa',) 'v'
  'aaab' LeafNode
      ('aaabaaaa',) 'v'
      ('aaababaa',) 'v'
)saaabacaa)saaabadaaa '' InternalNode
  'aaaa' LeafNode
      ('aaaaaaaa',) 'v'
      ('aaaaabaa',) 'v'
  'aaab' InternalNode
    'aaabaa' LeafNode
      ('aaabaaaa',) 'v'
    'aaabab' LeafNode
      ('aaababaa',) 'v'
    'aaabac' LeafNode
      ('aaabacaa',) 'v'
    'aaabad' LeafNode
      ('aaabadaa',) 'v'
)saaababba�val)saaababcaa�'' InternalNode
  'aaaa' LeafNode
      ('aaaaaaaa',) 'v'
      ('aaaaabaa',) 'v'
  'aaab' InternalNode
    'aaabaa' LeafNode
      ('aaabaaaa',) 'v'
    'aaabab' InternalNode
      'aaababa' LeafNode
      ('aaababaa',) 'v'
      'aaababb' LeafNode
      ('aaababba',) 'val'
      'aaababc' LeafNode
      ('aaababca',) 'val'
    'aaabac' LeafNode
      ('aaabacaa',) 'v'
    'aaabad' LeafNode
      ('aaabadaa',) 'v'
)saaabDaaaa�'' InternalNode
  'aaaa' LeafNode
      ('aaaaaaaa',) 'v'
      ('aaaaabaa',) 'v'
  'aaab' InternalNode
    'aaabD' LeafNode
      ('aaabDaaa',) 'v'
    'aaaba' InternalNode
      'aaabaa' LeafNode
      ('aaabaaaa',) 'v'
      'aaabab' InternalNode
        'aaababa' LeafNode
      ('aaababaa',) 'v'
        'aaababb' LeafNode
      ('aaababba',) 'val'
        'aaababc' LeafNode
      ('aaababca',) 'val'
      'aaabac' LeafNode
      ('aaabacaa',) 'v'
      'aaabad' LeafNode
      ('aaabadaa',) 'v'
)rCr	r�rrr�r�rNs   r�test_deep_splitting�TestMap.test_deep_splitting�sW���"�"�$����t�$�����*�*�2�.��
�
�>�4�(��
�
�>�4�(����M�����	
�	�
�
�>�4�(��
�
�>�4�(����
(�
����		
�	�
�
�>�4�(��
�
�>�4�(����
(�
����	
� 	�
�
�>�6�*��
�
�>�6�*����
(�$
����'	
�0	�
�
�>�4�(����
(�*
����-	
rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 URSUR
55 URU5 UR	SS5 URSUR
55 URU5 g)NrIrzrJr�very long value that splitszr'' InternalNode
  'aaa' LeafNode
      ('aaa',) 'v'
  'aab' LeafNode
      ('aab',) 'very long value that splits'
rKrMrNs   r�"test_map_collapses_if_size_changes�*TestMap.test_map_collapses_if_size_changes�s����"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�9�<�=����
=�

����
	
�	
� � ��(��
�
�9�d�#����C�����	
�	
� � ��(rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 URSUR
55 UR	SS5 URU5 URSUR
55 g)	NrZrzrJrr_�sabcz�'' InternalNode
  'aa' InternalNode
    'aaa' LeafNode
      ('aaa',) 'v'
    'aab' LeafNode
      ('aab',) 'very long value that splits'
  'ab' LeafNode
      ('abc',) 'v'
zE'' LeafNode
      ('aaa',) 'v'
      ('aab',) 'v'
      ('abc',) 'v'
rMrNs   r�test_map_double_deep_collapses�&TestMap.test_map_double_deep_collapsess����"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�9�<�=��
�
�9�d�#����
#�
����
	
�	�
�
�9�d�#�� � ��(����W�����	
rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 URSUR
55 UR	SS5 URSUR
55 URU5 URS5 URSUR
55 URU5 g)NrIrzrJrrKrrL)	rCr	r�rrr�r�r�unmaprNs   r�test_stable_unmap�TestMap.test_stable_unmap s����"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�9�d�#����C�����	
�
	�
�
�9�d�#����
#�
����		
�	
� � ��(�	���Y�����C�����	
�	
� � ��(rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 UR	SS5 URSUR
55 URS5 URS	UR
55 g)
NrZrzrJ)saaabrsvery long valuercz�'' InternalNode
  'aa' InternalNode
    'aaa' LeafNode
      ('aaa',) 'v'
      ('aaab',) 'v'
    'aab' LeafNode
      ('aab',) 'very long value'
  'ab' LeafNode
      ('abc',) 'v'
zF'' LeafNode
      ('aaa',) 'v'
      ('aaab',) 'v'
      ('abc',) 'v'
�rCr	r�rrr�r�rgrNs   r�test_unmap_double_deep�TestMap.test_unmap_double_deepAs����"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�:�t�$��
�
�9�0�1��
�
�9�d�#����
#�
����	
�	���Y�����
#�
����	
rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 UR	SS5 URSUR
55 URS5 URS	UR
55 g)
NrZrzrJrs
long value)saabbrcz�'' InternalNode
  'aa' InternalNode
    'aaa' LeafNode
      ('aaa',) 'v'
    'aab' LeafNode
      ('aab',) 'long value'
      ('aabb',) 'v'
  'ab' LeafNode
      ('abc',) 'v'
zF'' LeafNode
      ('aaa',) 'v'
      ('aabb',) 'v'
      ('abc',) 'v'
rkrNs   r�%test_unmap_double_deep_non_empty_leaf�-TestMap.test_unmap_double_deep_non_empty_leafas����"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�9�m�,��
�
�:�t�$��
�
�9�d�#����
#�
����	
�	���Y�����
#�
����	
rc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 UR	SS5 UR	SS5 URSUR
55 [XR55nUR	S	S5 URURRS
[5 URURRS[5 URURRS[5 URS5 URURRS
[5 URURRS[5 g)
N�rzrJrrrc)sacdz�'' InternalNode
  'aa' InternalNode
    'aaa' LeafNode
      ('aaa',) 'v'
    'aab' LeafNode
      ('aab',) 'v'
    'aac' LeafNode
      ('aac',) 'v'
  'ab' LeafNode
      ('abc',) 'v'
  'ac' LeafNode
      ('acd',) 'v'
��aad�aa�abrU)
rCr	r�rrr�r�rBrr�r
�tuplergrNs   r�/test_unmap_with_known_internal_node_doesnt_page�7TestMap.test_unmap_with_known_internal_node_doesnt_page�sl���"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�9�d�#��
�
�9�d�#��
�
�9�d�#��
�
�9�d�#����
#�
����	
� ��|�|�~�.��	�
�
�9�d�#����f�/�/�6�6�u�=�|�L����f�/�/�6�6�u�=�u�E����f�/�/�6�6�u�=�u�E�	���Y�����f�/�/�6�6�u�=�|�L����f�/�/�6�6�u�=�u�Erc��UR5n[US5nURRS5 UR	SS5 UR	SS5 URSUR
55 [XR55nUR	SS5 UR	SS5 UR	SS5 UR	S	S5 URURRS
[5 URURRS[5 URURRS[5 URURRS
[5 URURRS[5 URURRS[5 URS	5 URURRS
[5 URURRS[5 URURRS[5 URURRS
[5 URURRS[5 g)NrrzrJrzX'' InternalNode
  'aaa' LeafNode
      ('aaa',) 'v'
  'aab' LeafNode
      ('aab',) 'v'
rrs��aae��aafr{rrrtr|r~)
rCr	r�rrr�r�rBrr�rwrrgrNs   r�)test_unmap_without_fitting_doesnt_page_in�1TestMap.test_unmap_without_fitting_doesnt_page_in�s2���"�"�$����t�$�����*�*�2�.��
�
�9�d�#��
�
�9�d�#����
#�

����
	
���|�|�~�.���
�
�9�d�#��
�
�9�d�#��
�
�9�d�#��
�
�9�d�#�	
���f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��I�	���Y�����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��Irc�:�UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 URSUR
55 UR5n[X5nUR	SS5 URURRS	[5 URURRS
[5 URURRS[5 URURRS[5 [R"5 URS5 URURRS	[5 URURRS
[5 URURRS[5 g)
Nrrrzr[rrz�'' InternalNode
  'aaa' LeafNode
      ('aaa',) 'val'
  'aab' LeafNode
      ('aab',) 'val'
  'aac' LeafNode
      ('aac',) 'val'
rsrJr{rrrt)rCr	r�rrr�r�rBrr�rwrr�clear_cachergrVs    r� test_unmap_pages_in_if_necessary�(TestMap.test_unmap_pages_in_if_necessary�s����"�"�$����t�$�����*�*�2�.��
�
�9�f�%��
�
�9�f�%��
�
�9�f�%����
%�
����		
��<�<�>����(���
�
�9�d�#�	
���f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��I�	�������Y�����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��Irc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 UR5n[X5nUR	SS5 UR
SUR55 [X5nUR	SS5 URURRS	[5 URURRS
[5 URURRS[5 URURRS[5 URRS
n[R"5UnURRSn[R"5Un[R"5 U[R"5U'U[R"5U'URS5 URURRS	[5 URURRS
[5 URURRS[5 g)
Nrrrzr[rrrsz�'' InternalNode
  'aaa' LeafNode
      ('aaa',) 'val'
  'aab' LeafNode
      ('aab',) 'val'
  'aac' LeafNode
      ('aac',) 'val'
  'aad' LeafNode
      ('aad',) 'val'
rJr{rrrt)rCr	r�rrrBr�r�rr�rwrr�
_get_cacher�rg)rrrPrN�aab_key�	aab_bytes�aac_key�	aac_bytess        r�#test_unmap_pages_in_from_page_cache�+TestMap.test_unmap_pages_in_from_page_cache�s5���"�"�$����t�$�����*�*�2�.��
�
�9�f�%��
�
�9�f�%��
�
�9�f�%��<�<�>����(���
�
�9�f�%����
%�
����	
���(���
�
�9�d�#�	
���f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��I��#�#�*�*�6�2���&�&�(��1�	��#�#�*�*�6�2���&�&�(��1�	�����(1�����W�%�(1�����W�%�	���Y�����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��Irc��UR5n[US5nURRS5 UR	SS5 UR	SS5 UR	SS5 UR5n[X5nUR	SS5 UR	SS5 UR	SS5 UR
URRS	[5 UR
URRS
[5 UR
URRS[5 UR
URRS[5 UR
URRS
[5 UR
URRS[5 URS5 UR
URRS	[5 UR
URRS
[5 UR
URRS[5 UR
URRS
[5 UR
URRS[5 g)Nrrrzr[rrrsr{r}r{rrrtr|r~)rCr	r�rrrBrr�rwrrgrVs    r�test_unmap_uses_existing_items�&TestMap.test_unmap_uses_existing_items%s���"�"�$����t�$�����*�*�2�.��
�
�9�f�%��
�
�9�f�%��
�
�9�f�%��<�<�>����(���
�
�9�f�%��
�
�9�f�%��
�
�9�f�%�	
���f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��I�	���Y�����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��F����f�/�/�6�6�v�>��I����f�/�/�6�6�v�>��Irc��UR0SS9nURSSS.URSS9nURSS/[UR	U555 g)	Nr:�rG�content here�more content�r!�r.�rArG)r!Nr�)r�Nr��rQr�rr��iter_changes�r�basis�targets   r�test_iter_changes_empty_ab�"TestMap.test_iter_changes_empty_abEsg���
�
�b�r�
�2�����%��@��l�l���
��
	
���
-�/O�P��6�&�&�u�-�.�	
rc��URSSS.SS9nUR0URSS9nURSS/[UR	U555 g)	Nr�r�r�r:r�r�)r!r�N)r�r�Nr�r�s   r�test_iter_changes_ab_empty�"TestMap.test_iter_changes_ab_emptySse���
�
�%��@�r��
�����r�U�\�\���K�����
-�/O�P��6�&�&�u�-�.�	
rc��UR0SS9nUR0URSS9nUR/[UR	U555 g)Nr:r�r�r�r�s   r�&test_iter_changes_empty_empty_is_empty�.TestMap.test_iter_changes_empty_empty_is_empty_sL���
�
�b�r�
�2�����r�U�\�\���K������V�F�$7�$7��$>�?�@rc��URSSS.SS9nURSSS.URSS9nUR/[UR	U555 g�Nr�r�r�r:r�r�r�r�s   r� test_iter_changes_ab_ab_is_empty�(TestMap.test_iter_changes_ab_ab_is_emptydsh���
�
�%��@�r��
�����%��@��l�l���
��
	
����V�F�$7�$7��$>�?�@rc��URSSS.SS9nURSSS.URSS9n[URU55 UR	UR
[5 UR	UR
[5 gr�)rQr�rr�rr�rwr�s   r�(test_iter_changes_ab_ab_nodes_not_loaded�0TestMap.test_iter_changes_ab_ab_nodes_not_loadedos����
�
�%��@�r��
�����%��@��l�l���
��
	
�V�
 �
 ��
'�(����f�/�/��7����e�.�.��6rc��URSSS.SS9nURSSS.URSS9n[URU55nUR	S/U5 g)	Nr�r�r�r:r��different contentr�)r�r�r�)rQr�r�r�r)rr�r��results    r�,test_iter_changes_ab_ab_changed_values_shown�4TestMap.test_iter_changes_ab_ab_changed_values_shown|sr���
�
�%��@�r��
�����%�0D�E��l�l���
��
��+�+�E�2�3�����J�K�V�Trc���SSSS.nSSSS.n/SQnURUS	S
9nURUS	URS9nURU[UR	U555 g)N�foo bar�common altered a�	foo bar b�rzrr��common altered b�	foo bar t�rzr�sat�)rr�r�)r�Nr�)r�r�Nr:r��rGrAr��r�
basis_dict�target_dict�changesr�r�s      r�#test_iter_changes_mixed_node_length�+TestMap.test_iter_changes_mixed_node_length�sy��"�*�!�
�
�"�*�"�
��

��
�
�
�j�r�
�:�����{��u�|�|��T������&��)<�)<�U�)C�"D�Erc�h^�SSSS.nSSSS.nURUSS	9nURUSURS
9nURRmU4SjnXSRl[UR	U55nUH.nUSS
:XdMURSR
U55 M0 g)Nr�r�r�r�r�r�r�r:r�r�c�V>�SU;a[SRU55eT"XU5$)N)s-sha1:1adf7c0d1b9140ab5f33bb64c6275fa78b1580b7z'aaa' pointer was followed {!r})rr[)r��orderrV�	basis_gets   �rrW�LTestMap.test_iter_changes_common_pages_not_loaded.<locals>.get_record_stream�s/���B�d�J�$�%F�%M�%M�d�%S�T�T��T�(�3�3rrirzzFound unexpected change: {})rQr�rWr�r�rZr[)	rr�r�r�r�rWr��changer�s	        @r�)test_iter_changes_common_pages_not_loaded�1TestMap.test_iter_changes_common_pages_not_loaded�s����"�*�!�
�
�"�*�"�
��
�
�
�j�r�
�:�����{��u�|�|��T���L�L�2�2�	�	4�
*;���&���+�+�E�2�3���F��a�y�I�%��	�	�7�>�>�v�F�G�rc���SSSS.nSSSS.n/SQnURU5nURX$RS	9nURU[UR	U555 g)
Nr�r�r�r�r�r�r�r�rhr�r�s      r�;test_iter_changes_unchanged_keys_in_multi_key_leafs_ignored�CTestMap.test_iter_changes_unchanged_keys_in_multi_key_leafs_ignored�sq��"�*�!�
�
�"�*�"�
��

��
�
�
�j�)�����{�l�l��C������&��)<�)<�U�)C�"D�Erc��UR5n[R"U05n[X5nUR/[	UR555 gr)rCr	rKrrrcr6s    r�test_iteritems_empty�TestMap.test_iteritems_empty�sJ���&�&�(�	��#�#�I�r�2���	�,������T�&�"2�"2�"4�5�6rc���UR5n[R"USSS.5n[X5nURSS/[	UR555 g)Nr�r�r�)r!r�)r�r�)rCr	rKrr�rcr6s    r�test_iteritems_two_items� TestMap.test_iteritems_two_items�s^���&�&�(�	��#�#���?�K�
���	�,�����
'�)C�D��6�#�#�%�&�	
rc�v�URSSS.5nURSS0URUS/55 g)Nr�r�r�r!�rQrrf�rrPs  r�(test_iteritems_selected_one_of_two_items�0TestMap.test_iteritems_selected_one_of_two_items�s7������?�S�T�����'�?�3�T�\�\�&�7�)�5T�Urc�z�URSSSS.SSS9nURSSS.URUS	/55 g)
Nr�r��boring content��r"r"�r"r.�r.rr:r)rGrH�r�r�r!r�r�s  r�-test_iteritems_keys_prefixed_by_2_width_nodes�5TestMap.test_iteritems_keys_prefixed_by_2_width_nodes�sU�����-�#�.�

����
��	
���*�/�J��L�L��'��+�	
rc�J�[RRS5nURSU"S55 URSU"S55 URSU"S55 UR	SS	S
S.SS
US9nURSS	S.URUS/55 g)N�hash-16-waysE8B7BE43E8B7BE43r��E8B7BE4371BEEFF9r�s71BEEFF900000000r�r�r�r�r�r:rrFr�r!)r�search_key_registry�getrrQrf)rrIrPs   r�4test_iteritems_keys_prefixed_by_2_width_nodes_hashed�<TestMap.test_iteritems_keys_prefixed_by_2_width_nodes_hasheds���!�5�5�9�9�.�I�����0�/�,�2O�P����0�/�,�2O�P����0�/�+�2N�O����-�#�.�

���+��
��	
���*�/�J��L�L��'��+�	
rc�x�URSSSS.SS9nURSSS.URUS/55 g)	Nr�r�r�r�r)rHr�r!r�r�s  r�0test_iteritems_keys_prefixed_by_2_width_one_leaf�8TestMap.test_iteritems_keys_prefixed_by_2_width_one_leafsR�����-�#�.�

���

��	
���*�/�J��L�L��'��+�	
rc�\�UR05nURS[U55 g�Nri�rQrrr�s  r�test___len__empty�TestMap.test___len__empty/s$�����r�"������C��K�(rc�b�URSSS.5nURS[U55 g)N�bar�quux)��foo)sgamrr�r�s  r�
test___len__2�TestMap.test___len__23s)�����6�g�F�G������C��K�(rc��URSSS.SS9nUR5 URSURR5 URSURR
5 URS[
URR55 URSURR55 [URRR55nUS	nUSnURS
US	5 URSUS	5 [R"URUS5USS5nURU[5 URS[
U55 URSS0UR!XQR"55 [R"URUS5USS5nURU[5 URS[
U55 URS
S0UR!XaR"55 URS[
U55 URSSS.UR!U55 g)N�v1�v2��sdk1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1k1�sdk2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2r�r�r>r�kri�k1�k2r�r�)rQr�rr�rG�
_key_widthrr��_compute_search_prefixr�rr�_deserialise�_read_bytesrrrfr�)rrP�nodes�ptr1�ptr2�node1�node2s       r�test_max_size_100_bytes_new�#TestMap.test_max_size_100_bytes_new7s�����!�%�8�s��
��	��������f�/�/�<�<�=�����F�-�-�8�8�9�����C�� 1� 1� 8� 8�9�:�����v�0�0�G�G�I�J��v�(�(�/�/�5�5�7�8���Q�x���Q�x�������Q��(������Q��(��$�$�V�%7�%7��Q��%@�$�q�'�4�P�����e�X�.�����C��J�'����-��/����e�]�]�1S�T��$�$�V�%7�%7��Q��%@�$�q�'�4�P�����e�X�.�����C��J�'����-��/����e�]�]�1S�T�	
����C��K�(����!�%�8�$�,�,�v�:N�	
rc���UR5n[US5nURUR[5 UR0UR
U55 URS[U55 gr�)rCr	rr�rrrfr)rrArPs   r�test_init_root_is_LeafNode_new�&TestMap.test_init_root_is_LeafNode_new`s_���&�&�(�	��	�4�(�����f�/�/��:�����T�\�\�&�1�2�����C��K�(rc��UR5n[US5nUR5n[5nUR	U/URU55 gr)rCr	rBrr�	serialise�rrArPr�	leaf_nodes     r�test_init_and_save_new�TestMap.test_init_and_save_newgsK���&�&�(�	��	�4�(���l�l�n���J�	����#��	� 3� 3�I� >�?rc�z�UR5n[US5nURSS5 URSS0UR	U55 URS[U55 UR
5n[5nURUSS5 URU/URU55 g)N)sfoo,r�r>)	rCr	rrrfrrBrrrs     r�test_map_first_item_new�TestMap.test_map_first_item_newns����&�&�(�	��	�4�(���
�
�:�v�&����*�f�-�t�|�|�F�/C�D�����C��K�(��l�l�n���J�	��
�
�i��V�4����#��	� 3� 3�I� >�?rc�t�URSSS.5nURS5 URS5 URS[U55 UR0UR	U55 UR5n[
5nURU/URUR55 g)Nr�r�r�r�r�ri)	rQrgrrrfrBrrr�)rrPrrs    r�%test_unmap_last_item_root_is_leaf_new�-TestMap.test_unmap_last_item_root_is_leaf_newys������u�U�K�L�����]�#����]�#�����C��K�(�����T�\�\�&�1�2��l�l�n���J�	����#��	� 3� 3�F�M�M� B�Crc���URSSSS.SS9nURSUR55 URSUR55 URSURS	S
95 g)N�value1�value2�value3)rzrr��r���'' InternalNode
  'a' InternalNode
    'aaa' LeafNode
      ('aaa',) 'value1'
    'aab' LeafNode
      ('aab',) 'value2'
  'b' LeafNode
      ('bbb',) 'value3'
a�'' InternalNode sha1:0690d471eb0a624f359797d0ee4672bd68f4e236
  'a' InternalNode sha1:1514c35503da9418d8fd90c1bed553077cb53673
    'aaa' LeafNode sha1:4cc5970454d40b4ce297a7f13ddb76f63b88fefb
      ('aaa',) 'value1'
    'aab' LeafNode sha1:1d68bc90914ef8a3edbcc8bb28b00cb4fea4b5e2
      ('aab',) 'value2'
  'b' LeafNode sha1:3686831435b5596515353364eab0399dc45d49e7
      ('bbb',) 'value3'
Tr�)rQr�r�r�s  r�test__dump_tree�TestMap.test__dump_tree�s������$�$�$�
�
�
�
��	
���
(�
����
	
�	
���
(�
����
	
�	
���
(�
���4��0�
	
rc���URSSS.SS9nURSS5 URSUR55 URS	URS
S95 g)Nrr�rzrr:r�r�rra4'' InternalNode None
  'a' InternalNode sha1:6b0d881dd739a66f733c178b24da64395edfaafd
    'aaa' LeafNode sha1:40b39a08d895babce17b20ae5f62d187eaa4f63a
      ('aaa',) 'value1'
    'aab' LeafNode sha1:ad1dc7c4e801302c95bf1ba7b20bc45e548cd51a
      ('aab',) 'value2'
  'b' LeafNode None
      ('bbb',) 'value3'
Tr�)rQrr�r�r�s  r�test__dump_tree_in_progress�#TestMap.test__dump_tree_in_progress�sx�����!�i�8�r��
��	�
�
�9�i�(����
(�
����
	
�	
���
(�
���4��0�
	
rr4N)7r5r6r7r8r�r�rrrrr#r*r-r2r7rFrOrRrWr\r`rdrhrlrorxrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr#r9r4rrr�r�ps����#-�J7�&*�,6�6�;�;�;�&;�*�<+)�Z?�!
�F[
�z)�0
�4)�B
�@
�@%F�N$J�L#J�J0J�dJ�@
�

�A�
	A�7�
U�F�@ H�DF�,7�	
�V�
�$
�.
�")�)�'
�R)�@�	@�D�)
�V
rr�c��g)z<A search key function that maps all nodes to the same value.r	r4r�s r�_search_key_singler&�s��rc�*�SSRU5-$)Nstest:�)�joinr�s r�_test_search_keyr*�s���g�l�l�3�'�'�'rc�>�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�TestMapSearchKeysi�c��[R"UR5S5nURSUR	S55 URSUR	S55 URSUR	S55 g)N�1�r.s12)r.�2s123�r.r0�3)rr	rCr�_search_key_funcr�s  r�)test_default_chk_map_uses_flat_search_key�;TestMapSearchKeys.test_default_chk_map_uses_flat_search_key�sm������ 2� 2� 4�d�;������v�6�6�w�?�@�����F�$;�$;�L�$I�J������)@�)@�AS�)T�Urc�,�[R"UR5S[S9nUR	[UR
5 UR
SURS55 UR
SURRS55 g�NrJs
test:123r1)	rr	rCr*�assertIsr3rr��_search_keyr�s  r�&test_search_key_is_passed_to_root_node�8TestMapSearchKeys.test_search_key_is_passed_to_root_node�s~�������� �$�8H�
��	
�
�
�&��(?�(?�@������!8�!8�9K�!L�	
�	
�����!2�!2�!>�!>�?Q�!R�	
rc� �UR5n[R"US[S9nUR	5n[R"X[S9nUR5 UR
SURRS55 gr7)	rCrr	r*rBr�rr�r9�rrArPrNs    r�'test_search_key_passed_via__ensure_root�9TestMapSearchKeys.test_search_key_passed_via__ensure_root�sp���&�&�(�	����	�4�AQ�R���<�<�>�����	�EU�V�����������!2�!2�!>�!>�?Q�!R�	
rc���UR5n[R"US[S9nURRS5 UR
SS5 UR
SS5 UR
SS5 URS	UR55 UR5n[R"X[S9nURS	UR55 g)
NrJr:r/r��r0r��r2�bazz�'' InternalNode
  'test:1' LeafNode
      ('1',) 'foo'
  'test:2' LeafNode
      ('2',) 'bar'
  'test:3' LeafNode
      ('3',) 'baz'
)
rCrr	r*r�rrr�r�rBr=s    r�"test_search_key_with_internal_node�4TestMapSearchKeys.test_search_key_with_internal_node�s����&�&�(�	����	�4�AQ�R�����*�*�2�.��
�
�7�F�#��
�
�7�F�#��
�
�7�F�#����
#�
����		
��<�<�>�����	�EU�V�����
#�
����		
rc�L�UR5n[R"US[RS9nURRS5 UR
SS5 UR
SS5 UR
SS5 URS	UR55 UR5n[R"X[RS9nURS
/[URS/555 URS	UR55 g)NrJr:r/r�rAr�rBrCzv'' InternalNode
  '1' LeafNode
      ('2',) 'bar'
  '6' LeafNode
      ('3',) 'baz'
  '8' LeafNode
      ('1',) 'foo'
�r/r�)
rCrr	r�r�rrr�r�rBrrrcr=s    r�test_search_key_16�$TestMapSearchKeys.test_search_key_16s����&�&�(�	����	�4��AW�AW�X�����*�*�2�.��
�
�7�F�#��
�
�7�F�#��
�
�7�F�#����
#�
����		
��<�<�>�������1G�1G�
��	
���+�,�d�6�3C�3C�W�I�3N�.O�P����
#�
����		
rc�H�UR5n[R"US[RS9nURRS5 UR
SS5 UR
SS5 UR
SS5 URS	URS
S95 UR5n[R"X[RS9nURS/[URS/555 URS	URS
S95 g)
NrJr:r/r�rAr�rBrCz|'' InternalNode
  '\x1a' LeafNode
      ('2',) 'bar'
  'm' LeafNode
      ('3',) 'baz'
  '\x83' LeafNode
      ('1',) 'foo'
�latin1)�encodingrG)
rCrr	�_search_key_255r�rrr�r�rBrrrcr=s    r�test_search_key_255�%TestMapSearchKeys.test_search_key_2553s���&�&�(�	�����t�W�-D�-D�
��	���*�*�2�.��
�
�7�F�#��
�
�7�F�#��
�
�7�F�#����
#�
���x��0�		
��<�<�>�������1H�1H�
��	
���+�,�d�6�3C�3C�W�I�3N�.O�P����
#�
���x��0�		
rc�6�[R"UR5S[S9nURRS5 UR
SS5 UR
SS5 UR
SS5 URS	UR55 g)
NrJrr/r�rAr�rBrCzE'' LeafNode
      ('1',) 'foo'
      ('2',) 'bar'
      ('3',) 'baz'
)	rr	rCr&r�rrr�r�r�s  r�test_search_key_collisions�,TestMapSearchKeys.test_search_key_collisionsWs~�������� �$�8J�
��
	���*�*�2�.��
�
�7�F�#��
�
�7�F�#��
�
�7�F�#����W�����	
rr4N)r5r6r7r8r4r:r>rDrHrNrQr9r4rrr,r,�s(��V�

�
�
�< 
�D"
�H

rr,c��\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrg)�TestLeafNodeigc�X�[5nURSUR55 g)N�)rr�
_current_size�rrds  r�test_current_size_empty�$TestLeafNode.test_current_size_emptyhs"���z������T�/�/�1�2rc�z�[5nURS5 URSUR55 g�Nr:�)rrrrWrXs  r�test_current_size_size_changed�+TestLeafNode.test_current_size_size_changedls0���z�����b�!�����T�/�/�1�2rc�f�[5nSUlURSUR55 gr\)rr�rrWrXs  r�test_current_size_width_changed�,TestLeafNode.test_current_size_width_changedqs)���z���������T�/�/�1�2rc��[5nUR5nURSSS5 URUS-UR55 g)N�r�rC�)rrWrr)rrd�	base_sizes   r�test_current_size_items�$TestLeafNode.test_current_size_itemsvsD���z���&�&�(�	�����}�f�-�����R���);�);�)=�>rc�P�[R"SS5nURS[U55 URSUR5 URSUR55 UR
SUR5 UR
SUR5 g)N�chkleaf:
10
1
0

�s	sha1:1234rir:)	r�deserialiserrrGrr8r��_common_serialised_prefixrXs  r�test_deserialise_empty�#TestLeafNode.test_deserialise_empty|s}���#�#�$=��O������C��I�&�����T�.�.�/�����$�(�(�*�5��
�
�d�D�/�/�0��
�
�d�D�:�:�;rc��[R"SS5nURS[U55 URSS/[	URS555 g)N�+chkleaf:
0
1
2

foo bar1
baz
quux1
blarh
rkr)rdrC��r��blarh�rrlrrr�rcrXs  r�test_deserialise_items�#TestLeafNode.test_deserialise_items�sV���#�#�I��
��	
����C��I�&����
$�&<�=��4�>�>�$�'�(�	
rc��[R"SS5nURS[U55 URSS/[	URS555 g)Ns+chkleaf:
0
1
2

foo1
barbaz
quux1
blarh
rkr)r��barbazrrrurXs  r�'test_deserialise_item_with_null_width_1�4TestLeafNode.test_deserialise_item_with_null_width_1�sV���#�#�L��
��	
����C��I�&����
'�)?�@��4�>�>�$�'�(�	
rc��[R"SS5nURS[U55 URSS/[	URS555 g)Ns.chkleaf:
0
2
2

foo11
barbaz
quux1
blarh
rkr��r�r.ry))r�rrtrurXs  r�'test_deserialise_item_with_null_width_2�4TestLeafNode.test_deserialise_item_with_null_width_2�sV���#�#�U��
��	
����C��I�&����
,�.H�I��4�>�>�$�'�(�	
rc
���[R"SS5nURS[U55 URS/[	URSSS/555 g)Nrqrkrrrrs)sqazrurXs  rr��5TestLeafNode.test_iteritems_selected_one_of_two_items�sZ���#�#�I��
��	
����C��I�&����
#�$��4�>�>�$��Y�(?�@�A�	
rc�L�[R"SS5nURS[U55 URSS/[	URS555 UR
[RUR5 URSUR5 g)Ns*chkleaf:
0
2
2
foo
11
barbaz
21
blarh
rkrr})�r�r0rt�foo�rrlrrr�rcr8r�_unknownr�rmrXs  r�(test_deserialise_item_with_common_prefix�5TestLeafNode.test_deserialise_item_with_common_prefix�s����#�#�N��
��	
����C��I�&����
,�.H�I��4�>�>�$�'�(�	
�	
�
�
�g�&�&��(;�(;�<�����T�%C�%C�Drc�L�[R"SS5nURS[U55 URSS/[	URS555 UR
[RUR5 URSUR5 g)Ns+chkleaf:
0
2
2
foo
12
bar
baz
22
blarh

rkr)r~sbar
baz)r�sblarh
r�r�rXs  r�test_deserialise_multi_line�(TestLeafNode.test_deserialise_multi_line�s����#�#�N��
��	
����C��I�&����-�,�
�
�4�>�>�$�'�(�	
�	
�
�
�g�&�&��(;�(;�<�����T�%C�%C�Drc�X�[5nURSUR55 gr)rrrrXs  r�test_key_new�TestLeafNode.test_key_new�s���z������t�x�x�z�*rc��[R"SS5nURSSS5 URSUR	55 g)Nrjrkrd�baz quux)rrlrrrrXs  r�test_key_after_map�TestLeafNode.test_key_after_map�s;���#�#�$=��O������}�k�2�����t�x�x�z�*rc��[R"SS5nURSS5 URSUR	55 g)Nrqrkrd)rrlrgrrrXs  r�test_key_after_unmap�!TestLeafNode.test_key_after_unmap�s>���#�#�I��
��	
�
�
�4��'�����t�x�x�z�*rc���[5nURS5 URSSS5nURSSU4/4U5 UR	UR5S:�5 g)Nr:rdr�r�r)rrrrrrW�rrdr�s   r�*test_map_exceeding_max_size_only_entry_new�7TestLeafNode.test_map_exceeding_max_size_only_entry_new�s^���z�����b�!����$�
�{�;�����*��T�{�m�4�f�=�����*�*�,�r�1�2rc���[5nURS5 URSSS5 [URSSS55up#UR	SU5 UR	S[U55 USSUS	S1nUR	S
S1U5 [
U5nUS
nUR	SS0URUS55 UR	SUR5 UR	S	UR5 USnUR	SS0URUS55 UR	SUR5 UR	S	UR5 g)Nr:rdr�)sbluesredrrrir>�fr.)
rrrrrrrbrfrGr�)rrdrr��split_charsrs      r�=test_map_exceeding_max_size_second_entry_early_difference_new�JTestLeafNode.test_map_exceeding_max_size_second_entry_early_difference_new�sA���z�����b�!�����}�k�2��d�h�h�t�Z��@�A�������f�%�����C��K�(��a�y��|�V�A�Y�q�\�2�����$���{�3��V����T�{�����-��5�t�|�|�D�$�7O�P�����T�.�.�/�����D�O�O�,��T�{�����*�f�-�t�|�|�D�$�/G�H�����T�.�.�/�����D�O�O�,rc���[5nURSSS5nURSSU4/4U5 URSS0URUS55 URS[	U55 g)Nrdr�r�rr>�rrrrfrr�s   r�test_map_first�TestLeafNode.test_map_first�sj���z�����$�
�{�;�����*��T�{�m�4�f�=����-��5�t�|�|�D�$�7O�P�����C��I�&rc��[5nURSSS5 URSSS5nURSSU4/4U5 URSSS.URUS55 URS[	U55 g)Nrdr��sbingo�bangor)rdr�rr�r�s   r�test_map_second�TestLeafNode.test_map_second�s����z������}�k�2����$��X�6�����#��d��}�-�v�6����'�h�?��L�L��t�$�	
�	
����C��I�&rc��[5nURSSS5 URSSS5nURSSU4/4U5 URSS0URUS55 URS[	U55 g)Nrdr�r�r�rr>r�r�s   r�test_map_replacement�!TestLeafNode.test_map_replacement
sz���z������}�k�2����$�
�x�8�����*��T�{�m�4�f�=����-��2�D�L�L��t�4L�M�����C��I�&rc�4�UR5n[5nURS5 SnURU/[	URU555 URSUR
X55 URX2R55 g)Nr:)s-sha1:f34c3f0634ea3f85953dffa887620c0a5b1f4a51rj)rCrrrrrr_r�rrrd�expected_keys    r�test_serialise_empty�!TestLeafNode.test_serialise_emptys|���"�"�$���z�����b�!�J�����,���d�n�n�U�.C�)D�E����%�t���u�'K�	
�	
����x�x�z�2rc��UR5n[5nURS5 URSSS5 SnUR	SUR
5 UR	U/[
URU555 UR	SURX55 UR	X2R55 g)Nr:rdr�)s-sha1:f89fac7edfc6bdb1b1b54a556012ff0c646ef5e0r�s$chkleaf:
10
1
1
foo bar
1
baz quux
)
rCrrrrrmrrr_rr�s    r�test_serialise_items�!TestLeafNode.test_serialise_itemss����"�"�$���z�����b�!�����}�k�2�J������T�%C�%C�D����,���d�n�n�U�.C�)D�E����=��O�O�E�0�	
�	
����x�x�z�2rc�X�[5nURSUR55 gr)rr8rrXs  r�'test_unique_serialised_prefix_empty_new�4TestLeafNode.test_unique_serialised_prefix_empty_new+s ���z���
�
�d�D�7�7�9�:rc�~�[5nURSSS5 URSUR55 g)N�r�rCr��foo barbaz)rrrrrXs  r�*test_unique_serialised_prefix_one_item_new�7TestLeafNode.test_unique_serialised_prefix_one_item_new/s4���z������+�[�9����*�D�,G�,G�,I�Jrc�\�[5nUR[URSS5 g)Nrd)rr�KeyErrorrgrXs  r�test_unmap_missing�TestLeafNode.test_unmap_missing4s!���z�����(�D�J�J��m�Drc��[5nURSSS5 URSS5nURX5 UR0UR	US55 URS[U55 g)Nrdr�ri)rrrgrrfrr�s   r�test_unmap_present�TestLeafNode.test_unmap_present8sf���z������}�k�2����D�-�0������&�����T�\�\�$��5�6�����C��I�&rc��[5nSUlURSSS5 URSUR5 URSUR
5 URSSS5 URSUR5 URSUR
5 URSSS5 URSUR5 URSUR
5 URSSS	5 URSUR5 URSUR
5 URSS
S5 URSUR5 URSUR
5 g)
Nrr�r�r��r�sbing�	foo barb�sfoolsbabyr�sreplaced�sverys	differentrr)rr�rrr�rmrXs  r�"test_map_maintains_common_prefixes�/TestLeafNode.test_map_maintains_common_prefixes@sC���z���������+�[�9����*�D�,?�,?�@����*�D�,J�,J�K�����,�k�:�����$�*=�*=�>�����$�*H�*H�I�����)�;�7������!4�!4�5������!?�!?�@�����+�[�9������!4�!4�5������!?�!?�@�����.��9�����d�1�1�2�����d�<�<�=rc�~�[5nSUlURSSS5 URSSS5 URSSS5 URSSS5 URSUR5 URSUR
5 UR
SS5 URS	UR5 URS	UR
5 UR
SS5 URS
UR5 URS
UR
5 UR
SS5 URSUR5 URSUR
5 UR
SS5 URSUR5 URSUR
5 g)Nrr�r�r�r�r�rrr�r�sfoo barbing)rr�rrr�rmrgrXs  r�$test_unmap_maintains_common_prefixes�1TestLeafNode.test_unmap_maintains_common_prefixesSsn���z���������+�[�9�����,�k�:�����)�;�7�����.��9�����d�1�1�2�����d�<�<�=��
�
�4�0�1������!4�!4�5������!?�!?�@��
�
�4�+�,�����$�*=�*=�>�����$�*H�*H�I��
�
�4�-�.����+�T�-@�-@�A����+�T�-K�-K�L��
�
�4�.�/�����t�2�2�3�����t�=�=�>rr4N) r5r6r7r8rYr^rargrnrvrzrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r9r4rrrTrTgs���3�3�
3�
?�<�	
�	
�	
�	
�E�E� +�+�
+�3�-�&'�	'�'�	3�3�;�K�
E�'�>�&?rrTc��\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSrSrSrg)�TestInternalNodeijc��[S5n[5nURS5 URSSS5 UR	SU5 URSUR5 URSS0URUS55 URS[U55 UR5n[URU55nURU5SnURUS	/U5 URX4S5n[R"XdSS5nURS[U55 URSS0URX55 URSUR5 g)
N�for�r�r�r�rr>ri)s-sha1:cf67e9997d8228a907c1f5bfb25a8bd9cd916fac)r
rrr�add_noder�_node_widthrfrrCrrr_rr)rrd�childrAr��	child_key�bytess       r�test_add_node_empty_new�(TestInternalNode.test_add_node_empty_newksJ���E�"���
��
���s�#�
�	�	�$�	�6�*��
�
�f�e�$�	
����D�,�,�-����)�V�,�d�l�l�4��.F�G�����C��I�&��&�&�(�	��D�N�N�9�-�.���O�O�I�.�q�1�	����
�K�L�d�	
����	��7�3���#�#�E��7�D�9������C��I�&����)�V�,�d�l�l�4�.K�L�����D�,�,�-rc��[S5n[5nURS5 URSSS5 UR	SU5 UR5n[
URU55nURUSUR5 UR	SU5 URSUR5 g)Nr�r�r�r�r�r>sfos)
r
rrrr�rCrrrr')rrdr�rAr�s     r�test_add_node_resets_key_new�-TestInternalNode.test_add_node_resets_key_new�s����E�"���
��
���s�#�
�	�	�$�	�6�*��
�
�f�e�$��&�&�(�	��D�N�N�9�-�.������a��$�)�)�,��
�
�f�e�$�����t�y�y�)rc�p�[S5n[5nURS5 URSSS5 UR	SU5 [5nURS5 URSSS5 UR	SU5 URSSS	9Hup4UR
SU5 M g)
Nrr�r�r�r��r�rCr.��
key_filter)r
rrrr�r�r)rrdr��_child�node_key_filters     r�test__iter_nodes_no_key_filter�/TestInternalNode.test__iter_nodes_no_key_filter�s����C� ���
��
���s�#�
�	�	�$�	�6�*��
�
�d�E�"��
��
���s�#�
�	�	�$�	�6�*��
�
�d�E�"�'+�'7�'7���'7�'N�#�F����T�?�3�(Orc��[S5n[5nURS5 URSSS5 UR	SU5 [5nURS5 URSSS5 UR	SU5 S	nURSUS
9H upEUR
S[U55 M" g)Nrr�r�r�r�r�rCr.)r�r�)scatr�r>�r
rrrr�r�rr�rrdr�r�r�r�s      r�"test__iter_nodes_splits_key_filter�3TestInternalNode.test__iter_nodes_splits_key_filter�s����C� ���
��
���s�#�
�	�	�$�	�6�*��
�
�d�E�"��
��
���s�#�
�	�	�$�	�6�*��
�
�d�E�"�7�
�'+�'7�'7���'7�'T�#�F�
���Q��O� 4�5�(Urc���[S5n[5nURS5 URSSS5 URSSS5 UR	SU5 [5nURS5 URSSS5 URSSS5 UR	S	U5 S
nURSUS9H upEUR
S[U55 M" g)
Nrr�r�r[�sfobr�r��rCr.)r�r�r�r�)sramr�rr�r�s      r�&test__iter_nodes_with_multiple_matches�7TestInternalNode.test__iter_nodes_with_multiple_matches�s����C� ���
��
���s�#�
�	�	�$�	�6�*�
�	�	�$�	�6�*��
�
�d�E�"��
��
���s�#�
�	�	�$�	�6�*�
�	�	�$�	�6�*��
�
�d�E�"�M�
�'+�'7�'7���'7�'T�#�F�
���Q��O� 4�5�(Urc�h�[S5n[5nURS5 URSSS5 URSSS5 UR	SU5 [5nURS5 URSSS5 URSSS5 UR	S	U5 U$)
Nr�r�r�r[r�r�)sfar)sfazsfa)r
rrrr�)rrdr�s   r�make_fo_fa_node� TestInternalNode.make_fo_fa_node�s����D�!���
��
���s�#�
�	�	�$�	�6�*�
�	�	�$�	�6�*��
�
�e�U�#��
��
���s�#�
�	�	�$�	�6�*�
�	�	�$�	�6�*��
�
�e�U�#��rc��UR5nS/n[URSUS95nURS[	U55 URX#SS5 g)Nr�r�r>ri�r�rr�rr�rrdr�rs    r�test__iter_nodes_single_entry�.TestInternalNode.test__iter_nodes_single_entry�s[���#�#�%���[�
��T�%�%�d�z�%�B�C������C��J�'�����1�X�a�[�1rc��UR5nS/n[URSUS95nURS[	U55 g)Nr�r�rir�r�s    r�$test__iter_nodes_single_entry_misses�5TestInternalNode.test__iter_nodes_single_entry_misses�sE���#�#�%���[�
��T�%�%�d�z�%�B�C������C��J�'rc��UR5n/SQn[URSUS95nURS[	U55 USSnURS5 UR[
U5[
USS55 g)N)�r�r�r��r�r�r�r>r�ri)r�rr�rr�remover�)rrdr�r�matchess     r� test__iter_nodes_mixed_key_width�1TestInternalNode.test__iter_nodes_mixed_key_width�sy���#�#�%��E�
��T�%�%�d�z�%�B�C������C��J�'��Q�-�����w��������&��q��!��*=�>rc��UR5n/SQn[URSUS95nURS[	U55 g)N)r�r�r�)r�r�rr�r�s    r�test__iter_nodes_match_all�+TestInternalNode.test__iter_nodes_match_all�sC���#�#�%��E�
��T�%�%�d�z�%�B�C������C��J�'rc���UR5n/SQn[URSUS95nURS[	U55 UH upEURS[	U55 M" g)N)r�)sfaar�r�rr>r�)rrdr�r�_noder�s      r�(test__iter_nodes_fixed_widths_and_misses�9TestInternalNode.test__iter_nodes_fixed_widths_and_misses�sc���#�#�%��6�
��T�%�%�d�z�%�B�C������C��J�'�#�N�E����Q��G��-�$rc�l�[5nUR/[URS555 gr�r
rr�rcrXs  r�test_iteritems_empty_new�)TestInternalNode.test_iteritems_empty_news'���~������V�D�N�N�4�$8�9�:rc�,�[5n[5nURSSS5 [5nURSSS5 URSU5 URSU5 UR	SS/[UR
S555 g)	Nrdr��sstrange�beastr��s)rdr��rr)r
rrr�rr�rc�rrd�leaf1�leaf2s    r�test_iteritems_two_children�,TestInternalNode.test_iteritems_two_childrens{���~���
��
�	�	�$�
�w�/��
��
�	�	�$�
�x�0��
�
�d�E�"��
�
�d�E�"����
%�'@�A��4�>�>�$�'�(�	
rc
�N�[5n[5nURSSS5 [5nURSSS5 URSU5 SURS'URSU5 URS/[
URSSS/555 g)	Nrdr�rrr�r
r�sweird)r
rrr�r�rr�rcrs    r�#test_iteritems_two_children_partial�4TestInternalNode.test_iteritems_two_children_partials����~���
��
�	�	�$�
�w�/��
��
�	�	�$�
�x�0��
�
�d�E�"�!����D���
�
�d�E�"����
&�'��4�>�>�$���(D�E�F�	
rc
���[RRS5n[US9n[	US9nURSSS5 [	US9nURSSS5 UR
SU"S55 UR
SU"S55 URS	U5 SURS	'URS
U5 UR
S/[URSSS/555 g)
Nshash-255-wayrJrdr�rrs�F4s���K����rr)rr�r�r
rrrr�r�r�rc)rrIrdrrs     r�%test_iteritems_two_children_with_hash�6TestInternalNode.test_iteritems_two_children_with_hash"s���!�5�5�9�9�/�J���O�<����9��
�	�	����	
�
��9��
�	�	����	
�
	
�����M�*�	
�	
�����M�*�	
�	
�
�
�g�u�%� $����G���
�
�g�u�%����
&�'������%�#���
�	
rc�n�[5nUR/[URS/555 g)N)smissingrrXs  r�test_iteritems_partial_empty�-TestInternalNode.test_iteritems_partial_emptyKs)���~������V�D�N�N�M�?�$C�D�Erc�:�URSSS.SS9nUR5 URnURS[	UR
R
5Vs/sHn[U[5(dMUPM sn55 URSSS5upEURS	U5 URS
U4/U5 UR
SnURU[5 URS[	U55 URSS0URUS55 URSUR5 URSUR5 URSUR5 URS
[	U55 URSSSS.URU55 [!UR#UR$55nUR#UR$5SnURX�S/U5 gs snf)Nr�r�)�r��r�r:r�r��k3r�r�rr$r>r)r!r"r#ri)rQr�r�rrr��valuesr�rwrrrrfr'rGr�rrr�)	rrPrdr	rrr�r�r�s	         r�test_map_to_new_child_new�*TestInternalNode.test_map_to_new_child_newOs������&�F�C�RT��U������� � �����
��D�K�K�$6�$6�$8�U�$8�5�J�u�e�<T��$8�U�V�	
�
����x��9�
������v�&����3��+���.����E�"�����e�X�.�����C��J�'����(�G�,�d�l�l�5�$�.G�H�����u�z�z�*�����U�/�/�0�����E�,�,�-�����C��K�(������7�C��L�L�� �	
��D�N�N�6�=�=�1�2���O�O�F�M�M�2�1�5�	����)�!�W�-�t�4��1Vs�H�:Hc��URSSS.SS9nURSUR55 [URUR
5nUR
5 UR
nURS[URR5Vs/sHn[U[5(dMUPM sn55 URURSS	5upEURS
U5 URSU4/U5 URSnURU[5 URS[U55 URSS	S
.UR!US55 URSUR"5 URSUR$5 URSUR&5 URSUR(5 URS[U55 URSSS	S.UR!U55 [+UR-UR55nUR"nURSR"n	URSR"n
URX�X�R/51[1U55 URSUR55 gs snf)Nr�r��r!��k22r:r��Y'' InternalNode
  'k1' LeafNode
      ('k1',) 'foo'
  'k2' LeafNode
      ('k22',) 'bar'
r��k23r�r�rr�)r*r-r>r�r!r*r-r+r.��'' InternalNode
  'k1' LeafNode
      ('k1',) 'foo'
  'k2' InternalNode
    'k22' LeafNode
      ('k22',) 'bar'
    'k23' LeafNode
      ('k23',) 'quux'
)rQr�r�r	r�r�r�rrr�r%r�rwrrr
rfr'rGr�r�rrr�set)rrPrdr	rrr�r�r��k22_key�k23_keys           r�"test_map_to_child_child_splits_new�3TestInternalNode.test_map_to_child_child_splits_newps`�����&�V�D�SU��V�����
%�

����
	
���
�
�v�'8�'8�9������� � �����
��D�K�K�$6�$6�$8�U�$8�5�J�u�e�<T��$8�U�V�	
�������	�7�C�
������v�&����3��+���.����E�"�����e�\�2�����C��J�'�����7�3�T�\�\�%��5N�	
�	
����u�z�z�*�����U�/�/�0�����E�,�,�-�����E�-�-�.�����C��K�(�����&�W�E��L�L�� �	
��D�N�N�6�=�=�1�2���J�J�	��,�,�v�&�+�+���,�,�v�&�+�+�����'�I�x�x�z�B�C��I�N����
&�
����
	
��EVs�K�:Kc�$�[RRS5n[US9nSUlSUlUR
SU"S55 UR
SURS55 UR
SURS55 g)	Nr�rJr�r�r�sE8B7r!)rr�r�r
r�r�r�_search_prefix_filter)rrIrds   r�$test__search_prefix_filter_with_hash�5TestInternalNode.test__search_prefix_filter_with_hash�s���!�5�5�9�9�.�I���O�<�����������0�/�,�2O�P�����$�"<�"<�\�"J�K������&�&�w�/�	
rc�H�URSSSS.SS9nURSUR55 [URUR
5nUR
5 UR
nURURS5 URS	nURU[5 URS
[U55 URSS0URUS55 URS[U55 URSSS
.URU55 [URUR55nURUS/U5 [URUS5nURSUR55 g)Nr�r�r�r/r:r�r0r-r�r>r*rr)���r,)rQr�r�r	r�r�r�rgr�rrrrrfrr)rrPrdr�r�s     r�4test_unmap_k23_from_k1_k22_k23_gives_k1_k22_tree_new�ETestInternalNode.test_unmap_k23_from_k1_k22_k23_gives_k1_k22_tree_new�sp������&�W�E�TV��
��	
���
&�
����
	
���
�
�v�'8�'8�9������� � ��	
�
�
�6�=�=�)�,����E�"�����e�X�.�����C��J�'����)�V�,�d�l�l�5�$�.G�H�����C��K�(����F�v�>����V�@T�U��D�N�N�6�=�=�1�2�����$�r�(��T�*���
�
�t�B�x�0�����
%�

����
	
rc�$�URSSSS.SS9nURSUR55 URn[	UR
U5nUR
5 URnURSnURUR
S	5nURXE5 [	UR
U5nURS	5 URXAR5 URS
UR55 g)Nr�r�r�r/r:r�r0r�r!z]'' InternalNode
  'k22' LeafNode
      ('k22',) 'bar'
  'k23' LeafNode
      ('k23',) 'quux'
)
rQr�r�r�r	r�r�r�rgr)rrP�	orig_rootrd�k2_ptrr�s      r�4test_unmap_k1_from_k1_k22_k23_gives_k22_k23_tree_new�ETestInternalNode.test_unmap_k1_from_k1_k22_k23_gives_k22_k23_tree_new�s�������&�W�E�TV��
��	
���
&�
����
	
��%�%�	���
�
�y�1������� � �����U�#�����F�M�M�8�4������(���
�
�y�1�����X������!2�!2�3����
&�

����
	
rr4N)r5r6r7r8r�r�r�r�r�r�r�r�r�rrrrrrrr&r4r9r=rBr9r4rrr�r�jsp��.�8
*�"4�6�&6�*�2�(�?�(�.�;�
�
� '
�RF�5�B>
�@

�*
�X#
rr�c�~�\rSrSrSSjrSrSrSrSrSr	S	r
S
rSrSr
S
rSrSrSrSrSrSrSrg)�TestCHKMapDifferencei8	Nc�t�Uc[Rn[R"UR5XU5$r)r�_search_key_plain�CHKMapDifferencerC)r�	new_roots�	old_rootsrIs    r�get_difference�#TestCHKMapDifference.get_difference9	s6���"�%�7�7�O��'�'���� �)��
�	
rc�Z�UR5nUR5nURSS5 UR5nUR	U/U/5nURU1UR5 UR/UR5 UR/UR5 g)Nrz�new aaa content)	rrrrBrKr�
_all_old_chks�
_old_queue�
_new_queue)rrt�key1�key2�diffs     r�test__init__�!TestCHKMapDifference.test__init__@	s����'�'�)���y�y�{��
�	�	�)�/�0��{�{�}���"�"�D�6�D�6�2�����$���!3�!3�4�����T�_�_�-�����T�_�_�-rc���URUS9nUR5nURSS5 UR5nUR	U/U/U5nUR5Vs/sHofRPM nnUR
U/U5 UR
S/UR5 UR
/UR5 UR
/UR5 gs snf)NrJrzrN)rzrN)
rrrrBrK�_read_all_rootsr�_new_item_queuerQrP)rrIrtrRrSrTr^�root_resultss        r�help__read_all_roots�)TestCHKMapDifference.help__read_all_rootsJ	s����'�'��'�H���y�y�{��
�	�	�)�/�0��{�{�}���"�"�D�6�D�6�?�C��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�	
���9�:�D�<P�<P�Q�����T�_�_�-�	
����T�_�_�-��Is�)C)c�>�UR[RS9 g�NrJ)r[rrGr#s r�test__read_all_roots_plain�/TestCHKMapDifference.test__read_all_roots_plainZ	s���!�!�'�2K�2K�!�Lrc�>�UR[RS9 gr^)r[rr�r#s r�test__read_all_roots_16�,TestCHKMapDifference.test__read_all_roots_16]	s���!�!�'�2H�2H�!�Irc��UR[R5nUR5nUR	[R5nUR5nURU/U/[R5nUR
5Vs/sHofRPM nnUR/U5 gs snfr)r�rrGrrrKrXr)rrtrR�c_map2rSrTr^rZs        r�$test__read_all_roots_skips_known_old�9TestCHKMapDifference.test__read_all_roots_skips_known_old`	s����&�&�w�'@�'@�A���y�y�{���(�(��)B�)B�C���z�z�|���"�"�D�6�D�6�7�3L�3L�M��15�1E�1E�1G�H�1G�v�
�
�1G��H�	
����\�*��Is�B>c���UR[R5nUR5nUR	5 UR
RSR5nURSS5 UR5nUR
RSR5nURU/U/[R5nUR5Vs/sHowRPM nnURU/U5 URU/UR5 UR/UR5 URU/UR5 gs snf)Nr"r|�new abb content)r�rrGrr�r�r�rrBrKrXrrQrYrP)	rrtrR�key1_arS�key2_arTr^rZs	         r�$test__read_all_roots_prepares_queues�9TestCHKMapDifference.test__read_all_roots_prepares_queuesk	s"���&�&�w�'@�'@�A���y�y�{��
�����!�!�(�(��.�2�2�4��
�	�	�)�/�0��{�{�}���!�!�(�(��.�2�2�4���"�"�D�6�D�6�7�3L�3L�M��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�	
���&��4�?�?�3�����T�1�1�2����&��4�?�?�3��
Is�%E&c��UR[R5nUR5nUR	5 UR
RSR5nUR
RSR5nURSS5 UR5nUR
RSR5nUR
RSR5 [R"UR5U[R5nURSS5 UR5nUR
RSR5 UR
RSR5nURXW/U/[R5n	U	R5V
s/sHo�RPM nn
UR[XW/5[U55 URXh1[U	R 55 UR/U	R"5 URX41[U	R$55 gs sn
f)Nr"�cr|rir�snew ccc content)r�rrGrr�r�r�rrBr	rCrKrXrr�r1rQrYrP)rrtrRrj�key1_crSrk�key3�key3_crTr^rZs            r�.test__read_all_roots_multi_new_prepares_queues�CTestCHKMapDifference.test__read_all_roots_multi_new_prepares_queues|	s����&�&�w�'@�'@�A���y�y�{��
�����!�!�(�(��.�2�2�4���!�!�(�(��.�2�2�4��
�	�	�)�/�0��{�{�}���!�!�(�(��.�2�2�4��
������%�)�)�+����t�1�1�3�T�7�;T�;T�U��
�	�	�)�/�0��{�{�}��
������%�)�)�+��!�!�(�(��.�2�2�4���"�"�D�<�$���9R�9R�S��15�1E�1E�1G�H�1G�v�
�
�1G��H�������-�v�l�/C�D����&�)�3�t���+?�@�����T�1�1�2����&�)�3�t���+?�@��
Is�I<c��UR[R5nUR5 UR	5nUR
RSR	5nUR
RSR	5nUR
RSR	5nUR[R5nUR5 UR	5nUR
RSR	5nUR
RSR	5n	URU/U/[R5n
U
R5Vs/sHo�RPM nnURU/U5 URU/U
R5 URX�1[U
R55 UR/U
R5 URU/U/[R5n
U
R5Vs/sHo�RPM nnURU/U5 URX�1[U
R55 URX4U1[U
R55 UR/U
R5 gs snfs snf)Nr"ro�dru�ad)r�rrGr�rr�r�r�rKrXrrPr1rQrY)
rrtrRrjrp�key1_drerS�key2_aa�key2_adrTr^rZs
             r�%test__read_all_roots_different_depths�:TestCHKMapDifference.test__read_all_roots_different_depths�	s?���&�&�w�'@�'@�A��
�����y�y�{���!�!�(�(��.�2�2�4���!�!�(�(��.�2�2�4���!�!�(�(��.�2�2�4���2�2�7�3L�3L�M�������z�z�|���#�#�*�*�5�1�5�5�7���#�#�*�*�5�1�5�5�7���"�"�D�6�D�6�7�3L�3L�M��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�	
���&��4�?�?�3����'�+�S����-A�B�����T�1�1�2��"�"�D�6�D�6�7�3L�3L�M��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.����'�+�S����-A�B����&�&�1�3�t���3G�H�����T�1�1�2��I��Is�7K	�5Kc���UR[R5nUR5 UR	5nUR
RSR	5nUR
RSR	5nUR
RSR	5nUR
RSR	5nUR[R5nUR5 UR	5nUR
RSR	5n	UR
RSR	5n
UR
RSR	5nUR
RSR	5nURU/U/[R5n
U
R5Vs/sHo�RPM nnURU/U5 URU/U
R5 UR[X�X�/5[U
R55 UR/U
R5 URU/U/[R5n
U
R5Vs/sHo�RPM nnURU/U5 UR[X�X�/5[U
R55 UR[X4XV/5[U
R55 UR/U
R5 gs snfs snf)	Nr0�4�C�FsF0sF3sF4sFD)r�rr�r�rr�r�r�rKrXrrPr�rQrY)rrtrR�key1_2�key1_4�key1_C�key1_FrerS�key2_F0�key2_F3�key2_F4�key2_FDrTr^rZs                r�(test__read_all_roots_different_depths_16�=TestCHKMapDifference.test__read_all_roots_different_depths_16�	s����&�&�w�'=�'=�>��
�����y�y�{���!�!�(�(��.�2�2�4���!�!�(�(��.�2�2�4���!�!�(�(��.�2�2�4���!�!�(�(��.�2�2�4���2�2�7�3I�3I�J�������z�z�|���#�#�*�*�5�1�5�5�7���#�#�*�*�5�1�5�5�7���#�#�*�*�5�1�5�5�7���#�#�*�*�5�1�5�5�7���"�"�D�6�D�6�7�3I�3I�J��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.����&��4�?�?�3�����G�g�7�8�&����:Q�	
�	
����T�1�1�2��"�"�D�6�D�6�7�3I�3I�J��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�����G�g�7�8�&����:Q�	
�	
����F�F�3�4�f�T�_�_�6M�	
�	
����T�1�1�2��'I��Is�,M�4M c��UR[R5nUR5 UR	5nUR
RSR	5nUR
RSR	5 UR[R5nUR5 UR	5nUR
RSR	5nUR
RSR	5nURU/U/[R5nUR5V	s/sHo�RPM n
n	URU/U
5 UR/UR5 URU/UR5 UR/UR5 URU/U/[R5nUR5V	s/sHo�RPM n
n	URU/U
5 URU/UR5 URU/UR5 UR/UR5 gs sn	fs sn	f)Nrurwr"r.)r�rrGr�rr�r�r�rKrXrrPrQrY)rrtrR�key1_aarerSrk�key2_brTr^rZs           r� test__read_all_roots_mixed_depth�5TestCHKMapDifference.test__read_all_roots_mixed_depth�	s
���1�1�'�2K�2K�L��
�����y�y�{���"�"�)�)�%�0�4�4�6��
������&�*�*�,��2�2�7�3L�3L�M�������z�z�|���"�"�)�)�$�/�3�3�5���"�"�)�)�$�/�3�3�5���"�"�D�6�D�6�7�3L�3L�M��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�	
����T�_�_�-����&��4�?�?�3�����T�1�1�2��"�"�D�6�D�6�7�3L�3L�M��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�	
���&��4�?�?�3����'��D�O�O�4�����T�1�1�2��)I��Is�J�J
c��UR[R5nUR5 UR	5nUR
RSR	5nURSSS.SS9nURSUR55 UR	5nURU/U/[R5nUR5Vs/sHowRPM nnURU/U5 URU/UR5 URSS	1[UR55 gs snf)
Nr"r�r�)r�r�r�r�zV'' LeafNode
      ('acc',) 'initial acc content'
      ('ace',) 'initial ace content'
)r�r�)r�r�)r�rrGr�rr�r�rur�rKrXrrPr1rY)	rrtrRrjrerSrTr^rZs	         r�.test__read_all_roots_yields_extra_deep_records�CTestCHKMapDifference.test__read_all_roots_yields_extra_deep_records�	s;���&�&�w�'@�'@�A��
�����y�y�{���!�!�(�(��.�2�2�4�����1�1�
���
��	
���
5�
����		
��z�z�|���"�"�D�6�D�6�7�3L�3L�M��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�	
���&��4�?�?�3����3�3�
�
��$�$�%�	
��
Is�Ec��UR5nUR5nUR5nUR5nUR5 URR
SR5nURR
SR5nUR
SS5 UR5nURR
SR5nURX6/U/[R5nUR5V	s/sHo�RPM n
n	UR[X6/5[U
55 UR/UR5 UR[XGU/5[UR55 UR/UR 5 gs sn	f)Nrorvr��
new ccc value)rrr�r�r�r�rrBrKrrGrXrr�rPrQrY)rrtrRrS�key2_c�key2_drqrrrTr^rZs           r�%test__read_all_roots_multiple_targets�:TestCHKMapDifference.test__read_all_roots_multiple_targets(
sg���'�'�)���y�y�{���&�&�(���y�y�{��
�����!�!�(�(��.�2�2�4���!�!�(�(��.�2�2�4��
�	�	�)�-�.��{�{�}���!�!�(�(��.�2�2�4���"�"�D�<�$���9R�9R�S��15�1E�1E�1G�H�1G�v�
�
�1G��H�������-�v�l�/C�D�����T�_�_�-�	
������ 8�9�6�$�/�/�;R�S�����T�1�1�2��
Is�Gc��UR5nUR5nURU//[R5nUR5Vs/sHoDRPM nnUR
/U5 UR
/UR5 UR
U/UR5 UR
/UR5 UR5nUR5nURX'//[R5nUR5Vs/sHoDRPM nnUR
/U5 UR
/UR5 UR
[X'/5[UR55 UR
/UR5 gs snfs snfr)r�rrKrrGrXrrPrQrYr�r��rrtrRrTr^rZrerSs        r�test__read_all_roots_no_old�0TestCHKMapDifference.test__read_all_roots_no_old<
sf���&�&�(���y�y�{���"�"�D�6�2�w�/H�/H�I��15�1E�1E�1G�H�1G�v�
�
�1G��H�����\�*�����T�_�_�-����$�����1�����T�1�1�2��'�'�)���z�z�|���"�"�D�<��W�5N�5N�O��15�1E�1E�1G�H�1G�v�
�
�1G��H�����\�*�����T�_�_�-�������-�v�d�o�o�/F�G�����T�1�1�2��I��Is�F8�'F=c��UR[R5nUR5nUR	U//[R5nUR5Vs/sHoDRPM nnUR
/U5 UR
/UR5 UR
U/UR5 UR
/UR5 UR[R5nUR5nUR	X'//[R5nUR5Vs/sHoDRPM nnUR
/U5 UR
/UR5 UR
[X'/5[UR55 UR
/UR5 gs snfs snfr)r�rr�rrKrXrrPrQrYr�r�r�s        r�test__read_all_roots_no_old_16�3TestCHKMapDifference.test__read_all_roots_no_old_16R
st���&�&�w�'=�'=�>���y�y�{���"�"�D�6�2�w�/E�/E�F��15�1E�1E�1G�H�1G�v�
�
�1G��H�����\�*�����T�_�_�-����$�����1�����T�1�1�2��'�'��(>�(>�?���z�z�|���"�"�D�<��W�5K�5K�L��15�1E�1E�1G�H�1G�v�
�
�1G��H�����\�*�����T�_�_�-�������-�v�d�o�o�/F�G�����T�1�1�2��I��Is�$G�Gc�J�UR5nUR5nUR5 URRSR5nURSS5 UR
5nURRSR5 URSS5 UR
5nURRSR5nURU/X$/[R5nUR5Vs/sHo�RPM n	nURU/U	5 URU/UR5 URU/UR5 UR/UR5 gs snf)Nr"r�r�r�s
new add value)r�rr�r�r�rrBrKrrGrXrrPrQrY)
rrtrRrjrSrq�key3_arTr^rZs
          r�!test__read_all_roots_multiple_old�6TestCHKMapDifference.test__read_all_roots_multiple_olde
sQ���&�&�(���y�y�{��
�����!�!�(�(��.�2�2�4��
�	�	�)�-�.��{�{�}��
������%�)�)�+�
�	�	�)�-�.��{�{�}���!�!�(�(��.�2�2�4���"�"�D�6�D�<��9R�9R�S��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.�	
���&��4�?�?�3����&��4�?�?�3�����T�1�1�2��
Is�F c	�`�UR5nUR5nUR5 URRSR5nURRSRSR5nURRSRSR5nURRSRSR5nURRSRSR5nURSS5 UR
5nURRSR5n	URRSRSR5n
URSS	5 UR
5nURRSR5nURRSRSR5 URU/X(/[R5n
U
R5Vs/sHo�RPM nnURU/U5 UR[X9/5[U
R55 URU/U
R5 UR/U
R5 U
R!5 UR[XEXgU
/5[U
R55 gs snf)
Nr"rurvrUrwrzs
new aaa valuer�snew acc content)r�rr�r�r�rrBrKrrGrXrr�rPrQrY�_process_next_old)rrtrRrjr��key1_ab�key1_ac�key1_adrSrkryrqr�rTr^rZs                r�'test__process_next_old_batched_no_dupes�<TestCHKMapDifference.test__process_next_old_batched_no_dupesy
s����&�&�(���y�y�{��
�����!�!�(�(��.�2�2�4���"�"�)�)�$�/�6�6�u�=�A�A�C���"�"�)�)�$�/�6�6�u�=�A�A�C���"�"�)�)�$�/�6�6�u�=�A�A�C���"�"�)�)�$�/�6�6�u�=�A�A�C��
�	�	�)�-�.��{�{�}���!�!�(�(��.�2�2�4���"�"�)�)�$�/�6�6�u�=�A�A�C��
�	�	�)�/�0��{�{�}���!�!�(�(��.�2�2�4��
������%�,�,�U�3�7�7�9��"�"�D�6�D�<��9R�9R�S��15�1E�1E�1G�H�1G�v�
�
�1G��H����$���.������ 0�1�6�$�/�/�3J�K����&��4�?�?�3�����T�1�1�2���� �	
����G�g��@�A��4�?�?�#�	
��Is�L+r4r)r5r6r7r8rKrUr[r_rbrfrlrsr{r�r�r�r�r�r�r�r�r9r4rrrErE8	s]��
�.�.� M�J�	+�4�"A�03�>%3�N"3�H(
�T3�(3�,3�&3�(
rrEc�Z�\rSrSrSSjrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rg)�TestIterInterestingNodesi�
c�@�URXS9nUR5$)Nr�)rur)rrMrGrts    r�get_map_key�$TestIterInterestingNodes.get_map_key�
s�����V��?���y�y�{�rc��UR5n[RUl[R"XSU5n/n/nUH=up�U	bURU	R5 U
(dM,URU
5 M? UR[U5[U55 UR[U5[U55 g)aCheck the result of iter_interesting_nodes.

Note that we no longer care how many steps are taken, etc, just that
the right contents are returned.

:param records: A list of record keys that should be yielded
:param items: A list of items (key,value) that should be yielded.
N)
rCrrGr3�iter_interesting_nodes�appendrr�rr�)r�recordsr�interesting_keys�old_keysr�
iter_nodes�record_keys�	all_itemsr^�	new_itemss           r�assertIterInteresting�.TestIterInterestingNodes.assertIterInteresting�
s����"�"�$��!(�!:�!:����3�3�E�X�V�
����	�!+��F��!��"�"�6�:�:�.��y�� � ��+�	",�
	
������&��*=�>��������y�(9�:rc�X�URSS05nURU/S/U//5 g�Nr!�content)r!r��r�r�)rr�s  r�test_empty_to_one_keys�/TestIterInterestingNodes.test_empty_to_one_keys�
s4���!�!�7�J�"7�8���"�"�F�8�.C�-D�v�h�PR�Src�|�UR05nURSS05nURU/S/U/U/5 gr�r�r�s   r�test_none_to_one_key�-TestIterInterestingNodes.test_none_to_one_key�
sG��� � ��$���!�!�7�J�"7�8���"�"�F�8�.C�-D�v�h�QV�PW�Xrc�z�URSS05nUR05nURU//U/U/5 g)Nr!r�r�r�s   r�test_one_to_none_key�-TestIterInterestingNodes.test_one_to_none_key�
sA��� � �'�:�!6�7���!�!�"�%���"�"�F�8�R�&��E�7�Crc�J�URSSSS.5nURSSSS.5n[UR5U5nURSUR	55 UR
RSR5nURX$/S/U/U/5 g)Nr�)r!r��ro�
other contentz�'' InternalNode
  'a' LeafNode
      ('a',) 'content'
  'b' LeafNode
      ('b',) 'other content'
  'c' LeafNode
      ('c',) 'content'
r.)r�r��	r�r	rCr�r�r�r�rr�)rr�r��
target_map�b_keys     r�test_common_pages�*TestIterInterestingNodes.test_common_pages�
s���� � �#�#�#�
�
���!�!�#�)�#�
�
���D�.�.�0�&�9�
����
'�
�!�!�#�		
��%�%�,�,�T�2�6�6�8���"�"�
�O�9�:�V�H�u�g�	
rc��URSSS.5nURSSSS.5n[UR5U5nURSUR	55 UR
RSR5nUR
RSRSR5nURX$U/S/U/U/5 g)	Nr<)rzr��new)rzrr�z�'' InternalNode
  'a' InternalNode
    'aaa' LeafNode
      ('aaa',) 'common'
    'aab' LeafNode
      ('aab',) 'new'
  'c' LeafNode
      ('c',) 'common'
r"r)rr�r�)rr�r�r��a_keyr�s      r�test_common_sub_page�-TestIterInterestingNodes.test_common_sub_page�
s���� � �$�"�
�
���!�!�$�!�"�
�
���D�.�.�0�&�9�
����
&�
�!�!�#�
	
��%�%�,�,�T�2�6�6�8���'�'�.�.�t�4�;�;�F�C�G�G�I���"�"�
�G�$�':�&;�f�X��w�	
rc���UR05nURSS05nURSSS.5nURSSSS.5n[UR5U5nURSUR	55 [UR5U5nURSUR	55 [UR5U5nURS	UR	55 UR
R
5 UR
RS
R
5nUR
RSR
5n	UR
RSRSR
5n
URX#XIX�//S
QX#U/U/5 URX4X�U/SS/X4/U/5 URU//U/U/5 g)Nrzr<r�)rzr��other�rzrr�z$'' LeafNode
      ('aaa',) 'common'
z['' InternalNode
  'a' LeafNode
      ('aaa',) 'common'
  'b' LeafNode
      ('bbb',) 'new'
z�'' InternalNode
  'a' InternalNode
    'aaa' LeafNode
      ('aaa',) 'common'
    'aac' LeafNode
      ('aac',) 'other'
  'b' LeafNode
      ('bbb',) 'new'
r.r"r))rzr<�r�r��rr�r�r�)	r�r	rCr�r�r�rr�r�)rr��target1�target2�target3�target1_map�target2_map�target3_mapr�r�r�s           r�test_common_leaf�)TestIterInterestingNodes.test_common_leafs���� � ��$���"�"�I�y�#9�:���"�"�$�!�
�
���"�"�$�#�!�
�
���T�/�/�1�7�;�����4�k�6L�6L�6N�	
��T�/�/�1�7�;�����
%�

�"�"�$�
	
��T�/�/�1�7�;�����
%�
�"�"�$�
	
�	���"�"�$��&�&�-�-�d�3�7�7�9���&�&�-�-�d�3�7�7�9���(�(�/�/��5�<�<�V�D�H�H�J���"�"�
�w�w�>�P�
�w�'�
�G�		
�	
�"�"�
�u�u�5�
 �"7�8�
��
�I�		
�	
�"�"�G�9�b�7�)�g�Y�Grc�2�URSSS.5nURSSS.5nURSSSS.5nURSSSS	.5n[UR5U5nURS
UR	55 UR
RSR5nUR
RSRSR5n[UR5U5nURS
UR	55 UR
RSR5n	UR
RSRSR5n
URX4XgX�/SS/X4/X/5 g)Nr<sbasis1r"sbasis2)r�)sbbc�target1r�r@)rzr>r�z�'' InternalNode
  'a' InternalNode
    'aaa' LeafNode
      ('aaa',) 'common'
    'aac' LeafNode
      ('aac',) 'target1'
  'b' LeafNode
      ('bbb',) 'common'
r"rz�'' InternalNode
  'a' LeafNode
      ('aaa',) 'common'
  'b' InternalNode
    'bba' LeafNode
      ('bba',) 'target2'
    'bbb' LeafNode
      ('bbb',) 'common'
r.r?)rr�)r>r@r�)r�basis1�basis2r�r�r�r�r�r�r��bba_keys           r�test_multiple_maps�+TestIterInterestingNodes.test_multiple_mapsHs����!�!�$�$�
�
���!�!�$�$�
�
���"�"�$�%�$�
�
���"�"�$�%�$�
�
���T�/�/�1�7�;�����
(�
�"�"�$�
	
��&�&�-�-�d�3�7�7�9���(�(�/�/��5�<�<�V�D�H�H�J���T�/�/�1�7�;�����
(�
�"�"�$�
	
��&�&�-�-�d�3�7�7�9���(�(�/�/��5�<�<�V�D�H�H�J���"�"�
�u�u�>�
$�&=�>�
��
��		
rc�\�URSSSS.5nURSSSSS.5nURSS05n[UR5U5nURSUR	55 [UR5U5nURS	UR	55 UR
RS
R5n[UR5U5nURSUR	55 URX2U/S/X#/U/5 g)
Nsleftsrightr<)rzr|r��changer�r|z�'' InternalNode
  'a' InternalNode
    'aa' LeafNode
      ('aaa',) 'left'
    'ab' LeafNode
      ('abb',) 'right'
  'c' LeafNode
      ('ccc',) 'common'
z�'' InternalNode
  'a' InternalNode
    'aa' LeafNode
      ('aaa',) 'left'
    'ab' LeafNode
      ('abb',) 'right'
  'c' LeafNode
      ('ccc',) 'common'
  'd' LeafNode
      ('ddd',) 'change'
rvz#'' LeafNode
      ('abb',) 'right'
)r�r�r�)rr��left�right�	basis_map�left_map�l_d_key�	right_maps        r�)test_multiple_maps_overlapping_common_new�BTestIterInterestingNodes.test_multiple_maps_overlapping_common_new�sO��� � �#�#�$�
�
�����#�#�$�$�

�	
��� � ��8�
�
���4�-�-�/��7�	����
(�
� � �"�
	
��$�,�,�.��5�����	
(�
���!�	
��%�%�,�,�T�2�6�6�8���4�-�-�/��7�	����3�Y�5I�5I�5K�	
�
	
�"�"�
�'�"�%;�$<�t�m�e�W�	
rc�J�URSSSSS.SS9nURSSSSS.SS9nURSSSSS.SS9n[UR5U5nURS	UR	55 [UR5U5nURS
UR	55 UR
RSR5nUR
RSR5 [UR5U5nURS
UR	55 UR
RSR5 UR
RSR5nURX2Xh/SS/X#/U/5 g)Ns	unchangedswill change leftswill change right)rzr|)scaa�scbb�<r��changed left�
changed rightz�'' InternalNode
  'a' LeafNode
      ('aaa',) 'unchanged'
      ('abb',) 'will change left'
  'c' LeafNode
      ('caa',) 'unchanged'
      ('cbb',) 'will change right'
z�'' InternalNode
  'a' LeafNode
      ('aaa',) 'unchanged'
      ('abb',) 'changed left'
  'c' LeafNode
      ('caa',) 'unchanged'
      ('cbb',) 'will change right'
r"roz�'' InternalNode
  'a' LeafNode
      ('aaa',) 'unchanged'
      ('abb',) 'will change left'
  'c' LeafNode
      ('caa',) 'unchanged'
      ('cbb',) 'changed right'
)r|r�)r�r�r�)	rr�r�r�r�r��l_a_keyr��r_c_keys	         r�test_multiple_maps_similar�3TestIterInterestingNodes.test_multiple_maps_similar�s���� � �'�.�'�/�	
��!�
�����'�*�'�/�	
�� �
��� � �'�.�'�+�	
��!�
���4�-�-�/��7�	����
3�
� � �"�		
��$�,�,�.��5�����
3�
���!�		
��%�%�,�,�T�2�6�6�8�����"�"�4�(�,�,�.��4�-�-�/��7�	����
/�
� � �"�		
�	���#�#�D�)�-�-�/��&�&�-�-�d�3�7�7�9���"�"�
�'�+�
)�+H�I�
�M�
�G�		
rr4N)r:)r5r6r7r8r�r�r�r�r�r�r�r�r�r�r�r9r4rrr�r��
sF���;�,T�Y�
D�

�@!
�FAH�FA
�FN
�`K
rr�N)r��rrrrrr	r
rr�TestCaser�TestCaseWithMemoryTransportr;rkr�r�r&r*r,rTr�rEr�r4rr�<module>r�s���"=�&�&�%�:�:�/�u�~�~�/�6*+��9�9�*+�Z]
�/�]
�@m
�"9�m
�`Z
��Z
�z"�
(�N
�)�N
�b@?�$�@?�Fa
�(�a
�\^
�2�^
�BM
�6�M
r

Youez - 2016 - github.com/yon3zu
LinuXploit