î
xÐR\U  ã               @   s   d  d l  Z  e  j d ƒ d  d l 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 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 d d l m Z d d l m Z e j  d d … d& k  rñd d! l m! Z! n  d" d# „  Z" e# d$ k re j$ d% d# ƒ n  d S)'é    NÚerroré   )Údsn)Úunittest)Ú
test_async)Útest_bugX000)Útest_bug_gc)Útest_cancel)Útest_connection)Ú	test_copy)Útest_cursor)Ú
test_dates)Útest_errcodes)Útest_extras_dictcursor)Útest_fast_executemany)Ú
test_green)Útest_ipaddress)Útest_lobject)Útest_module)Útest_notify)Útest_psycopg2_dbapi20)Ú
test_quote)Útest_replication)Útest_sql)Útest_transaction)Útest_types_basic)Útest_types_extras)Ú	test_withé   é   é   )Útest_async_keywordc              C   s…  d d  l  }  y |  j t ƒ } WnR t k
 rs } z2 t d | j j | ƒ t d ƒ t j d ƒ WYd  d  } ~ Xn X| j	 ƒ  t
 j ƒ  } | j t j ƒ  ƒ t j d  d … d k  rÌ | j t j ƒ  ƒ n  | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t j ƒ  ƒ | j t  j ƒ  ƒ | j t! j ƒ  ƒ | j t" j ƒ  ƒ | j t# j ƒ  ƒ | j t$ j ƒ  ƒ | j t% j ƒ  ƒ | j t& j ƒ  ƒ | j t' j ƒ  ƒ | S)	Nr   zFailed connection to test db:z7Please set env vars 'PSYCOPG2_TESTDB*' to valid values.r   r   r   r    )r   r    )(Úpsycopg2Úconnectr   Ú	ExceptionÚprintÚ	__class__Ú__name__ÚsysÚexitÚcloser   Z	TestSuiteZaddTestr   Ú
test_suiteÚversion_infor!   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r"   ZcnnÚeÚsuite© r/   úL/var/www/dbchiro/venv/lib/python3.4/site-packages/psycopg2/tests/__init__.pyr+   ?   sH    
 
r+   Ú__main__ZdefaultTest)r   r    )%ÚwarningsÚsimplefilterr(   Z
testconfigr   Z	testutilsr   Ú r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r,   r!   r+   r'   Úmainr/   r/   r/   r0   Ú<module>   sB   *