%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/alembic/testing/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyc

�
�M!Vc@s#ddlZddlZddlZddlmZddlmZmZddlm	Z	ddlm
Z
ddlmZd	�Ze
d
ed�Zd�Zd
�Zd�Zdd�Zed�Zed�Zddd�Zd�Zd�Zded�Zd�Zd�Zd�ZdS(i����Ni(tu(tScripttScriptDirectory(tutili(tengines(t	provisioncCstjrdtjSdSdS(Ns
scratch_%stscratch(RtFOLLOWER_IDENT(((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt_get_staging_directorys	tgenericcCs�ddlm}m}t�}|r�tjjt�d�}tjj|�r_t	j
|�n|j||d|�|r�ytj
|d�Wntk
r�nXttjj|d��q�n|jj|�}|S(Ni����(tcommandtscripttscriptsttemplatesenv.py(talembicR
Rt_testing_configtostpathtjoinRtexiststshutiltrmtreetinitRtload_python_filetAttributeErrortmake_sourcelessRtfrom_config(tcreateR
t
sourcelessR
RtcfgRtsc((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pytstaging_envs	
cCstjt�t�dS(N(RRRtTrue(((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pytclear_staging_env.scCsVtjjt�d�}tjj|d�}t|d��}|j|�WdQXdS(NRsscript.py.makotw(RRRRtopentwrite(ttxttdir_Rtf((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pytscript_file_fixture2scCs�tjjt�d�}d|}tjj|d�}tj|�}tj|tj�rktj|�nt	|d��}|j
|�WdQXdS(NRs6
from alembic import context

config = context.config
senv.pyR"(RRRRRtpyc_file_from_pathtaccesstF_OKtunlinkR#R$(R%R&Rtpyc_pathR'((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pytenv_file_fixture9s
sfoo.dbcCs8tjjt�d�}d||f}tjd|�S(NRssqlite:///%s/%sturl(RRRRRttesting_engine(ttempnameR&R/((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt_sqlite_file_dbJscCsEtjjt�d�}d|}td|||r:dndf�S(NRssqlite:///%s/foo.dbs�
[alembic]
script_location = %s
sqlalchemy.url = %s
sourceless = %s

[loggers]
keys = root

[handlers]
keys = console

[logger_root]
level = WARN
handlers = console
qualname =

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatters]
keys = generic

[formatter_generic]
format = %%(levelname)-5.5s [%%(name)s] %%(message)s
datefmt = %%H:%%M:%%S
    ttruetfalse(RRRRt_write_config_file(RR&R/((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt_sqlite_testing_configPs
cCsEtjjt�d�}d|}td|||r:dndf�S(NRssqlite:///%s/foo.dbs�
[alembic]
script_location = %s
sqlalchemy.url = %s
sourceless = %s
version_locations = %%(here)s/model1/ %%(here)s/model2/ %%(here)s/model3/

[loggers]
keys = root

[handlers]
keys = console

[logger_root]
level = WARN
handlers = console
qualname =

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatters]
keys = generic

[formatter_generic]
format = %%(levelname)-5.5s [%%(name)s] %%(message)s
datefmt = %%H:%%M:%%S
    R3R4(RRRRR5(RR&R/((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt_multi_dir_testing_configvs
t
postgresqltcCs/tjjt�d�}td|||f�S(sLuse a postgresql url with no host so that
    connections guaranteed to failRs�
[alembic]
script_location = %s
sqlalchemy.url = %s://
%s

[loggers]
keys = root

[handlers]
keys = console

[logger_root]
level = WARN
handlers = console
qualname =

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatters]
keys = generic

[formatter_generic]
format = %%(levelname)-5.5s [%%(name)s] %%(message)s
datefmt = %%H:%%M:%%S

(RRRRR5(tdialectt
directivesR&((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt_no_sql_testing_config�scCs5t�}t|jd��}|j|�WdQX|S(NR"(RR#tconfig_file_nameR$(ttextRR'((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyR5�s	cCsWddlm}tjt�tj�s;tjt��n|tjjt�d��S(Ni����(tConfigstest_alembic.ini(	talembic.configR?RR*RR+tmkdirRR(R?((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyR�stasciic
Cs|jj|�}|j}tj|�}|rB|j|�}nt|d��}|j|�WdQXtj	|�}t
j|t
j�r�t
j
|�ntj||�}	|jj|	j�}|j|	jkr�td��n|jj|	dt�|rt|�ndS(Ntwbs2Can't change down_revision on a refresh operation.t_replace(trevision_maptget_revisionRttextwraptdedenttencodeR#R$RR)RR*R+R,Rt
_from_pathtrevisiont
down_revisiont	Exceptiontadd_revisionR R(
t	scriptdirtrev_idtcontenttencodingRtoldRtfpR-R((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pytwrite_script�s"	cCsrtj|�}tj|tj�s*t�tj|�}tj|tj�satj||�ntj	|�dS(N(
RR)RR*R+tAssertionErrortsimple_pyc_file_from_pathRtcopyfileR,(RR-tsimple_pyc_path((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyR�scCs�tj�}tj�}tj�}tj|�}|j|ddt�t||d|�|j|ddt�t||td�||fdd�|j|ddt�t||d	||f�|||fS(
Ns
revision atrefreshs�"Rev A"
revision = '%s'
down_revision = None

from alembic import op

def upgrade():
    op.execute("CREATE STEP 1")

def downgrade():
    op.execute("DROP STEP 1")

s
revision bs�# coding: utf-8
"Rev B, méil"
revision = '%s'
down_revision = '%s'

from alembic import op

def upgrade():
    op.execute("CREATE STEP 2")

def downgrade():
    op.execute("DROP STEP 2")

RRsutf-8s
revision cs�"Rev C"
revision = '%s'
down_revision = '%s'

from alembic import op

def upgrade():
    op.execute("CREATE STEP 3")

def downgrade():
    op.execute("DROP STEP 3")

(RRPRRtgenerate_revisionR RUR(RtatbtcR((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pytthree_rev_fixture�s	

	
cCsctjjt�d�}dj|j��}djd�|j�D��}td|||f�S(s?alembic.ini fixture to work exactly with the 'multidb' templateRs, s

css(|]\}}d||jfVqdS(s[%s]
sqlalchemy.url = %sN(R/(t.0tkeytvalue((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pys	<genexpr>6ss�
[alembic]
script_location = %s
sourceless = false

databases = %s

%s
[loggers]
keys = root

[handlers]
keys = console

[logger_root]
level = WARN
handlers = console
qualname =

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatters]
keys = generic

[formatter_generic]
format = %%(levelname)-5.5s [%%(name)s] %%(message)s
datefmt = %%H:%%M:%%S
    (RRRRtkeystitemsR5(RR&t	databases((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt_multidb_testing_config-s(RRRGtutil.compatRRRRR9RRRRR tFalseRR!R(R.R2R6R7R<R5RRURR_Rf(((sD/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt<module>s,				&%%				8

Zerion Mini Shell 1.0