summaryrefslogtreecommitdiff
path: root/test/data/regobjects2.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2013-01-14 14:08:48 +0100
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2013-01-14 14:08:48 +0100
commitc0308a32ff35d921e75c5cff68df14aeacd4b9f9 (patch)
treec059bfd7c55fb16971e355dba4f98ec224b7e37f /test/data/regobjects2.py
parentb2c601c590f1b54916ea8eab8280b0118c1a7e6a (diff)
downloadlogilab-common-c0308a32ff35d921e75c5cff68df14aeacd4b9f9.tar.gz
[registry] introduce RegistrableObject and RegistrableInstance base classes. Closes #98742
and make them mandatory *for automatic registration*. Cleanup automatic registration code accordingly. Instances are now registrable, and automatically registered provided they inherit from RegistrableInstance.
Diffstat (limited to 'test/data/regobjects2.py')
-rw-r--r--test/data/regobjects2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/data/regobjects2.py b/test/data/regobjects2.py
new file mode 100644
index 0000000..5c28b51
--- /dev/null
+++ b/test/data/regobjects2.py
@@ -0,0 +1,8 @@
+from logilab.common.registry import RegistrableObject, RegistrableInstance, yes
+
+class MyRegistrableInstance(RegistrableInstance):
+ __regid__ = 'appobject3'
+ __select__ = yes()
+ __registry__ = 'zereg'
+
+instance = MyRegistrableInstance()