[Zodb-checkins] CVS: Packages/ZConfig/tests - testConfig.py:1.16 testSubstitution.py:1.9

Fred L. Drake, Jr. fred@zope.com
Thu, 5 Dec 2002 00:17:48 -0500


Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv6613/tests

Modified Files:
	testConfig.py testSubstitution.py 
Log Message:
- Remove the poorly-named "Common" module.
- Define exceptions in the "Exceptions" module.
- Expose all the exceptions in the ZConfig package directly.


=== Packages/ZConfig/tests/testConfig.py 1.15 => 1.16 ===
--- Packages/ZConfig/tests/testConfig.py:1.15	Wed Dec  4 16:20:43 2002
+++ Packages/ZConfig/tests/testConfig.py	Thu Dec  5 00:17:46 2002
@@ -23,9 +23,6 @@
 import ZConfig
 
 from ZConfig.Context import Context
-from ZConfig.Common import ConfigurationError, ConfigurationTypeError
-from ZConfig.Common import ConfigurationMissingSectionError
-from ZConfig.Common import ConfigurationSyntaxError
 
 try:
     __file__
@@ -138,7 +135,7 @@
 
     def test_missing_named_section(self):
         conf = self.load("simplesections.conf")
-        self.assertRaises(ConfigurationMissingSectionError,
+        self.assertRaises(ZConfig.ConfigurationMissingSectionError,
                           conf.getSection, "section", "does-not-exist")
 
     def test_keys(self):
@@ -224,7 +221,7 @@
     def test_no_delegation(self):
         url = urlparse.urljoin(CONFIG_BASE, "simplesections.conf")
         context = NoDelegationContext()
-        self.assertRaises(ConfigurationTypeError, context.load, url)
+        self.assertRaises(ZConfig.ConfigurationTypeError, context.load, url)
 
     def test_include(self):
         conf = self.load("include.conf")
@@ -244,15 +241,15 @@
         self.assertEqual(conf.get("getwords"), "abc two words def")
 
     def test_define_errors(self):
-        self.assertRaises(ConfigurationSyntaxError,
+        self.assertRaises(ZConfig.ConfigurationSyntaxError,
                           self.loadtext, "%define\n")
-        self.assertRaises(ConfigurationSyntaxError,
+        self.assertRaises(ZConfig.ConfigurationSyntaxError,
                           self.loadtext, "%define abc-def\n")
-        self.assertRaises(ConfigurationSyntaxError,
+        self.assertRaises(ZConfig.ConfigurationSyntaxError,
                           self.loadtext, "%define a value\n%define a value\n")
 
     def test_fragment_ident_disallowed(self):
-        self.assertRaises(ConfigurationError,
+        self.assertRaises(ZConfig.ConfigurationError,
                           self.load, "simplesections.conf#another")
 
     def test_load_from_abspath(self):


=== Packages/ZConfig/tests/testSubstitution.py 1.8 => 1.9 ===
--- Packages/ZConfig/tests/testSubstitution.py:1.8	Wed Dec  4 20:10:17 2002
+++ Packages/ZConfig/tests/testSubstitution.py	Thu Dec  5 00:17:46 2002
@@ -5,9 +5,8 @@
 
 import unittest
 
+from ZConfig import SubstitutionReplacementError, SubstitutionSyntaxError
 from ZConfig.Substitution import isname, substitute
-from ZConfig.Substitution import SubstitutionReplacementError
-from ZConfig.Substitution import SubstitutionSyntaxError
 
 
 class SubstitutionTestCase(unittest.TestCase):