관리-도구
편집 파일: test_autogen_diffs.cpython-38.pyc
U 0?�f� � @ s� d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dlmZ ddlm Z d d l mZ d dlmZ d dlm Z d d lmZ d dlmZ G dd� de e�ZG dd� de e�ZdS )� )� BigInteger)�Column)�Integer)�MetaData)�Table)�in_� )�AutogenFixtureTest� )�testing)�config)�eq_)�is_)�TestBasec @ s� e Zd ZdZe�dd�ejjdd� ��Z e�dd�ejjdd� ��Z e�dd�ejjdd � ��Ze�dd�ejjd d� ��Zdd d�Z dS )�AlterColumnTestT)T)Fc C sX t � }t � }td|tdt|d�� td|tdtd|d�� | �|||�}t|jd� d S )N�a�x��primary_key��commentr )r r r r �_assert_alter_colr Zmodify_comment��self�pk�m1�m2� alter_col� r �V/opt/hc_python/lib/python3.8/site-packages/alembic/testing/suite/test_autogen_diffs.py�test_all_existings_filled s z)AlterColumnTest.test_all_existings_filledc C sT t � }t � }td|tdtd|d�� td|tdtdd|d�� | j|||dd� d S )Nr r F)�nullabler )r! r r �r! )r r r r r )r r r r r r r �$test_all_existings_filled_in_notnull s �z4AlterColumnTest.test_all_existings_filled_in_notnullc C sZ t � }t � }td|tdtd|d�� td|tdtd|d�� | �|||�}t|jd� d S )Nr r �oldr �new)r r r r r r Zexisting_commentr r r r �$test_all_existings_filled_in_comment. s z4AlterColumnTest.test_all_existings_filled_in_commentc C s` t � }t � }td|tdtd|d�� td|tdtdd|d�� | �|||�}td|jjj� d S )Nr r �5)�server_defaultr r% )r( r r ) r r r r r r Zexisting_server_default�arg�textr r r r �+test_all_existings_filled_in_server_default: s( � ��z;AlterColumnTest.test_all_existings_filled_in_server_defaultNc C s^ | j ||dd�}|jd }|jd }|d kr<t|j| � nt|j|� |j�t� �sZt�|S )NT�Z return_ops���r )�_fixture�opsr Zexisting_nullableZ existing_typeZ_compare_type_affinityr �AssertionError)r r r r r! r/ Zmodify_tabler r r r r N s z!AlterColumnTest._assert_alter_col)N)�__name__� __module__�__qualname__�__backend__r �combinationsr �requirements�commentsr r# r&