a ze^@s>ddlZddlZddlZddlZddlZddlZddlZddlZddl Z Gddde Z Gddde Z Gddde ZGdd d e ZGd d d eZGd d d eZGdddeZGdddeZGdddeZGdddeZGdddZGdddZGddde jZGdddejZedkr:e dS)Nc@s eZdZdS)list2N__name__ __module__ __qualname__rrD/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_pprint.pyrsrc@seZdZddZdS)list3cCs t|SN)list__repr__selfrrrr szlist3.__repr__Nrrrr rrrrr sr c@s eZdZdS)tuple2Nrrrrrrsrc@seZdZddZdS)tuple3cCs t|Sr )tupler r rrrr sztuple3.__repr__Nrrrrrrsrc@s eZdZdS)set2Nrrrrrrsrc@seZdZddZdS)set3cCs t|Sr )setr r rrrr sz set3.__repr__Nrrrrrrsrc@s eZdZdS) frozenset2Nrrrrrr#src@seZdZddZdS) frozenset3cCs t|Sr ) frozensetr r rrrr 'szfrozenset3.__repr__Nrrrrrr&src@s eZdZdS)dict2Nrrrrrr*src@seZdZddZdS)dict3cCs t|Sr )dictr r rrrr .szdict3.__repr__Nrrrrrr-src@seZdZddZdS) UnorderablecCs tt|Sr )stridr rrrr 2szUnorderable.__repr__Nrrrrrr1src@sLeZdZddZddZddZddZd d Zd d Zd dZ ddZ dS) OrderablecCs ||_dSr _hash)rhashrrr__init__7szOrderable.__init__cCsdS)NFrrotherrrr__lt__9szOrderable.__lt__cCs||kSr rr$rrr__gt__;szOrderable.__gt__cCs||kSr rr$rrr__le__=szOrderable.__le__cCsdS)NTrr$rrr__ge__?szOrderable.__ge__cCs||uSr rr$rrr__eq__AszOrderable.__eq__cCs||uSr rr$rrr__ne__CszOrderable.__ne__cCs|jSr r r rrr__hash__EszOrderable.__hash__N) rrrr#r&r'r(r)r*r+r,rrrrr6src@s2eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zejejjd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Z d3d4Z!d5d6Z"d7d8Z#d9d:Z$d;d<Z%d=d>Z&d?d@Z'dAdBZ(dCdDZ)dEdFZ*dGS)H QueryTestCasecCs,ttd|_ttd|_|j|jd<dS)Ndi)r rangeabr rrrsetUpJszQueryTestCase.setUpcCst}tjdddtdd}tdddt}tjdd}|t&tdddtd}Wdn1sv0Y|jttjdd |jttjd d |jttjdd |jttjd d dS) N(T)indentwidthdepthstreamcompactFZ sort_dictsr7rr9r8)pprint PrettyPrinterioStringIOZ assertRaises TypeError ValueError)rpprrr test_initOs   4zQueryTestCase.test_initcCst}dddddgdddidtdd d dd |j|jfD]d}|t|d |f|t|d |f|||d |f|||d |fq8dS)Ng@y@abc)rIrIsdefsghiTF.expected not isrecursive for %rexpected isreadable for %r) rArB bytearrayr1r2 assertFalse isrecursive assertTrue isreadable)rrGsaferrr test_basic\s"    zQueryTestCase.test_basiccCsH|j|jd<i|_|j|jd<|jd<|jd<t}|j|j|j|j|jffD]L}|t|d|t|d|||d|||dqT|j |jdd=|jdd=|j|j|j|j|jffD]d}|t|d|f|t|d|f|||d|f|||d|fqdS) NCrrIzexpected isrecursivezexpected not isreadablerLrM) r1r2drArBrQrPrOrRclear)rrGZickyrSrrr test_knottedms2         zQueryTestCase.test_knottedcCst}tdttjfD]d}|t|d|f|t|d|f|||d|f|||d|fqdS)NrKrLzexpected not isreadable for %r)rArBtyperPrOrR)rrGZ unreadablerrrtest_unreadables    zQueryTestCase.test_unreadablec9Csdddddddtdttgttttttt t it t |j tdddd d d td d d gd didd dgdditdtdttdd dgtd dgtd dgttdtdhtdhtdhtdht dht dht ddit dditdddddddf9D]R}t|}|t|||tj|ddddd||t||q dS)NrygriygxxrKrK)rVrIr4r6r. ir=TF.rV)r8r7  )rNrrrr rrrrrrrrrQrAr0repr assertEqualpformatreplaceZsaferepr)rsimpleZnativerrrtest_same_as_reprs4       $ zQueryTestCase.test_same_as_reprcCsdddddddd}d}ttfD]}|t|||q td}ddtt|}t t fD]}|t|||q`t td}d dtt|}t t fD]}|t|||qtd}d d tt|}t t fD]}|tj||d d |qdS)Nrii)ZRPM_calZRPM_cal2Z Speed_calZcontroldesk_runtime_usZmain_code_runtime_usZread_io_runtime_usZwrite_io_runtime_usz{'RPM_cal': 0, 'RPM_cal2': 48059, 'Speed_cal': 0, 'controldesk_runtime_us': 0, 'main_code_runtime_us': 0, 'read_io_runtime_us': 0, 'write_io_runtime_us': 43690}r.z[%s]z, z(%s)z[ %s]z, r4r>) rrrhrArir0joinmaprr rrr)roexprZrrrtest_basic_line_wraps.     z"QueryTestCase.test_basic_line_wrapcCs^ttd}tdddd}||g}d}|tj|ddd |d }|tj|dd d |dS) NrdrVrIrK)firstsecondthirdzN[ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], {'first': 1, 'second': 2, 'third': 3}]r4*)r7r8za[ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], { 'first': 1, 'second': 2, 'third': 3}]))r r0rrhrAri)rZo1Zo2roexpectedrrrtest_nested_indentationss z&QueryTestCase.test_nested_indentationscCshd}t|}|tj|dd||tj|dd||tj|dd||tj|ddddS)Nz[[[[[[1, 2, 3], '1 2']]]], {1: [1, 2, 3], 2: [12, 34]}, 'abc def ghi', ('ab cd ef',), set2({1, 23}), [[[[[1, 2, 3], '1 2']]]]]r@z[[[[[[1, 2, 3], '1 ' '2']]]], {1: [1, 2, 3], 2: [12, 34]}, 'abc def ' 'ghi', ('ab cd ' 'ef',), set2({1, 23}), [[[[[1, 2, 3], '1 ' '2']]]]])evalrhrAri)rrwrorrr test_widths  zQueryTestCase.test_widthcCsTdddd}|t|d|t||gd|tdggidddS)NrVr1r2cz{'a': 1, 'b': 1, 'c': 1}z4[{'a': 1, 'b': 1, 'c': 1}, {'a': 1, 'b': 1, 'c': 1}]r`)zxy ab r6rz#{5: [[]], 'xy\tab\n': (3,), (): {}})rhrArirrWrrrtest_sorted_dicts zQueryTestCase.test_sorted_dictcCs>td}|tj|ddd|tj||gddddS)NZcbaFr<z!{'c': None, 'b': None, 'a': None}zF[{'c': None, 'b': None, 'a': None}, {'c': None, 'b': None, 'a': None}])rfromkeysrhrArirrrrtest_sort_dict)s  zQueryTestCase.test_sort_dictcCspt}|tj|dddtg}|tj|dddd}tt|t}|t|ddS)NrVr@z OrderedDict()*the quick brown fox jumped over a lazy dogzOrderedDict([('the', 0), ('quick', 1), ('brown', 2), ('fox', 3), ('jumped', 4), ('over', 5), ('a', 6), ('lazy', 7), ('dog', 8)])) collections OrderedDictrhrArisplitzip itertoolscountrrWwordsrrrtest_ordered_dict/s  zQueryTestCase.test_ordered_dictcCsjd}tt|t}t|}|t |dt t|t}t|}|t |ddS)Nrzmappingproxy({'a': 6, 'brown': 2, 'dog': 8, 'fox': 3, 'jumped': 4, 'lazy': 7, 'over': 5, 'quick': 1, 'the': 0})a^mappingproxy(OrderedDict([('the', 0), ('quick', 1), ('brown', 2), ('fox', 3), ('jumped', 4), ('over', 5), ('a', 6), ('lazy', 7), ('dog', 8)]))) rrrrrtypesMappingProxyTyperhrArirr)rrrWmrrrtest_mapping_proxyBs   z QueryTestCase.test_mapping_proxycCs"t}t|}||ddS)Nz namespace()rSimpleNamespacerArirhrns formattedrrrtest_empty_simple_namespace]s z)QueryTestCase.test_empty_simple_namespacecCs(tjddd}t|}||ddS)NrVrI)r1r2znamespace(a=1, b=2)rrrrrtest_small_simple_namespacebs z)QueryTestCase.test_small_simple_namespacec Cs:tjddddddddd d }tj|d d }||d dS)NrrVrIrKr4r6rarbrc ZtheZquickZbrownfoxZjumpedZoverr1ZlazyZdog<r@znamespace(the=0, quick=1, brown=2, fox=3, jumped=4, over=5, a=6, lazy=7, dog=8)rrrrrtest_simple_namespacegs z#QueryTestCase.test_simple_namespacec CsJGdddtj}|ddddddd d d d }tj|d d}||ddS)Nc@s eZdZdS)zGQueryTestCase.test_simple_namespace_subclass..AdvancedNamespaceNrrrrrAdvancedNamespacer]rrrVrIrKr4r6rarbrcrrr@zAdvancedNamespace(the=0, quick=1, brown=2, fox=3, jumped=4, over=5, a=6, lazy=7, dog=8)r)rrrrrrrtest_simple_namespace_subclasss z,QueryTestCase.test_simple_namespace_subclasscCs&ddd}d}|t||dS)Nz should be presented using repr()z like.this)znames with spaceszothers.should.not.bez[{'names with spaces': 'should be presented using repr()', others.should.not.be: like.this})rhDottedPrettyPrinterri)rrorprrrtest_subclassings zQueryTestCase.test_subclassingcCs|ttd|tttdd|tjttdddd|tjttdddd|tjttdddd |ttd |tttdd |tjttdddd |tjttdddd |tjt tdddddS)Nzset()rKz {0, 1, 2}rbr@z{0, 1, 2, 3, 4, 5, 6}z?set2({0, 1, 2, 3, 4, 5, 6})zset3({0, 1, 2, 3, 4, 5, 6})z frozenset()zfrozenset({0, 1, 2})zbfrozenset({0, 1, 2, 3, 4, 5, 6})zifrozenset2({0, 1, 2, 3, 4, 5, 6})z!frozenset3({0, 1, 2, 3, 4, 5, 6})) rhrArirr0rrrrrr rrrtest_set_reprss zQueryTestCase.test_set_reprscCsHd}tjd}|t||d}tj|}|t||dS)NaE{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}), frozenset({0}): frozenset({frozenset(), frozenset({0, 2}), frozenset({0, 1})}), frozenset({1}): frozenset({frozenset(), frozenset({1, 2}), frozenset({0, 1})}), frozenset({2}): frozenset({frozenset(), frozenset({1, 2}), frozenset({0, 2})}), frozenset({1, 2}): frozenset({frozenset({2}), frozenset({1}), frozenset({0, 1, 2})}), frozenset({0, 2}): frozenset({frozenset({2}), frozenset({0}), frozenset({0, 1, 2})}), frozenset({0, 1}): frozenset({frozenset({0}), frozenset({1}), frozenset({0, 1, 2})}), frozenset({0, 1, 2}): frozenset({frozenset({1, 2}), frozenset({0, 2}), frozenset({0, 1})})}rKaK5{frozenset({frozenset({0, 2}), frozenset({0})}): frozenset({frozenset({frozenset({0, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({0}), frozenset({0, 1})}), frozenset({frozenset(), frozenset({0})}), frozenset({frozenset({2}), frozenset({0, 2})})}), frozenset({frozenset({0, 1}), frozenset({1})}): frozenset({frozenset({frozenset({0, 1}), frozenset({0, 1, 2})}), frozenset({frozenset({0}), frozenset({0, 1})}), frozenset({frozenset({1}), frozenset({1, 2})}), frozenset({frozenset(), frozenset({1})})}), frozenset({frozenset({1, 2}), frozenset({1})}): frozenset({frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({2}), frozenset({1, 2})}), frozenset({frozenset(), frozenset({1})}), frozenset({frozenset({1}), frozenset({0, 1})})}), frozenset({frozenset({1, 2}), frozenset({2})}): frozenset({frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({1}), frozenset({1, 2})}), frozenset({frozenset({2}), frozenset({0, 2})}), frozenset({frozenset(), frozenset({2})})}), frozenset({frozenset(), frozenset({0})}): frozenset({frozenset({frozenset({0}), frozenset({0, 1})}), frozenset({frozenset({0}), frozenset({0, 2})}), frozenset({frozenset(), frozenset({1})}), frozenset({frozenset(), frozenset({2})})}), frozenset({frozenset(), frozenset({1})}): frozenset({frozenset({frozenset(), frozenset({0})}), frozenset({frozenset({1}), frozenset({1, 2})}), frozenset({frozenset(), frozenset({2})}), frozenset({frozenset({1}), frozenset({0, 1})})}), frozenset({frozenset({2}), frozenset()}): frozenset({frozenset({frozenset({2}), frozenset({1, 2})}), frozenset({frozenset(), frozenset({0})}), frozenset({frozenset(), frozenset({1})}), frozenset({frozenset({2}), frozenset({0, 2})})}), frozenset({frozenset({0, 1, 2}), frozenset({0, 1})}): frozenset({frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({0, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({0}), frozenset({0, 1})}), frozenset({frozenset({1}), frozenset({0, 1})})}), frozenset({frozenset({0}), frozenset({0, 1})}): frozenset({frozenset({frozenset(), frozenset({0})}), frozenset({frozenset({0, 1}), frozenset({0, 1, 2})}), frozenset({frozenset({0}), frozenset({0, 2})}), frozenset({frozenset({1}), frozenset({0, 1})})}), frozenset({frozenset({2}), frozenset({0, 2})}): frozenset({frozenset({frozenset({0, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({2}), frozenset({1, 2})}), frozenset({frozenset({0}), frozenset({0, 2})}), frozenset({frozenset(), frozenset({2})})}), frozenset({frozenset({0, 1, 2}), frozenset({0, 2})}): frozenset({frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({0, 1}), frozenset({0, 1, 2})}), frozenset({frozenset({0}), frozenset({0, 2})}), frozenset({frozenset({2}), frozenset({0, 2})})}), frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}): frozenset({frozenset({frozenset({0, 2}), frozenset({0, 1, 2})}), frozenset({frozenset({0, 1}), frozenset({0, 1, 2})}), frozenset({frozenset({2}), frozenset({1, 2})}), frozenset({frozenset({1}), frozenset({1, 2})})})})testZtest_setcuberhrAriZ linegraph)rZ cube_repr_tgtrZ cubo_repr_tgtZcuborrrtest_set_of_sets_reprss  z$QueryTestCase.test_set_of_sets_reprscCsd}dddddddiiiiii}ddddddggggggg}|t|t||t|t||t|t|d}d }d }|tj|dd ||tj|dd ||tj|dd |dS) N)rV)rI)rK)r4)r6rarVrIrKr4r6raz (1, (...))z {1: {...}}z [1, [...]]r?)rhrArirg)rZ nested_tupleZ nested_dictZ nested_listZ lv1_tupleZlv1_dictZlv1_listrrr test_depthszQueryTestCase.test_depthc Cs d}ddt|D}t|t|td}dd}||tt|dd t t |d ||tt |d d t t |d ||tt |dd d d |Dd |ttdddidt tdddg}|tt |ddtt|tddS)NrcSsg|] }tqSr)r.0irrr r]z>QueryTestCase.test_sort_unorderable_values..)keycSs|ddddS)Nrfr\re)rj)srrrr]z.{,}z frozenset({z})css|]}d|VqdS)z%r:NoneNr)rkrrr r]z=QueryTestCase.test_sort_unorderable_values..rrVz{1: 0, z: 0})rVr z{%r: 0, %r: 0})r0randomshufflesortedrrhrArirrmrnrgrrrrr)rnkeysZskeysZcleanrrrtest_sort_unorderable_valuess*  z*QueryTestCase.test_sort_unorderable_valuescCs t}tt|}||||tt|tt||t||g||g|t||g||g|tj t ||gddd||f|tj t ||gddd||f|tj t ||gddd||f|tj t ||gddd||fdS)NrVr@z {%r, %r}z{%r: None, %r: None}) rrr"Z assertLessrrZrhrrArirrr)rr1r2rrr*test_sort_orderable_and_unorderable_valuess$      z8QueryTestCase.test_sort_orderable_and_unorderable_valuescCsxd}|tj|ddd|tjd|ddddd d }|tj|d dt||tj|d dd |tj|ddd|tj|gggggddd|tj|gggggddd|tj|gggggdddd}|tj|ddt||tdd|d9}tddD]N}tj||d}|t||tj|gd|d}|t||gdq$dS)Nrr@6('the quick brown ' 'fox jumped over ' 'a lazy dog')rVrIrr{zW{'a': 1, 'b': 'the quick brown ' 'fox jumped over ' 'a lazy dog', 'c': 2}u@Portons dix bons "whiskys" à l'avocat goujat qui fumait au zooDuN('Portons dix bons "whiskys"\n' "à l'avocat goujat\t qui " 'fumait au zoo')ruV('Portons dix bons ' '"whiskys"\n' "à l'avocat " 'goujat\t qui ' 'fumait au zoo')#u^[[[[['Portons dix bons "whiskys"\n' "à l'avocat goujat\t qui " 'fumait au zoo']]]]]un[[[[['Portons dix bons ' '"whiskys"\n' "à l'avocat " 'goujat\t qui ' 'fumait au zoo']]]]]uv[[[[['Portons dix ' 'bons "whiskys"\n' "à l'avocat " 'goujat\t qui ' 'fumait au ' 'zoo']]]]]ZdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPr\''rdrKr5)rhrArirgr0r})rrspecialZ unwrappabler8rrrr test_str_wraps.    zQueryTestCase.test_str_wrapcCsDddtdDddtdD}d}|tj|ddd |dS) NcSsg|]}tt||qSrr r0rrrrrr]z.QueryTestCase.test_compact..r6cSsg|]}tt|qSrrrrrrrr]raz[[], [0], [0, 1, 2, 3], [0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [], [0], [0, 1], [0, 1, 2], [0, 1, 2, 3], [0, 1, 2, 3, 4]]/Tr8r;)r0rhrAri)rrorwrrr test_compacts zQueryTestCase.test_compactcCsd}d}dg|}t|dD] }|g}qt|dd|d|dD]B}tj||dd}ttt|}||||||dqHdS) NrrdrrVrIrKTr) r0rAri splitlinesmaxrnlenZassertLessEqualZ assertGreater)rZlevelsZnumberrorwlinesZmaxwidthrrrtest_compact_width#s " z QueryTestCase.test_compact_widthcCs|tjdddd|tjddddd}|tj|ddt||tj|d dd |tj|d dd |tj|d dd ttd }|tj|ddt||tj|ddd|tj|ddd|tj|ddd|tjd|ddddd|tjd|ddddd|tj|ggggggddd|tj|ggggggdddtddD]N}tj||d}|t||tj|gd|d}|t||gdq~dS)Nr]rVr@zb''sabcdzb'abcd'abcdefghijklmnopqrstuvwxyzrz$(b'abcdefghijkl' b'mnopqrstuvwxyz')z)(b'abcdefghijkl' b'mnopqrstuvwx' b'yz')rz=0zD(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b' b'\x0c\r\x0e\x0f') zI(b'\x00\x01\x02\x03' b'\x04\x05\x06\x07\x08\t\n\x0b' b'\x0c\r\x0e\x0f')zN(b'\x00\x01\x02\x03' b'\x04\x05\x06\x07' b'\x08\t\n\x0b' b'\x0c\r\x0e\x0f')rIrzJ{'a': 1, 'b': b'abcdefghijkl' b'mnopqrstuvwx' b'yz', 'c': 2}rzJ{'a': 1, 'b': b'abcdefgh' b'ijklmnop' b'qrstuvwxyz', 'c': 2}r{z3[[[[[[b'abcdefghijklmnop' b'qrstuvwxyz']]]]]]rvzS[[[[[[b'\x00\x01\x02\x03\x04\x05\x06\x07' b'\x08\t\n\x0b\x0c\r\x0e\x0f']]]]]]@)rhrArirgbytesr0r})rlettersrr8rrrrtest_bytes_wrap/s: ""zQueryTestCase.test_bytes_wrapcCsF|tjtdddtd}|tj|ddt||tj|ddd|tj|ddd |tj|d dd ttd }|tj|d dt||tj|d dd|tj|ddd|tj|ddd|tjd|ddddd|tj|gggggddd|tj|gggggddddS)NrVr@zbytearray(b'')rr5z6bytearray(b'abcdefghijkl' b'mnopqrstuvwxyz')zDbytearray(b'abcdefghijkl' b'mnopqrstuvwx' b'yz')r{rzH9zVbytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b' b'\x0c\r\x0e\x0f')rvzdbytearray(b'\x00\x01\x02\x03' b'\x04\x05\x06\x07\x08\t\n\x0b' b'\x0c\r\x0e\x0f')zrbytearray(b'\x00\x01\x02\x03' b'\x04\x05\x06\x07' b'\x08\t\n\x0b' b'\x0c\r\x0e\x0f')rIrrzi{'a': 1, 'b': bytearray(b'abcdefghijkl' b'mnopqrstuvwx' b'yz'), 'c': 2}%zE[[[[[bytearray(b'abcdefghijklmnop' b'qrstuvwxyz')]]]]]2ze[[[[[bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07' b'\x08\t\n\x0b\x0c\r\x0e\x0f')]]]]])rhrArirNrgr0)rrrrrrtest_bytearray_wraphs$  z!QueryTestCase.test_bytearray_wrapcCsTtt}|tj|dddd}ttt|t }|t|ddS)NrVr@zdefaultdict(, {})rzdefaultdict(, {'a': 6, 'brown': 2, 'dog': 8, 'fox': 3, 'jumped': 4, 'lazy': 7, 'over': 5, 'quick': 1, 'the': 0})) r defaultdictintrhrArirrrrrrrrtest_default_dicts  zQueryTestCase.test_default_dictcCsBt}|tj|dddtd}|tj|ddddS)NrVr@z Counter()Z senselessnessr5zDCounter({'s': 6, 'e': 4, 'n': 2, 'l': 1}))rCounterrhrArirrrr test_counters  zQueryTestCase.test_countercCst}|tj|dddd}tt|t }tt |}|t|dtt |t |}|t|ddS)NrVr@z ChainMap({})rzChainMap({'a': 6, 'brown': 2, 'dog': 8, 'fox': 3, 'jumped': 4, 'lazy': 7, 'over': 5, 'quick': 1, 'the': 0})aChainMap({'a': 6, 'brown': 2, 'dog': 8, 'fox': 3, 'jumped': 4, 'lazy': 7, 'over': 5, 'quick': 1, 'the': 0}, OrderedDict([('the', 0), ('quick', 1), ('brown', 2), ('fox', 3), ('jumped', 4), ('over', 5), ('a', 6), ('lazy', 7), ('dog', 8)]))) rChainMaprhrArirr rrrrr)rrWritemsrrr test_chainmaps   zQueryTestCase.test_chainmapcCst}|tj|dddtjdd}|tj|dddd}tt|t}|t|dtjt|tdd}|t|d dS) NrVr@z deque([])rb)maxlenzdeque([], maxlen=7)rzdeque([('the', 0), ('quick', 1), ('brown', 2), ('fox', 3), ('jumped', 4), ('over', 5), ('a', 6), ('lazy', 7), ('dog', 8)])zdeque([('brown', 2), ('fox', 3), ('jumped', 4), ('over', 5), ('a', 6), ('lazy', 7), ('dog', 8)], maxlen=7)) rdequerhrArirrrrrrrr test_deques    zQueryTestCase.test_dequecCsPt}|tj|dddd}tt|t}|t|ddS)NrVr@z{}rzi{'a': 6, 'brown': 2, 'dog': 8, 'fox': 3, 'jumped': 4, 'lazy': 7, 'over': 5, 'quick': 1, 'the': 0}) rUserDictrhrArirrrrrrrrtest_user_dicts zQueryTestCase.test_user_dictcCsPt}|tj|dddd}tt|t}|t|ddS)NrVr@z[]rz{[('the', 0), ('quick', 1), ('brown', 2), ('fox', 3), ('jumped', 4), ('over', 5), ('a', 6), ('lazy', 7), ('dog', 8)]) rUserListrhrArirrrrrrrrtest_user_lists zQueryTestCase.test_user_listcCs^td}|tj|dddtd}|tj|ddd|tjd|iddddS) Nr\rVr@rrrrzF{1: 'the quick ' 'brown fox ' 'jumped over a ' 'lazy dog'})r UserStringrhrArirrrrtest_user_strings  zQueryTestCase.test_user_stringN)+rrrr3rHrTrYr[rlrqrxr~rrrrrrrrrrunittestZexpectedFailurersupportZ cpython_onlyrrrrrrrrrrrrrrrrrrrrr-HsL !!$&, R<  9+ 'r-c@seZdZddZdS)rcCsDt|tr,d|vr t|ddfS|ddfSntj|||||SdS)NrfrVr) isinstancerrgrArBformat)robjectcontext maxlevelslevelrrrr*s   zDottedPrettyPrinter.formatN)rrrrrrrrr(sr__main__)!rrCrrArZ test.supportrZ test.test_setrrr rr rrrrrrrrrrrrrrZTestCaser-rBrrmainrrrrs>g