diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-11-07 12:49:48 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-11-07 12:49:48 -0500 |
| commit | 13fedc23ecca81d0881a994a45efae3a77b74fcb (patch) | |
| tree | bb5cb4e6b407e3eacd2284e1e42f24c53c8af401 /test/base/test_dependency.py | |
| parent | 1f2423d23cc3e8bf8db60b56436752fbd3d83f9d (diff) | |
| download | sqlalchemy-13fedc23ecca81d0881a994a45efae3a77b74fcb.tar.gz | |
- propagate flag on event.listen() results in the listener being placed
in a separate collection. this collection also propagates during update()
- ClassManager now handles bases, subclasses collections.
- ClassManager looks at __bases__ instead of __mro__ for superclasses.
It's assumed ClassManagers are in an unbroken chain upwards through __mro__.
- trying to get a clear() that makes sense on cls.dispatch
- implemented propagate for attribute events, plus permutation-based test
- implemented propagate for mapper / instance events with rudimentary test
- some pool events tests are failing for some reason
Diffstat (limited to 'test/base/test_dependency.py')
| -rw-r--r-- | test/base/test_dependency.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/base/test_dependency.py b/test/base/test_dependency.py index 9fddfc47f..605a16cc3 100644 --- a/test/base/test_dependency.py +++ b/test/base/test_dependency.py @@ -1,6 +1,7 @@ import sqlalchemy.topological as topological from sqlalchemy.test import TestBase from sqlalchemy.test.testing import assert_raises, eq_ +from sqlalchemy.test.util import conforms_partial_ordering from sqlalchemy import exc, util @@ -12,13 +13,7 @@ class DependencySortTest(TestBase): else: allitems = self._nodes_from_tuples(tuples).union(allitems) result = list(topological.sort(tuples, allitems)) - deps = util.defaultdict(set) - for parent, child in tuples: - deps[parent].add(child) - assert len(result) - for i, node in enumerate(result): - for n in result[i:]: - assert node not in deps[n] + assert conforms_partial_ordering(tuples, result) def _nodes_from_tuples(self, tups): s = set() |
