MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / assert_sort

Method assert_sort

test/base/test_dependency.py:10–16  ·  view source on GitHub ↗
(self, tuples, allitems=None)

Source from the content-addressed store, hash-verified

8
9class DependencySortTest(fixtures.TestBase):
10 def assert_sort(self, tuples, allitems=None):
11 if allitems is None:
12 allitems = self._nodes_from_tuples(tuples)
13 else:
14 allitems = self._nodes_from_tuples(tuples).union(allitems)
15 result = list(topological.sort(tuples, allitems))
16 assert conforms_partial_ordering(tuples, result)
17
18 def assert_sort_deterministic(self, tuples, allitems, expected):
19 result = list(topological.sort(tuples, allitems))

Callers 5

test_sort_oneMethod · 0.95
test_sort_twoMethod · 0.95
test_sort_threeMethod · 0.95
test_large_sortMethod · 0.95
test_ticket_1380Method · 0.95

Calls 4

_nodes_from_tuplesMethod · 0.95
unionMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected