• File: pytestplugin.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyc
  • Date Modified: 08/01/2016 8:07 PM
  • File size: 7.05 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

M!Vc@sXdZyddlZWn!ek
r9ddlmZnXddlZejdkZddlZddl	Z	ddl
Z
ddlZddlZyddl
Z
eZWnek
reZnXdZdZd	ZerejdZd
ZdZndZd
ZdadZdZdZdZdZ dZ!dS(sNOTE:  copied/adapted from SQLAlchemy master for backwards compatibility;
   this should be removable when Alembic targets SQLAlchemy 1.0.0.
iNi(tplugin_baseiics9|jdfd}tj|tjdS(Nt
sqlalchemycsX|jddrDdtjffdY}||d<nj||dS(NtcallbacktCallableActioncseZdfdZRS(cs|||dS(N((tselftparsert	namespacetvaluest
option_string(t	callback_(sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyt__call__$sN(t__name__t
__module__tNoneR
((R	(sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyR#staction(tpopR
targparsetActiont	addoption(tnametkwR(tgroup(R	sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytmake_option s

(tgetgroupRt
setup_optionstread_config(RR((RsT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_addoptions
cCsrt|dr6tj|jtj|jdntj|jtt|jdt	}tj
|dS(Nt
slaveinputtfollower_identt
cov_source(thasattrRt!restore_important_follower_configRtconfigure_followert	pre_begintoptiontbooltgetattrtFalsetset_coverage_flag(tconfigtcoverage((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_configure/scCstjdS(N(Rt
post_begin(tsession((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_sessionstart<scCsOtj|jdtt|jd<ddlm}|j|jddS(Nstest_%sRi(t	provision(Rt!memoize_important_follower_configRtnextt_follower_counttalembic.testingR-tcreate_follower_db(tnodeR-((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_configure_nodeBscCs(ddlm}|j|jddS(Ni(R-R(R1R-tdrop_follower_dbR(R3terrorR-((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_testnodedownLscCsgtjt}g|D]!}t|jtjr|^q|(td|D}x|D]}xtj	|j
|jjD]g}||j
k	r}||j
}xBtj|j
d|jjjD]}	|j|	jqWq}q}Wq[Wg}
xX|D]P}|jj
|kr<|
j||jj
g||jj
(q|
j|qWt|
dd|(dS(Ncss|]}|jVqdS(N(tparent(t.0titem((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pys	<genexpr>`sR8tkeycSs%|jjjj|jjj|jfS(N(R8R(R:((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyt<lambda>vs(tcollectionstdefaultdicttlistt
isinstanceR8tpytesttInstancetsetRtgenerate_sub_teststclstmoduletClassRtcollecttextendtappendtsorted(R+R'titemst
rebuilt_itemsR:ttest_classest
test_classtsub_clstlist_tinsttnewitems((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_collection_modifyitemsQs(,
	
		"
cCstj|r1tj|r1tj|d|Stj|rzt|tjrztj	|j
|rztj|d|SgSdS(NR8(tinspecttisclassRt
want_classRARGt
isfunctionR@RBtwant_methodREtFunction(t	collectorRtobj((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_pycollect_makeitem}scsqttjsdStdkrctjjjjafd}jjj|ntdS(NcstjjdadS(N(tclass_teardownR8R
t_current_class((R:(sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytfinalizes(	R@RARZR_R
tclass_setupR8taddfinalizert
test_setup(R:R`((R:sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_runtest_setupscCst|dS(N(t
test_teardown(R:((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pytpytest_runtest_teardownscCs,tj||jjj|jj|jdS(N(Rtbefore_testR8RFRRER(R:((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyRcscCstj|dS(N(Rt
after_test(R:((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyRescCstj|jdS(N(Rtstart_test_classRE(R:((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyRascCstj|jdS(N(Rtstop_test_classRE(R:((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyR^s(ii("t__doc__talembic_plugin_baseRtImportErrorttsystversion_infotpy3kRARRUR=t	itertoolstxdisttTruet	has_xdistR%RR)R,tcountR0R4R7RTR]R
R_RdRfRcReRaR^(((sT/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/pytestplugin.pyt<module>s@



		
		
	,