Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_csv.cpython-311.opt-1.pyc |
�
�Ke�� � � � d dl Z d dlZd dlZd dlmZ d dlmZ d dlZd dlZd dl Z d dl
mZ d dlm
Z
d dlmZ d dlmZ d dlmZ G d � d
� � Z G d� dej � � Z G d
� dej � � Z G d� dej � � Z G d� de� � Z G d� dej � � Z G d� de� � Z G d� de� � Z G d� dej � � Z G d� de� � Z G d� dej � � Z G d� d ej � � Z! G d!� d"ej � � Z" G d#� d$ej � � Z# G d%� d&� � Z$ ej% e&ed'� � d(� � G d)� d*ej � � � � Z' G d+� d,ej � � Z( G d-� d.ej � � Z) G d/� d0ej � � Z*e+d1k r ej, � � dS dS )2� N)�StringIO)�
TemporaryFile)�support)�warnings_helper)�permutations)�dedent)�OrderedDictc � � e Zd Zd� ZdS )�BadIterablec � � t ��N��OSError��selfs �7/usr/local/apps/python3/lib/python3.11/test/test_csv.py�__iter__zBadIterable.__iter__ s � ��
� N)�__name__�
__module__�__qualname__r � r r r r s# � � � � � �� � � � r r c �R � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zej ej ej e �� � d� � � � � � � Z!d� Z"d� Z#d� Z$d� Z%d� Z&d � Z'd!� Z(d"� Z)d#� Z*d$� Z+d%� Z,d&� Z-d'� Z.d(S ))�Test_Csvz�
Test the underlying C csv parser in ways that are not appropriate
from the high level interface. Further tests of this nature are done
in TestDialectRegistry.
c �� � | � t |� � | � t |d � � | � t ||d�� � | � t ||d�� � | � t ||d�� � | � t j ||d� � | � t ||d �� � | � t ||d�� � | � t ||d�� � | � t ||d �� � | � t ||d�� � | � t ||d � � � | � t ||t j d
�� � | � t ||t j d �� � | � t ||t j d
�� � d S )Nr ��bad_attr�� delimiter�XX�foo� �� quotechar��lineterminator��quoting� )r( r$ )�assertRaises� TypeError�csv�Error� QUOTE_ALL�
QUOTE_NONE)r �ctor�args r �_test_arg_validzTest_Csv._test_arg_valid s� � ����)�T�*�*�*����)�T�4�0�0�0����)�T�3�1��=�=�=����)�T�3�A��>�>�>����)�T�3�D��A�A�A����#�)�T�3��6�6�6����)�T�3�$��?�?�?����)�T�3�!��<�<�<����)�T�3�!��<�<�<����)�T�3�t��D�D�D����)�T�3�q��A�A�A����)�T�3���=�=�=����)�T�3�"%�-�2� � ?� ?� ?����)�T�3�"%�-�4� � A� A� A����)�T�3�"%�.�B� � @� @� @� @� @r c � � | � t j g � � | � t t j t � � � � d S r
)r2 r, �readerr* r r r s r �test_reader_arg_validzTest_Csv.test_reader_arg_valid2 s>