관리-도구
편집 파일: test_cte.cpython-38.pyc
U -?�f3 � @ s� d dl mZ d dlmZ d dlmZ d dlmZ ddl mZ ddl mZ ddl m Z dd l m Z dd l mZ G dd� dej�Z d S )� )�fixtures)�eq_)�Column)�Table� )� ForeignKey)�Integer)�select)�String)�testingc @ s� e Zd ZdZdZdZdZedd� �Zedd� �Z dd � Z d d� Zdd � Ze jje jjdd� ��Ze jje jjdd� ��Ze jjdd� �ZdS )�CTETestT)ZctesZeachc C s\ t d|tdtdd�tdtd��tdtd��� t d |tdtdd�tdtd��tdt�� d S ) N� some_table�idT)Zprimary_key�data�2 � parent_idz some_table.id�some_other_table)r r r r r )�cls�metadata� r �Q/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/testing/suite/test_cte.py� define_tables s ��zCTETest.define_tablesc C sJ |� | jj�� ddd d�dddd�dddd�dd dd�d ddd�g� d S )N� �d1)r r r r �d2r �d3� �d4� �d5)�execute�tablesr �insert)r � connectionr r r �insert_data- s ��zCTETest.insert_datac C sf | j j}t|��|jj�dddg���d�}|�t|jj��|jj�ddg���}t |� � dg� d S )Nr r r �some_cter �r )r! r r �where�cr �in_�cter r �fetchall)�selfr# r r* �resultr r r �#test_select_nonrecursive_round_trip: s ����z+CTETest.test_select_nonrecursive_round_tripc C s� | j j}t|��|jj�dddg��jddd�}|�d�}|�� }|� t|��|jj |jjk��}|�t|jj��|jjdk�� |jj�� ��}t|�� dd d d d d g� d S )Nr r r r% T)� recursive�c1r&