<s> import unittest <EOL> from cubes . namespace import Namespace <EOL> class NamespaceTestCase ( unittest . TestCase ) : <EOL> def test_create ( self ) : <EOL> ns = Namespace ( ) <EOL> ns . create_namespace ( "<STR_LIT>" ) <EOL> self . assertIn ( "<STR_LIT>" , ns . namespaces ) <EOL> self . assertIsInstance ( ns . namespaces [ "<STR_LIT>" ] , Namespace ) <EOL> def test_get_namespace ( self ) : <EOL> base = Namespace ( ) <EOL> slicerns = base . create_namespace ( "<STR_LIT>" ) <EOL> self . assertEqual ( ( base , None ) , base . namespace ( "<STR_LIT>" ) ) <EOL> self . assertEqual ( ( slicerns , None ) , base . namespace ( "<STR_LIT>" ) ) <EOL> self . assertEqual ( ( base , "<STR_LIT>" ) , base . namespace ( "<STR_LIT>" ) ) <EOL> self . assertEqual ( ( base , "<STR_LIT>" ) , base . namespace ( "<STR_LIT>" ) ) <EOL> def test_get_namespace_create ( self ) : <EOL> base = Namespace ( ) <EOL> slicerns = base . create_namespace ( "<STR_LIT>" ) <EOL> self . assertEqual ( ( base , None ) , base . namespace ( "<STR_LIT>" , create = True ) ) <EOL> self . assertEqual ( ( slicerns , None ) , base . namespace ( "<STR_LIT>" , create = True ) ) <EOL> ( ns , remainder ) = base . namespace ( "<STR_LIT>" , create = True ) <EOL> self . assertEqual ( None , remainder ) <EOL> self . assertEqual ( ( ns , None ) , base . namespace ( "<STR_LIT>" ) ) <EOL> ( last , remainder ) = base . namespace ( "<STR_LIT>" , create = True ) <EOL> self . assertEqual ( None , remainder ) <EOL> self . assertIn ( "<STR_LIT>" , base . namespaces ) <EOL> ( ns , remainder ) = base . namespace ( "<STR_LIT>" ) <EOL> self . assertEqual ( None , remainder ) <EOL> self . assertIn ( "<STR_LIT>" , ns . namespaces ) <EOL> ( ns , remainder ) = ns . namespace ( "<STR_LIT>" ) <EOL> self . assertEqual ( None , remainder ) <EOL> self . assertIn ( "<STR_LIT>" , ns . namespaces ) <EOL> ( ns , remainder ) = ns . namespace ( "<STR_LIT>" ) <EOL> self . assertEqual ( None , remainder ) <EOL> ( last , remainder ) = base . namespace ( "<STR_LIT>" ) <EOL> self . assertEqual ( "<STR_LIT>" , remainder ) <EOL> @ unittest . skip ( "<STR_LIT>" ) <EOL> def test_find_cube ( self ) : <EOL> base = Namespace ( ) <EOL> ( ns , nsname , basename ) = base . find_cube ( "<STR_LIT>" ) <EOL> self . assertEqual ( ns , base ) <EOL> self . assertEqual ( nsname , "<STR_LIT>" ) <EOL> self . assertEqual ( basename , "<STR_LIT>" ) <EOL> ( ns , nsname , basename ) = base . find_cube ( "<STR_LIT>" ) <EOL> self . assertEqual ( ns , base ) <EOL> self . assertEqual ( nsname , "<STR_LIT>" ) <EOL> self . assertEqual ( basename , "<STR_LIT>" ) <EOL> ( ns , nsname , basename ) = base . find_cube ( "<STR_LIT>" ) <EOL> self . assertEqual ( ns , base ) <EOL> self . assertEqual ( nsname , "<STR_LIT>" ) <EOL> self . assertEqual ( basename , "<STR_LIT>" ) <EOL> extern = base . create_namespace ( "<STR_LIT>" ) <EOL> ( ns , nsname , basename ) = base . find_cube ( "<STR_LIT>" ) <EOL> self . assertEqual ( ns , extern ) <EOL> self . assertEqual ( nsname , "<STR_LIT>" ) <EOL> self . assertEqual ( basename , "<STR_LIT>" ) <EOL> ( ns , nsname , basename ) = base . find_cube ( "<STR_LIT>" ) <EOL> self . assertEqual ( ns , extern ) <EOL> self . assertEqual ( nsname , '<STR_LIT>' ) <EOL> self . assertEqual ( basename , "<STR_LIT>" ) <EOL> ( deep , remainder ) = base . namespace ( "<STR_LIT>" , create = True ) <EOL> ( ns , nsname , basename ) = base . find_cube ( "<STR_LIT>" ) <EOL> self . assertEqual ( ns , deep ) <EOL> self . assertEqual ( nsname , "<STR_LIT>" ) <EOL> self . assertEqual ( basename , "<STR_LIT>" ) </s>
