[Zope3-checkins] CVS: Zope3/src/zodb/code/tests - test_class.py:1.1.4.4

Jeremy Hylton jeremy@zope.com
Fri, 24 Jan 2003 13:21:07 -0500


Update of /cvs-repository/Zope3/src/zodb/code/tests
In directory cvs.zope.org:/tmp/cvs-serv3095/zodb/code/tests

Modified Files:
      Tag: new-pickle-branch
	test_class.py 
Log Message:
Convert raw objects to simple descriptors.

Need for attributes like __implements__.


=== Zope3/src/zodb/code/tests/test_class.py 1.1.4.3 => 1.1.4.4 ===
--- Zope3/src/zodb/code/tests/test_class.py:1.1.4.3	Tue Jan 21 18:11:22 2003
+++ Zope3/src/zodb/code/tests/test_class.py	Fri Jan 24 13:21:04 2003
@@ -87,6 +87,18 @@
         x = self._load_name("testclass.x")
         self.assertEqual(x.var, 12)
 
+    class_interface = """class Foo:
+    __implements__ = 1""" + "\n"
+
+    def testClassInterface(self):
+        # this doesn't do a proper zope interface, but we're really
+        # only concerned about handling of the __implements__ attribute.
+        self.registry.newModule("testclass", self.class_interface)
+        get_transaction().commit()
+        import testclass
+        obj = testclass.Foo()
+        self.assertEqual(obj.__implements__, 1)
+
     cross_module_import = "from testclass import Foo"
 
     def testCrossModuleImport(self):