[Zodb-checkins] CVS: Zope/lib/python/ZConfig/tests - test_datatypes.py:1.6

Fred L. Drake, Jr. fred@zope.com
Mon, 24 Mar 2003 15:42:08 -0500


Update of /cvs-repository/Zope/lib/python/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv2023/tests

Modified Files:
	test_datatypes.py 
Log Message:
Remove the "constructor" and "key-value" datatypes; these are no longer used
and are of questionable value.  "constructor" is also generally unsafe;
applications that need it can provide their own version of this if necessary.


=== Zope/lib/python/ZConfig/tests/test_datatypes.py 1.5 => 1.6 ===
--- Zope/lib/python/ZConfig/tests/test_datatypes.py:1.5	Wed Jan 15 10:02:20 2003
+++ Zope/lib/python/ZConfig/tests/test_datatypes.py	Mon Mar 24 15:42:08 2003
@@ -183,18 +183,6 @@
             self.assert_(a1.family is None)
             self.assert_(a2.family is None)
 
-    def test_constructor(self):
-        convert = self.types.get('constructor')
-        eq = self.assertEqual
-        raises = self.assertRaises
-        eq(convert('Foo()'),          ('Foo', [], {}))
-        eq(convert('Foo(1,a=1,b=2)'), ('Foo', [1], {'a':1, 'b':2}))
-        eq(convert('Foo(1,2,3)'),     ('Foo', [1,2,3], {}))
-        eq(convert('Foo(1,2,3)'),     ('Foo', [1,2,3], {}))
-        raises(ValueError, convert, 'Foo')
-        raises(ValueError, convert, 'Foo(')
-        raises(NameError, convert, 'Foo(a, b, c)')
-
     def test_ipaddr_or_hostname(self):
         convert = self.types.get('ipaddr-or-hostname')
         eq = self.assertEqual
@@ -245,14 +233,6 @@
         eq(convert(here), here)
         raises(ValueError, convert, '/a/hopefully/nonexistent/path')
         raises(ValueError, convert, here + '/bogus')
-
-    def test_space_sep_key_value(self):
-        convert = self.types.get('key-value')
-        eq = self.assertEqual
-        eq(convert('A B'), ['A', 'B'])
-        eq(convert('Foo Boo'), ['Foo', 'Boo'])
-        eq(convert('Foo Boo Baz'), ['Foo', 'Boo Baz'])
-        eq(convert('Foo'), ['Foo', ''])
 
     def test_byte_size(self):
         eq = self.assertEqual