관리-도구
편집 파일: test_reader.cpython-38.pyc
U +�eQ � @ st d dl Zd dlZd dlZd dlZd dlmZ d dlmZm Z G dd� dej �ZG dd� dej �Ze dkrpe�� dS ) � N)� import_module)�MultiplexedPath�NamespaceReaderc @ sx e Zd Zedd� �Zdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� ZdS )�MultiplexedPathTestc C s t �t�jd | _d S )N�namespacedata01)�pathlib�Path�__file__�parent�folder��cls� r �S/opt/hc_python/lib/python3.8/site-packages/importlib_resources/tests/test_reader.py� setUpClass s zMultiplexedPathTest.setUpClassc C s | � t�� t� W 5 Q R X d S �N)�assertRaises�FileNotFoundErrorr ��selfr r r �test_init_no_paths s z&MultiplexedPathTest.test_init_no_pathsc C s( | � t�� t| jd � W 5 Q R X d S )N�binary.file)r �NotADirectoryErrorr r r r r r �test_init_file s z"MultiplexedPathTest.test_init_filec C sV dd� t | j��� D �}z|�d� W n ttfk r> Y nX | �|dddh� d S )Nc S s h | ] }|j �qS r ��name��.0�pathr r r � <setcomp> s z3MultiplexedPathTest.test_iterdir.<locals>.<setcomp>�__pycache__r �utf-16.file� utf-8.file)r r �iterdir�remove�KeyError� ValueError�assertEqual)r �contentsr r r �test_iterdir s z MultiplexedPathTest.test_iterdirc C sx t �t�j�d�}dd� t| j|��� D �}dD ],}z|�|� W q0 t t fk rZ Y q0X q0| �|ddddd h� d S ) N�data01c S s h | ] }|j �qS r r r r r r r ! s z=MultiplexedPathTest.test_iterdir_duplicate.<locals>.<setcomp>)r z__init__.pycz__init__.pyr �subdirectoryr! r"