File: //usr/local/lib/python3.10/dist-packages/numpy/lib/tests/__pycache__/test_io.cpython-310.pyc
o
���gs� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
mZ d dlm
Z
d dlmZmZ d dlmZ d dlZd dlmZmZ d dlmZ d dlZd dlmZ d dlmZmZ d d lmZ d d
l m!Z! d dl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1 d dl2m3Z3 G d
d� de�Z4e j5dkZ6zd dl7Z7dZ8W n e9y� dZ8Y nw zd dl:Z:dZ;W n e9y� dZ;Y nw d:dd�Z<G dd� d�Z=G dd� de=�Z>G dd� de=�Z?G dd� d�Z@G dd� d�ZAG dd� deA�ZBG d d!� d!�ZCG d"d#� d#eA�ZDG d$d%� d%�ZEd&d'� ZFG d(d)� d)�ZGG d*d+� d+�ZHd,d-� ZId.d/� ZJd0d1� ZKd2d3� ZLe jMjNe, d4d5�d6d7� �ZOd8d9� ZPdS );� N)�Path)�NamedTemporaryFile)�BytesIO�StringIO)�datetime)�Value�get_context)�c_bool)�ConverterError�ConversionWarning��asbytes)�assert_equal)�assert_warns�assert_�assert_raises_regex�
assert_raises�assert_allclose�assert_array_equal�temppath�tempdir�IS_PYPY�HAS_REFCOUNT�suppress_warnings�assert_no_gc_cycles�assert_no_warnings�break_cycles�IS_WASM)�requires_memoryc @ s* e Zd ZdZd
dd�Zdd� Zdd� Zd S )�TextIOz�Helper IO class.
Writes encode strings to bytes if needed, reads return bytes.
This makes it easier to emulate files opened in binary mode
without needing to explicitly convert strings to bytes in
setting up the test data.
� c C � t �| t|�� d S �N)r �__init__r
��self�s� r'