mò
Cã¸Ec @ s+ d Z d k Z d k Z d k Z d k Z d k Z d k l Z d k Z d k Z d k
Z d k l Z l
Z
y
e Z Wn e j
o e i d Z n Xe i i e ƒ Z e i i e i i e ƒ d ƒ Z d e
f d „ ƒ YZ d e i f d „ ƒ YZ d
„ Z e d j o e i d d
ƒ n d S( s5 Tests of ZConfig.loader classes and helper functions.N( s StringIO( s CONFIG_BASEs TestBasei t libraryt LoaderTestCasec B s t Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d
„ Z d „ Z d „ Z
d
„ Z d „ Z d „ Z RS( Nc C sY t i i ƒ } t i i t d ƒ } | i | ƒ } | i | ƒ } | i
| | j ƒ d S( Ns
simple.xml( t ZConfigt loadert SchemaLoadert urlt urljoint CONFIG_BASEt loadURLt schema1t schema2t selft assert_( R R R R R
( ( t8 /data/zmath/zope/lib/python/ZConfig/tests/test_loader.pyt test_schema_caching* s
c C s t i i ƒ } t i i t d ƒ } | i | ƒ } t d ƒ } t i i t d ƒ } | i | | ƒ } | i | i d ƒ | i d ƒ j ƒ d S( Ns library.xmlsW t stringios type-a( R R R R R R t url1R R t StringIOt siot url2t loadFileR
R R t gettype( R R R R R R R
( ( R
t test_simple_import_with_cache1 s c C s | i d ƒ d S( Ns
( R t load_schema_text( R ( ( R
t test_simple_import_using_prefix= s c C sì | i t i t i t d ƒ ƒ | i t i t i t d ƒ ƒ | i t i t i t d ƒ ƒ t d ƒ } y t i | ƒ Wn^ t i j
oO } | i | i
d ƒ | i | i d ƒ | i | i
d j ƒ t | ƒ n X| i d ƒ d S( Ns sI sH s@ s
component.xmls ZConfig.tests.test_loaders expected SchemaResourceError( R t assertRaisesR t SchemaErrort loadSchemaFileR R t SchemaResourceErrort et assertEqualt filenamet packageR t patht Nonet strt fail( R R R ( ( R
t test_import_errorsD s
c C sJ t i i ƒ } t d ƒ } | i | ƒ } | i | i d ƒ d j ƒ d S( NsC s widget-a( R R R R R R t schemaR R R R" ( R R R R&