python (3.12.0)
ΑeA! d dl Z d dlZd dlZd dlmZ G d dej
Zedk( r ej yy) N)assert_python_okc r e Zd Zd Zd Zd Zd Zd Zd Zd Z d Z
d Zd
Zd Z
d Zd
Zd Zd Zd Zd Zy)TestTopologicalSortc b d }t j | }| j t || t | t j | }t |j }|D ]5 }|D ch c]
}t
| }}| j t | | 7 y c c}w )Nc 3 K | j | j rP| j }|D ] }| j | t t | | j rOy y wN)prepare is_active get_readydonetuplesorted)tsnodesnodes F/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_graphlib.pystatic_order_with_groupszATestTopologicalSort._test_graph.<locals>.static_order_with_groups sW JJL,,.! "DGGDM"F5M** ,,.s A/A42A4)graphlibTopologicalSorterassertEquallistiterstatic_ordernextset) selfgraphexpectedr r itgroupelementtsgroups r _test_graphzTestTopologicalSort._test_graph s +
'
'
.6r:;T(^L
'
'
. "//#
$ 2E/45GtBx5G5SZ1 25s :B,c t j }|j D ] \ }} |j |g| |j # t j
$ rh}|j \ }}| j dj t t | dj t t |dz Y d }~y d }~ww xY w)N )r r itemsaddr
CycleErrorargsassertInjoinmapstr) r r cycler r dependsone_seqs r
_assert_cyclez!TestTopologicalSort._assert_cycle s
'
'
)${{} %OD)BFF4$)$ % JJL
""