From 393361599f2fe77cd40b218e04bcc6ecbc82d5dc Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 23 Oct 2005 06:30:34 +0000 Subject: [PATCH] --- lib/sqlalchemy/util.py | 4 ++-- test/dependency.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 063291dde7..2b0510f11b 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -324,8 +324,8 @@ class ScopedRegistry(object): class DependencySorter(object): """creates a "dependency tree" across a list of objects, using a series of 'dependency relationships' expressed as a list of tuples to determine its shape. the tuples are of the form (x,y) which indicate - 'y is dependent on x', as well as a list of - elements which represent the full collection of elements. + 'y is dependent on x'. + a list of additional elements who may or may not be expressed within the tuples is also supplied. If a tuple contains the same value dependent on itself, the corresponding node is marked as "circular", indicating the node is dependent on itself. diff --git a/test/dependency.py b/test/dependency.py index 7e04e7ec6c..9f550ab047 100644 --- a/test/dependency.py +++ b/test/dependency.py @@ -32,7 +32,7 @@ class DependencySortTest(PersistTest): (node4, subnode4) ] head = util.DependencySorter(tuples, []).sort() - print str(head) + print "\n" + str(head) def testsort2(self): node1 = thingy('node1') @@ -45,6 +45,7 @@ class DependencySortTest(PersistTest): tuples = [ (node1, node2), (node3, node4), + (node4, node5), (node5, node6), (node6, node2) ] -- 2.47.2