Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 403b60d

Browse files
committed
Updated the tests to reflect that a struct's default constructor can now be invoked.
1 parent 7db46e5 commit 403b60d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/tests/test_class.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,9 @@ def testStructConstruction(self):
130130
"""Test construction of structs."""
131131
from System.Drawing import Point
132132

133-
def test():
134-
p = Point()
135-
136-
self.assertRaises(TypeError, test)
133+
p = Point()
134+
self.assertTrue(p.X == 0)
135+
self.assertTrue(p.Y == 0)
137136

138137
p = Point(0, 0)
139138
self.assertTrue(p.X == 0)

0 commit comments

Comments
 (0)