관리-도구
편집 파일: test__iotools.cpython-37.pyc
B ��Fd�4 � @ s� d dl mZmZmZ d dlZd dlZd dlmZ d dlZ d dl mZmZm Z mZmZmZ d dlmZmZmZmZmZmZ G dd� de�ZG dd � d e�Zd d� ZG dd � d e�ZG dd� de�Zedkr�e� dS )� )�division�absolute_import�print_functionN)�date)�run_module_suite�TestCase�assert_�assert_equal�assert_allclose� assert_raises)�LineSplitter� NameValidator�StringConverter�has_nested_fields� easy_dtype� flatten_dtypec @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�TestLineSplitterzTests the LineSplitter class.c C sF d}t � |�}t|dddddg� t d�|�}t|dddddg� dS ) zTest LineSplitter w/o delimiters 1 2 3 4 5 # test� 1� 2� 3� 4� 5� N)r r )�self�strg�test� r ��/builddir/build/BUILDROOT/alt-python37-numpy-1.13.3-8.el8.x86_64/opt/alt/python37/lib64/python3.7/site-packages/numpy/lib/tests/test__iotools.py�test_no_delimiter s z"TestLineSplitter.test_no_delimiterc C sD d}t d�|�}t|ddddddg� t d �|�}t|d dg� dS )zTest space delimiters 1 2 3 4 5 # test� r r r r � r s s 1 2 3 4N)r r )r r r r r r �test_space_delimiter s z%TestLineSplitter.test_space_delimiterc C sH d}t d�|�}t|dddddg� d}t d�|�}t|d d dg� dS )zTest tab delimiters 1 2 3 4 5 6� r r r r s 5 6s 1 2 3 4 5 6s 1 2s 3 4N)r r )r r r r r r �test_tab_delimiter% s z#TestLineSplitter.test_tab_delimiterc C sP d}t d�|�}t|ddddddg� d }t d�|�}t|ddddddg� d S )zTest LineSplitter on delimiters 1,2,3,4,,5� ,r r r r r r s 1,2,3,4,,5 # testN)r r )r r r r r r �test_other_delimiter. s z%TestLineSplitter.test_other_delimiterc C sd d}t d�|�}t|dddddddg� d }t d �|�}t|dg� d }t d�|�}t|dg� d S )z'Test LineSplitter w/ fixed-width fieldss 1 2 3 4 5 # test� r r r r r r s 1 3 4 5 6# test� s 1 3 4 5 6� N)r r )r r r r r r �test_constant_fixed_width8 s z*TestLineSplitter.test_constant_fixed_widthc C sF d}t d�|�}t|ddddg� d}t d�|�}t|ddd g� d S ) Ns 1 3 4 5 6# test)r&