python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_graphlib.cpython-311.opt-1.pyc

eA!~ddlZddlZddlZddlmZGddejZedkrejdSdS)N)assert_python_okcteZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdS)TestTopologicalSortc~d}tj|}|t||t|tj|}t	||D]3}fd|D}|t
||4dS)Nc3K||rb|}|D]}||t	t|V|`dSdSN)prepare	is_active	get_readydonetuplesorted)tsnodesnodes   F/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_graphlib.pystatic_order_with_groupszATestTopologicalSort._test_graph.<locals>.static_order_with_groups	sJJLLL,,..
+!""DGGDMMMMF5MM*****	,,..
+
+
+
+
+c.h|]}tS)next).0elementits  r	<setcomp>z2TestTopologicalSort._test_graph.<locals>.<setcomp>s555GtBxx555r)graphlibTopologicalSorterassertEquallistiterstatic_orderset)selfgraphexpectedrrgrouptsgrouprs       @r_test_graphzTestTopologicalSort._test_graphs	+	+	+
'
.
.66r::;;T(^^LLL

'
.
."//##
$
$	2	2E5555u555GSZZ1111	2	2rctj}|D]\}}|j|g|R	|#tj$rz}|j\}}|dtt|dtt|dzYd}~dSd}~wwxYw)N )rritemsaddr	
CycleErrorargsassertInjoinmapstr)	r#r$cyclerr	dependsone_seqs	         r
_assert_cyclez!TestTopologicalSort._assert_cycles

'
)
)${{}}	%	%OD)BF4$)$$$$$	JJLLL

	"	R	R	RVFAsMM#((3sE??33SXXc#sQw>O>O5P5PQQQQQQQQQ	RsAC!A/CCc
J|dhddhddhddhddhdgd|diid	g|d
tdDdtdd
d
D|dhdhdhdhdhdhdhdhdgd|ddgdgddgdgdgdgdgdgdggd
gd|ddggdggdgd|ddggdggdgdggdgddS)N)r+	
r;r<))r=r?r>)r<r;)r+r@rArBci|]	}||dzh
SrCrrxs  r
<dictcomp>z9TestTopologicalSort.test_simple_cases.<locals>.<dictcomp>2s +++AQQ+++rrAcg|]}|fSrrrEs  r
<listcomp>z9TestTopologicalSort.test_simple_cases.<locals>.<listcomp>2s-N-N-Nqqd-N-N-Nr
)r+r=rKr?r;rLrMrN))rBrO)r?rN)rKrM)r=rL)r+r;r+r@)
rrBr+r=rKr?rPr>r<r@))r@)rK)r=r<)rBr?r>)rPr+r)rrBr+r=))rBr=rQrR)rrBr+r=rKr?rP))rBr=rP)r+r?)rrK)r(ranger#s rtest_simple_casesz%TestTopologicalSort.test_simple_cases)s"ar1gAq6q!fEE,,,	
	
	

	
!R4&)))++r+++-N-NE"b"<M<M-N-N-N	
	
	
	
"B4bTPRtTT999	
	
	

	
q63q6333333


>==	
	
	
 	
aVsr::<P<P<PQQQA21#"!!DD'''	
	
	
	
	
rc|dhdhdhdddg|tttddgdS)Nr+rKrP)rBr=r?)r+rKrP)r(r"rTs rtest_no_dependenciesz(TestTopologicalSort.test_no_dependenciesQsaaSaSaS11Iy3IJJJSUUsuu77)EEEEErcH|dhdhgddddgtj}|dd|dd|dd|g|ddgdS)Nr+rK)r+rKrKrKrKrK)rBr=r)r+rK)rrBr=rB)r(rrr-rr!r#rs  rtest_the_node_multiple_timesz0TestTopologicalSort.test_the_node_multiple_timesVsaSaS-?-?-?@@69BUVVV
'
)
)
q!
q!
q!-2??,,-1v66666rcdtdD}tjd|i}|t	|gddS)Nc3&K|]}d|zdzV
dS)r+rBNrrEs  r	<genexpr>z@TestTopologicalSort.test_graph_with_iterables.<locals>.<genexpr>bs*111QUQY111111rr?r)rBr=r?r>r@r)rSrrrrr!)r#r5rs   rtest_graph_with_iterablesz-TestTopologicalSort.test_graph_with_iterablesasd11a111	

'I
7
7boo//002D2D2DEEEEErctj}|dd|dd|dd|ddtjdhdi}|g|g|dS)NrBr+r=rKr?>r+r=rKr?)rrr-rr!)r#rts2s   r1test_add_dependencies_for_same_node_incrementallyzETestTopologicalSort.test_add_dependencies_for_same_node_incrementallyfs

'
)
)
q!
q!
q!
q!(!\\\):;;-2??,,-/D1A1A1C1C/DEEEEErc2|igdSr)r(rTs r
test_emptyzTestTopologicalSort.test_emptyqsR     rc	|ddhiddg|dhdhdgd|dhdhdhdgd|dhdhdhdhd	hd
gd|dhdhdhdhdhd	hd
gd|dhdhddhdhdddgdS)NrBr+)rBr+)rBr+rBr=)rBr+r=)rBr=r+rBrKrP)rBr+r=r?rKr?r>)rBr+r=rKrPr>)rBr+r=rK)r9rTs r
test_cyclezTestTopologicalSort.test_cycletsAs8aV,,,ss++YYY777sss33\\\BBBsssssCC\\\RRRssssssKKYYYWWWss1v1#>>AGGGGGrctj}|td5|dddn#1swxYwY|td5|ddddn#1swxYwY|td5|ddddS#1swxYwYdS)Nz prepare\(\) must be called firstr=)rrassertRaisesRegex
ValueErrorrrr
rYs  rtest_calls_before_preparez-TestTopologicalSort.test_calls_before_prepares

'
)
)

#
#J0S
T
T		LLNNN															

#
#J0S
T
T		GGAJJJ															

#
#J0S
T
T		LLNNN																		s5AAA6BBB>C  C$'C$ctj}||td5|ddddS#1swxYwYdS)Nz!cannot prepare\(\) more than once)rrr	rgrhrYs  rtest_prepare_multiple_timesz/TestTopologicalSort.test_prepare_multiple_timess

'
)
)




#
#J0T
U
U		JJLLL																		sA%%A),A)ctj}|dddd|ddd|||td5|ddddn#1swxYwY|td5|dddddS#1swxYwYdS)NrBr+r=rKznode 2 was not passed outz#node 24 was not added using add\(\))rrr-r	rrgrhrrYs  rtest_invalid_nodes_in_donez.TestTopologicalSort.test_invalid_nodes_in_donesZ

'
)
)
q!Q
q!Q





#
#J0K
L
L		GGAJJJ															

#
#J0V
W
W		GGBKKK																		s$B((B,/B,C11C58C5ctj}|dddd|dd|||d||d|d||d||d|d|d||d||d|d||d||dS)	NrBr+r=rK)r=rKrrQrC)	rrr-r	rrrassertFalser
rYs  r	test_donezTestTopologicalSort.test_donesv

'
)
)
q!Q
q!


000,,,



...,,,







...,,,



,,,(((((rctj}|dd|||||d|||d||||d|||d|	|dS)NrBr+rQrC)
rrr-r	
assertTruer
rrrrprYs  rtest_is_activez"TestTopologicalSort.test_is_actives

'
)
)
q!


'''...'''



'''...'''



(((((rcXtj}|t|jtd|t|jdt|t|jttdS)NrB)rrassertRaises	TypeErrorr-dictrYs  rtest_not_hashable_nodesz+TestTopologicalSort.test_not_hashable_nodessz

'
)
))RVTVVQ777)RVQ777)RVTVVTVV<<<<<rcd}tj}|ddd|dd|dd|dd	|dd	tj}|dd|ddd|dd	|dd	|dd|t	||t	||dS)
Nc3K||rE|}|j|t	|V|CdSdSr)r	r
rrr")rrs  r
get_groupsz^TestTopologicalSort.test_order_of_insertion_does_not_matter_between_groups.<locals>.get_groupssuJJLLL,,..
!%jj   ,,..
!
!
!
!
!rr=r+rBrrKr?rPr>)rrr-rr)r#r|rr`s    r6test_order_of_insertion_does_not_matter_between_groupszJTestTopologicalSort.test_order_of_insertion_does_not_matter_between_groupss	!	!	!
'
)
)
q!Q
q!
q!
q!
q!(**1


1a1


1


1


jjnn--tJJsOO/D/DEEEEErcd}|d}|d}||d||d|||dS)Ncd}tj}d|d<t||d<t	d|fi|}|S)Naxif 1:
                import graphlib
                ts = graphlib.TopologicalSorter()
                ts.add('blech', 'bluch', 'hola')
                ts.add('abcd', 'blech', 'bluch', 'a', 'b')
                ts.add('a', 'a string', 'something', 'b')
                ts.add('bluch', 'hola', 'abcde', 'a', 'b')
                print(list(ts.static_order()))
                T
__cleanenvPYTHONHASHSEEDz-c)osenvironcopyr3r)seedcodeenvouts    rcheck_order_with_hash_seedzlTestTopologicalSort.test_static_order_does_not_change_with_the_hash_seed.<locals>.check_order_with_hash_seedsUD*//##C!%C$'IIC !"45555CJriiz)assertNotEqualr)r#rrun1run2s    r4test_static_order_does_not_change_with_the_hash_seedzHTestTopologicalSort.test_static_order_does_not_change_with_the_hash_seeds{			$*)$//))%00D"%%%D"%%%t$$$$$rN)__name__
__module____qualname__r(r9rUrWrZr^rarcrerirkrnrqrtryr}rrrrrrs#222*


&
&
&
PFFF
	7	7	7FFF
	F	F	F!!!HHH


))),
)
)
)===FFF0%%%%%rr__main__)	rrunittesttest.support.script_helperrTestCaserrmainrrr<module>rs				777777r%r%r%r%r%(+r%r%r%hzHMOOOOOr