a
    3j                     @   s   d dl Z d dlmZ ddlmZ ddlmZ G dd deje jZG dd	 d	Z	G d
d de	e jZ
G dd de	eje jZedkre   dS )    N)	resources   )data01)utilc                   @   s   e Zd Zdd ZdS )CommonTestsc                 C   s0   t || W d    n1 s"0    Y  d S )N)r   path)selfpackager    r
   Y/www/server/python_manager/versions/3.9.10/lib/python3.9/test/test_importlib/test_path.pyexecute	   s    zCommonTests.executeN)__name__
__module____qualname__r   r
   r
   r
   r   r      s   r   c                   @   s   e Zd Zdd ZdS )	PathTestsc              	   C   s   t | jdj}| |jdt| |jddd}| }W d    n1 sT0    Y  | 	d| W d    n1 s~0    Y  d S )N
utf-8.filerzutf-8)encodingzHello, UTF-8 world!
)
r   r   dataZ
assertTruenameendswithrepropenreadZassertEqual)r   r   filetextr
   r
   r   test_reading   s
    &zPathTests.test_readingN)r   r   r   r   r
   r
   r
   r   r      s   r   c                   @   s   e Zd ZeZdS )PathDiskTestsN)r   r   r   r   r   r
   r
   r
   r   r      s   r   c                   @   s   e Zd Zdd ZdS )PathZipTestsc                 C   s:   t | jd}|  W d    n1 s,0    Y  d S )Nr   )r   r   r   unlink)r   r   r
   r
   r   test_remove_in_context_manager    s    z+PathZipTests.test_remove_in_context_managerN)r   r   r   r    r
   r
   r
   r   r      s   r   __main__)Zunittest	importlibr    r   r   ZCommonResourceTestsZTestCaser   r   r   ZZipSetupr   r   mainr
   r
   r
   r   <module>   s   