[Zope3-checkins] CVS: Zope/lib/python/ZConfig/tests - testConfig.py:1.1.4.6
Chris McDonough
chrism@zope.com
Sun, 24 Nov 2002 18:53:34 -0500
Update of /cvs-repository/Zope/lib/python/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv13234/tests
Modified Files:
Tag: chrism-install-branch
testConfig.py
Log Message:
Merge with HEAD.
=== Zope/lib/python/ZConfig/tests/testConfig.py 1.1.4.5 => 1.1.4.6 ===
--- Zope/lib/python/ZConfig/tests/testConfig.py:1.1.4.5 Sun Nov 24 18:28:44 2002
+++ Zope/lib/python/ZConfig/tests/testConfig.py Sun Nov 24 18:53:33 2002
@@ -276,49 +276,6 @@
context = Context()
context.load(path)
- def test_fragment_ident_disallowed(self):
- self.assertRaises(ConfigurationError,
- self.load, "simplesections.conf#another")
-
- def test_load_from_abspath(self):
- fn = self.write_tempfile()
- try:
- self.check_load_from_path(fn)
- finally:
- os.unlink(fn)
-
- def test_load_from_relpath(self):
- fn = self.write_tempfile()
- dir, name = os.path.split(fn)
- pwd = os.getcwd()
- try:
- os.chdir(dir)
- self.check_load_from_path(name)
- finally:
- os.chdir(pwd)
- os.unlink(fn)
-
- def test_load_from_fileobj(self):
- sio = StringIO.StringIO("name value\n"
- "<section>\n"
- " name value2\n"
- "</section>\n")
- cf = ZConfig.loadfile(sio)
- self.assertEqual(cf.get("name"), "value")
- self.assertEqual(cf.getSection("section").get("name"), "value2")
-
- def write_tempfile(self):
- fn = tempfile.mktemp()
- fp = open(fn, "w")
- fp.write("key value\n")
- fp.close()
- return fn
-
- def check_load_from_path(self, path):
- context = Context()
- context.load(path)
-
-
class NoDelegationContext(Context):
def getDelegateType(self, type):
return None