[Zope-CVS] CVS: PythonNet/tests/python - test_class.py:1.8

Brian Lloyd cvs-admin at zope.org
Thu Nov 6 23:05:07 EST 2003


Update of /cvs-repository/PythonNet/tests/python
In directory cvs.zope.org:/tmp/cvs-serv12322/tests/python

Modified Files:
	test_class.py 
Log Message:
Add assembly load from python path; fix bug in constructors; added some 
better finalization on shutdown.


=== PythonNet/tests/python/test_class.py 1.7 => 1.8 ===
--- PythonNet/tests/python/test_class.py:1.7	Mon Oct 20 23:05:16 2003
+++ PythonNet/tests/python/test_class.py	Thu Nov  6 23:05:06 2003
@@ -78,6 +78,28 @@
 
         MyTable = None
 
+
+    def testStructConstruction(self):
+        """Test construction of structs."""
+        from CLR.System.Drawing import Point
+
+        def test():
+            p = Point()
+
+        self.failUnlessRaises(TypeError, test)
+
+        p = Point(0, 0)
+        self.failUnless(p.X == 0)
+        self.failUnless(p.Y == 0)
+
+        p.X = 10
+        p.Y = 10
+
+        self.failUnless(p.X == 10)
+        self.failUnless(p.Y == 10)
+
+
+
     # test strange __new__ interactions
     
     # test weird metatype




More information about the Zope-CVS mailing list