
    +hQ                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 dd	lm
Z
 dd
lmZ ddlmZ ddlmZ ddlmZ  G d de
j"                        Zy)z*verrrrry basic unicode column name testing    )desc)
ForeignKey)Integer)MetaData)testing)util)eq_)fixtures)Column)Table)u)uec                   <    e Zd ZdZdZed        Zd Zd Zd Z	d Z
y)	UnicodeSchemaTest)unicode_ddlTc                    t        t        d      |t        t        d      t        d      t        t	        d      t              d      at        t        d      |t        t        d      t        dd	      t        t	        d      t        t        t        d
            d      d      at        j                  d      rt        t	        d      |t        t	        d      t        dd      t        t	        d      t        t        t	        d                  t        t        d      t        t        t        d                  t        t	        d      t        t        t	        d                  d      a
y t        t	        d      |t        t	        d      t        dd      t        t	        d      t              t        t        d      t              t        t	        d      t              d      a
y )N	unitable1   méilT)primary_key   測試)test_needs_fku
   Unitéble2a)r   keyu   unitable1.méilb)r   sqlite	   測試_idF)r   autoincrement   unitable1_測試u   unitable1.測試   Unitéble2_bu   Unitéble2.b   測試_selfu   測試.測試_id)r   r   r   r   r   t1r   t2r   againstt3)clsmetadatas     \/var/www/html/venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_unicode_ddl.pydefine_tableszUnicodeSchemaTest.define_tables   s    kN1W:wD92n%w/
 lO1W:wDcB>"1./0	 
 ??8$>"() $"'	 /0r":;<
 n%w
1^;L0M *+r"@AB
 #-B2 >"() $"'	 r23W=q('2r-.8"B    c                    |j                  t        j                         t        d      dt	        d      di       |j                  t
        j                         t        d      dt        d      di       |j                  t        j                         t	        d      dt	        d      dt        d	      dt	        d
      di       t        |j                  t        j                               j                         dg       t        |j                  t
        j                               j                         dg       t        |j                  t        j                               j                         dg       y )Nr      r      r   r   r   r   r   r    r+   r,   r+   r+   r+   r,   r+   r+   )
executer!   insertr   r   r"   r$   r	   selectfetchall)self
connections     r'   test_insertzUnicodeSchemaTest.test_insertX   s   299;7Q>8JA(NO299;3AcFA(>?IIK$%q+,a.!1&'		
 	Jryy{+446AJryy{+446AJryy{+446Gr)   c                    |j                  t        j                         t        d      dt	        d      di       |j                  t
        j                         t        d      dt        d      di       |j                  t        j                         t	        d      dt	        d      dt        d	      dt	        d
      di       |j                  t        j                               j                         }t        |j                  t        j                  t        d            d       t        |j                  t        j                  t	        d            d       |j                  t
        j                               j                         }t        |j                  t
        j                  t        d            d       t        |j                  t
        j                  t        d            d       |j                  t        j                               j                         }t        |j                  t        j                  t	        d            d       t        |j                  t        j                  t	        d            d       t        |j                  t        j                  t        d	            d       t        |j                  t        j                  t	        d
            d       y )Nr   r+   r   r,   r   r   r   r   r   r    )r0   r!   r1   r   r   r"   r$   r2   firstr	   _mappingc)r4   r5   rows      r'   test_col_targetingz$UnicodeSchemaTest.test_col_targetingi   s   299;7Q>8JA(NO299;3AcFA(>?IIK$%q+,a.!1&'		
   -335CLLaj)*A.CLLb012A6  -335CLLaf&*CLLaf&*  -335CLLb!2345q9CLLb!9:;<a@CLLa/0115CLLb!4567;r)   c                    |j                  t        j                         t        d      dt	        d      di       |j                  t
        j                         t        d      dt        d      di       |j                  t        j                         t	        d      dt	        d      dt        d	      dt	        d
      di       t               }t        t        j                  ||      }t        t
        j                  ||      }t        t        j                  ||      }|j                  |j                         t        d      dt	        d      di       |j                  |j                         t        d      dt	        d      di       |j                  |j                         t	        d      dt	        d      dt        d	      dt	        d
      di       t        |j                  |j                         j                  t        t        d                        j                         ddg       t        |j                  |j                         j                  t        t        d                        j                         ddg       t        |j                  |j                         j                  t        t	        d                        j                         ddg       y )Nr      r      r   r   r   r   r   r    )autoload_withr+   r,   )r>   r?   r-   )r>   r>   r.   )r>   r?   r>   r>   r/   )r0   r!   r1   r   r   r"   r$   r   r   namer	   r2   order_byr   r3   )r4   r5   metatt1tt2tt3s         r'   test_reflectzUnicodeSchemaTest.test_reflect   s<   299;7Q>8JA(NO299;3AcFA(>?IIK$%q+,a.!1&'		
 zBGGT<BGGT<BGGT<3::<!G*aN9KQ)OP3::<!G*aN9KQ)OPJJL$%q+,a.!1&'		
 	

%%d1W:&67hjV		
 	

%%d1W:&67hjV		
 	

%%d2.?+@&ABhj<(		
r)   c           	          t               }t        t        d      |t        t        d      t                    }t
        j                  rt        t        |      d       y t        t        |      d       y )Nr   r   ud   Table('\u6e2c\u8a66', MetaData(), Column('\u6e2c\u8a66_id', Integer(), table=<測試>), schema=None)uX   Table('測試', MetaData(), Column('測試_id', Integer(), table=<測試>), schema=None))	r   r   r   r   r   r   py2kr	   repr)r4   rC   ts      r'   	test_reprzUnicodeSchemaTest.test_repr   s_    z~fR0A-BG&L
 99Q# Q#r)   N)__name__
__module____qualname____requires____backend__classmethodr(   r6   r<   rG   rL    r)   r'   r   r      s5    #LK? ?BH"<6/
br)   r   N)__doc__
sqlalchemyr   r   r   r   r   r   sqlalchemy.testingr	   r
   sqlalchemy.testing.schemar   r   sqlalchemy.utilr   r   
TablesTestr   rS   r)   r'   <module>rZ      s@    0  !     " ' , +  |++ |r)   