summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-07-24 16:25:40 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-07-24 16:25:40 +0000
commit3c64a0cf738f4ce2447cbfcd7faadfe3fdf783f1 (patch)
treed34d45b02f1499592faae2a3e0df3057a2bb5130 /test
parentade0a51a79e722f8c5d77f2ef5ac10bc530b03d3 (diff)
downloadsqlalchemy-3c64a0cf738f4ce2447cbfcd7faadfe3fdf783f1.tar.gz
[ticket:254]
Diffstat (limited to 'test')
-rw-r--r--test/base/attributes.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/base/attributes.py b/test/base/attributes.py
index 19eedd0f6..5f555a7e6 100644
--- a/test/base/attributes.py
+++ b/test/base/attributes.py
@@ -251,6 +251,21 @@ class AttributesTest(PersistTest):
b2.element = None
assert not manager.get_history(b2, 'element').hasparent(f2)
+
+ def testdescriptorattributes(self):
+ """changeset: 1633 broke ability to use ORM to map classes with unusual
+ descriptor attributes (for example, classes that inherit from ones
+ implementing zope.interface.Interface).
+ This is a simple regression test to prevent that defect.
+ """
+ class des(object):
+ def __get__(self, instance, owner): raise AttributeError('fake attribute')
+
+ class Foo(object):
+ A = des()
+
+ manager = attributes.AttributeManager()
+ manager.reset_class_managed(Foo)
if __name__ == "__main__":
unittest.main()