3
‹d´	  ã               @   s(   d dl mZ dd„ ZG dd„ deƒZdS )é    )ÚProvDocumentc             C   sZ   t ƒ }|jddƒ xBt| ƒD ]6}t|d ƒ}|jd| ƒ}|jd| ƒ |jdƒ qW |S )NÚexzhttp://www.example.org/é   z
ex:bundle/zhttp://www.example.org/default/Úe)r   Úadd_namespaceÚrangeÚstrÚbundleÚset_default_namespaceÚentity)ÚnÚprov_docÚiÚxr	   © r   ú1/tmp/pip-build-7vycvbft/prov/prov/tests/qnames.pyÚ0document_with_n_bundles_having_default_namespace   s    r   c               @   sH   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Z	dd„ Z
dS )ÚTestQualifiedNamesBasez«This is the base class for testing support for qualified names and
    namespaces. It is not runnable and needs to be included in a subclass of
    RoundTripTestCase.
    c             C   sB   t ƒ }|jddƒ |jdƒ}|jdƒ}| j|jdƒ | j|ƒ d S )Nr   zhttp://www.example.org/z	ex:bundlezex:e1ze1's identifier is None!)r   r   r	   r   ÚassertIsNotNoneÚ
identifierÚdo_tests)Úselfr   r	   Úe1r   r   r   Útest_namespace_inheritance   s    

z1TestQualifiedNamesBase.test_namespace_inheritancec             C   s@   t ƒ }|jdƒ |jdƒ}|jdƒ}| j|jdƒ | j|ƒ d S )Nzhttp://www.example.org/r	   r   ze1's identifier is None!)r   r
   r	   r   r   r   r   )r   r   r	   r   r   r   r   Ú"test_default_namespace_inheritance   s    


z9TestQualifiedNamesBase.test_default_namespace_inheritancec             C   s   t dƒ}|jƒ }| j|ƒ d S )Nr   )r   Ú	flattenedr   )r   r   r   r   r   r   Ú/test_flattening_1_bundle_with_default_namespace%   s    zFTestQualifiedNamesBase.test_flattening_1_bundle_with_default_namespacec             C   s   t dƒ}|jƒ }| j|ƒ d S )Né   )r   r   r   )r   r   r   r   r   r   Ú0test_flattening_2_bundles_with_default_namespace*   s    zGTestQualifiedNamesBase.test_flattening_2_bundles_with_default_namespacec             C   s   t dƒ}|jƒ }| j|ƒ d S )Né   )r   r   r   )r   r   r   r   r   r   Ú0test_flattening_3_bundles_with_default_namespace/   s    zGTestQualifiedNamesBase.test_flattening_3_bundles_with_default_namespacec             C   s(   t dƒ}|jdƒ |jƒ }| j|ƒ d S )Nr   z http://www.example.org/default/0)r   r
   r   r   )r   r   r   r   r   r   Ú0test_flattening_1_bundle_with_default_namespaces4   s    
zGTestQualifiedNamesBase.test_flattening_1_bundle_with_default_namespacesc             C   s(   t dƒ}|jdƒ |jƒ }| j|ƒ d S )Nr   z http://www.example.org/default/0)r   r
   r   r   )r   r   r   r   r   r   Ú0test_flattening_2_bundle_with_default_namespaces:   s    
zGTestQualifiedNamesBase.test_flattening_2_bundle_with_default_namespacesN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r    r!   r"   r   r   r   r   r      s   r   N)Z
prov.modelr   r   Úobjectr   r   r   r   r   Ú<module>   s   