]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 23 Oct 2005 06:30:34 +0000 (06:30 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 23 Oct 2005 06:30:34 +0000 (06:30 +0000)
lib/sqlalchemy/util.py
test/dependency.py

index 063291dde7b53b7efc385237fe42fb736c88ae93..2b0510f11b22aabae6f56986b6b0ad8d257b443e 100644 (file)
@@ -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.
index 7e04e7ec6c08a947523e975a936c65f1640c1d92..9f550ab047cb23710d3023803b2f5aaff1a45c45 100644 (file)
@@ -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)
         ]