[Zodb-checkins] CVS: Packages/SFTPGateway/src/ZConfig/tests -
test_loader.py:1.23
Fred L. Drake, Jr.
fred at zope.com
Fri Jan 2 01:03:10 EST 2004
Update of /cvs-repository/Packages/SFTPGateway/src/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv17925/tests
Modified Files:
test_loader.py
Log Message:
allow <import package="..."/> to support prefixes
=== Packages/SFTPGateway/src/ZConfig/tests/test_loader.py 1.22 => 1.23 ===
--- Packages/SFTPGateway/src/ZConfig/tests/test_loader.py:1.22 Sun Dec 28 20:27:28 2003
+++ Packages/SFTPGateway/src/ZConfig/tests/test_loader.py Fri Jan 2 01:03:09 2004
@@ -25,7 +25,7 @@
import ZConfig.loader
import ZConfig.url
-from ZConfig.tests.support import CONFIG_BASE
+from ZConfig.tests.support import CONFIG_BASE, TestBase
try:
@@ -37,7 +37,7 @@
LIBRARY_DIR = os.path.join(os.path.dirname(myfile), "library")
-class LoaderTestCase(unittest.TestCase):
+class LoaderTestCase(TestBase):
def test_schema_caching(self):
loader = ZConfig.loader.SchemaLoader()
@@ -57,6 +57,13 @@
url2 = ZConfig.url.urljoin(CONFIG_BASE, "stringio")
schema2 = loader.loadFile(sio, url2)
self.assert_(schema1.gettype("type-a") is schema2.gettype("type-a"))
+
+ def test_simple_import_using_prefix(self):
+ self.load_schema_text("""\
+ <schema prefix='ZConfig.tests.library'>
+ <import package='.thing'/>
+ </schema>
+ """)
def test_import_errors(self):
# must specify exactly one of package or src
More information about the Zodb-checkins
mailing list