관리-도구
편집 파일: test_autogen_comments.cpython-38.pyc
U 0?�f� � @ s� d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ ddlmZ dd lm Z dd lm Z ddlmZ G dd � d ee�ZdS )� )�Column)�Float)�MetaData)�String)�Table� )�AutogenFixtureTest� )�eq_)�mock)�TestBasec @ sT e Zd ZdZdZdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z dd� Zdd� ZdS )�AutogenerateCommentsTestT)�commentsc C sb t � }t � }td|tdtd�dd�dd� td|tdtd�dd�dd� | �||�}t|g � d S )N� some_table�test� T�Zprimary_key�this is some table��comment)r r r r �_fixturer ��self�m1�m2Zdiffs� r �Y/opt/hc_python/lib/python3.8/site-packages/alembic/testing/suite/test_autogen_comments.py�%test_existing_table_comment_no_change s ��z>AutogenerateCommentsTest.test_existing_table_comment_no_changec C s� t � }t � }td|tdtd�dd�� td|tdtd�dd�dd� | �||�}t|d d d � t|d d jd� t|d d d � d S )Nr r r Tr r r r �add_table_commentr � �r r r r r r r r r r r �test_add_table_comment( s �z/AutogenerateCommentsTest.test_add_table_commentc C sz t � }t � }td|tdtd�dd�dd� td|tdtd�dd�� | �||�}t|d d d � t|d d jd � d S )Nr r r Tr r r r Zremove_table_commentr r r r r r �test_remove_table_comment; s �z2AutogenerateCommentsTest.test_remove_table_commentc C s� t � }t � }td|tdtd�dd�dd� td|tdtd�dd�dd� | �||�}t|d d d � t|d d jd� t|d d d� d S ) Nr r r Tr r r zthis is also some tabler r r r r r r r r �test_alter_table_commentM s$ ��z1AutogenerateCommentsTest.test_alter_table_commentc C sr t � }t � }td|tdtd�dd�tdtdd�� td|tdtd�dd�tdtdd�� | �||�}t|g � d S ) Nr r r Tr �amount� the amountr )r r r r r r r r r r r �&test_existing_column_comment_no_changee s ��z?AutogenerateCommentsTest.test_existing_column_comment_no_changec C s� t � }t � }td|tdtd�dd�tdt�� td|tdtd�dd�tdtdd�� | �||�}t|d d dddtjd d�d dfgg� d S �Nr r r Tr r$ r% r �modify_commentF�Zexisting_nullableZ existing_typeZexisting_server_default� r r r r r r r r �ANYr r r r �test_add_column_comment{ s>