[Zope-Checkins] CVS: Zope3/lib/python/Schema/tests - testListField.py:1.2 testSchema.py:1.5 testTupleField.py:1.2 testBooleanField.py:NONE testDictionaryField.py:NONE testIntegerField.py:NONE testStringField.py:NONE

Martijn Faassen m.faassen@vet.uu.nl
Sun, 14 Jul 2002 13:30:33 -0400


Update of /cvs-repository/Zope3/lib/python/Schema/tests
In directory cvs.zope.org:/tmp/cvs-serv17270/tests

Modified Files:
	testListField.py testSchema.py testTupleField.py 
Removed Files:
	testBooleanField.py testDictionaryField.py testIntegerField.py 
	testStringField.py 
Log Message:
Renamed String, Integer, Boolean and Dictionary back to the more Pythonic
Str, Int, Bool and Dict, which map the type constructors as of Python 2.2
(and 2.3 for Bool).


=== Zope3/lib/python/Schema/tests/testListField.py 1.1 => 1.2 ===
 $Id$
 """
 from unittest import TestSuite, main, makeSuite
-from Schema import List, Integer, Float, ErrorNames
+from Schema import List, Int, Float, ErrorNames
 from testField import FieldTest
 
 class ListTest(FieldTest):
@@ -73,7 +73,7 @@
 
     def testValidateValueTypes(self):
         field = List(id="field", title='List field', description='',
-                        readonly=0, required=0, value_types=(Integer, Float))
+                        readonly=0, required=0, value_types=(Int, Float))
         self.assertEqual(None, field.validate(None))
         self.assertEqual( [5.3,] , field.validate( [5.3,] ))
         self.assertEqual( [2, 2.3], field.validate( [2, 2.3] ))


=== Zope3/lib/python/Schema/tests/testSchema.py 1.4 => 1.5 ===
 
 
 class ISchemaTest(Schema):
-    title = String(id="title",
+    title = Str(id="title",
                    title="Title",
                    description="Title",
                    default="",
                    required=1)
 
-    description = String(id="description",
+    description = Str(id="description",
                          title="Description",
                          description="Description",
                          default="",
                          required=1)
 
-    spam = String(id="spam",
+    spam = Str(id="spam",
                   title="Spam",
                   description="Spam",
                   default="",


=== Zope3/lib/python/Schema/tests/testTupleField.py 1.1 => 1.2 ===
 $Id$
 """
 from unittest import TestSuite, main, makeSuite
-from Schema import Tuple, Integer, Float, ErrorNames
+from Schema import Tuple, Int, Float, ErrorNames
 from testField import FieldTest
 
 class TupleTest(FieldTest):
@@ -73,7 +73,7 @@
 
     def testValidateValueTypes(self):
         field = Tuple(id="field", title='Tuple field', description='',
-                        readonly=0, required=0, value_types=(Integer, Float))
+                        readonly=0, required=0, value_types=(Int, Float))
         self.assertEqual(None, field.validate(None))
         self.assertEqual( (5.3,) , field.validate( (5.3,) ))
         self.assertEqual( (2, 2.3), field.validate( (2, 2.3) ))

=== Removed File Zope3/lib/python/Schema/tests/testBooleanField.py ===

=== Removed File Zope3/lib/python/Schema/tests/testDictionaryField.py ===

=== Removed File Zope3/lib/python/Schema/tests/testIntegerField.py ===

=== Removed File Zope3/lib/python/Schema/tests/testStringField.py ===