Skip to main content

dependency_ordered

Reorder test_databases into an order that honors the dependencies described in TEST[DEPENDENCIES].

def dependency_ordered(
test_databases: list,
dependencies: dict
) - > list

Reorder test_databases into an order that honors the dependencies described in TEST[DEPENDENCIES].

Parameters

NameTypeDescription
test_databaseslistA list of tuples containing database signatures and their associated metadata (name and aliases) to be sorted.
dependenciesdictA mapping of database aliases to the list of other database aliases they require to be initialized first.

Returns

TypeDescription
listA list of database configurations sorted such that every database appears after all the databases it depends on.