[Zope-CVS] CVS: PythonNet/tests/python - test_conversion.py:1.6
test_field.py:1.4
Brian Lloyd
cvs-admin at zope.org
Mon Oct 27 23:00:47 EST 2003
Update of /cvs-repository/PythonNet/tests/python
In directory cvs.zope.org:/tmp/cvs-serv26100/tests/python
Modified Files:
test_conversion.py test_field.py
Log Message:
Fixups for b1 release
=== PythonNet/tests/python/test_conversion.py 1.5 => 1.6 ===
--- PythonNet/tests/python/test_conversion.py:1.5 Mon Oct 20 23:05:16 2003
+++ PythonNet/tests/python/test_conversion.py Mon Oct 27 23:00:46 2003
@@ -20,24 +20,53 @@
def testBoolConversion(self):
"""Test bool conversion."""
object = ConversionTest()
+ self.failUnless(object.BooleanField == False)
+ self.failUnless(object.BooleanField is False)
+ self.failUnless(object.BooleanField == 0)
+
+ object.BooleanField = True
+ self.failUnless(object.BooleanField == True)
+ self.failUnless(object.BooleanField is True)
+ self.failUnless(object.BooleanField == 1)
+
+ object.BooleanField = False
+ self.failUnless(object.BooleanField == False)
+ self.failUnless(object.BooleanField is False)
self.failUnless(object.BooleanField == 0)
object.BooleanField = 1
+ self.failUnless(object.BooleanField == True)
+ self.failUnless(object.BooleanField is True)
self.failUnless(object.BooleanField == 1)
+ object.BooleanField = 0
+ self.failUnless(object.BooleanField == False)
+ self.failUnless(object.BooleanField is False)
+ self.failUnless(object.BooleanField == 0)
+
object.BooleanField = System.Boolean(None)
+ self.failUnless(object.BooleanField == False)
+ self.failUnless(object.BooleanField is False)
self.failUnless(object.BooleanField == 0)
object.BooleanField = System.Boolean('')
+ self.failUnless(object.BooleanField == False)
+ self.failUnless(object.BooleanField is False)
self.failUnless(object.BooleanField == 0)
object.BooleanField = System.Boolean(0)
+ self.failUnless(object.BooleanField == False)
+ self.failUnless(object.BooleanField is False)
self.failUnless(object.BooleanField == 0)
object.BooleanField = System.Boolean(1)
+ self.failUnless(object.BooleanField == True)
+ self.failUnless(object.BooleanField is True)
self.failUnless(object.BooleanField == 1)
object.BooleanField = System.Boolean('a')
+ self.failUnless(object.BooleanField == True)
+ self.failUnless(object.BooleanField is True)
self.failUnless(object.BooleanField == 1)
=== PythonNet/tests/python/test_field.py 1.3 => 1.4 ===
--- PythonNet/tests/python/test_field.py:1.3 Mon Oct 20 23:05:16 2003
+++ PythonNet/tests/python/test_field.py Mon Oct 27 23:00:46 2003
@@ -252,10 +252,19 @@
"""Test boolean fields."""
# change this to true / false later for Python 2.3?
object = FieldTest()
- self.failUnless(object.BooleanField == 0)
+ self.failUnless(object.BooleanField == False)
+
+ object.BooleanField = True
+ self.failUnless(object.BooleanField == True)
+
+ object.BooleanField = False
+ self.failUnless(object.BooleanField == False)
object.BooleanField = 1
- self.failUnless(object.BooleanField == 1)
+ self.failUnless(object.BooleanField == True)
+
+ object.BooleanField = 0
+ self.failUnless(object.BooleanField == False)
def testSByteField(self):
More information about the Zope-CVS
mailing list