ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ M!Vc@@sdZddlmZyddlmZWn!ek rMddlmZnXddlZddl Z ej d,kZ e rddl Z n ddl Z dadadZdadadadZdadadadaiaeaeadadZdZ d Z!d Z"d Z#d Z$d Z%dZ&dZ'dZ(dZ)dZ*dZ+gZ,gZ-dZ.dZ/e.dZ0e.dZ1e.dZ2e/dZ3e/dZ4e/dZ5dZ6e/dZ7e/dZ8e/dZ9d Z:d!Z;d"Z<d#Z=d$Z>d%Z?d&Z@d'ZAd(ZBdd)ZCd*ZDd+ZEdS(-sGTesting extensions. this module is designed to work as a testing-framework-agnostic library, so that we can continue to support nose and also begin adding new functionality via py.test. NOTE: copied/adapted from SQLAlchemy master for backwards compatibility; this should be removable when Alembic targets SQLAlchemy 1.0.0 i(tabsolute_import(tSkipTest(tSkippedNic C@s|ddddddtdd|ddddddtdd |d dd ddd d dd|ddddtdd|ddd ddd ddd|dddd ddd|dddd ddd|dddd ddd|dddd ddd |d!ddd d"d#tdd$|d%dddddtdd&|d'ddd d(d#tdd)|d*dddtdddd+|d,dddtdddd-|d.dddd/|d0dd1d d2d#ddd3dS(4Ns --log-infotactiontcallbackttypetstringthelps,turn on info logging for (multiple OK)s --log-debugs-turn on debug logging for (multiple OK)s--dbtappendtdesttdbsBUse prefab database uri. Multiple OK, first one is run by default.s--dbssList available prefab dbss--dburitdburis8Database uri. Multiple OK, first one is run by default.s --dropfirstt store_truet dropfirsts,Drop all tables in the target database firsts--backend-onlyt backend_onlys&Run only tests marked with __backend__s --mockpooltmockpools0Use mock pool (asserts only one connection used)s--low-connectionstlow_connectionss>Use a low number of distinct connections - i.e. for Oracle TNSs --reversetopt reversetoptdefaultsTUse a random-ordering set implementation in the ORM (helps reveal dependency issues)s--requirementss3requirements class for testing, overrides setup.cfgs--with-cdecimaltcdecimalsDMonkeypatch the cdecimal library into Python 'decimal' for all testss --include-tagsInclude tests with tag s --exclude-tagsExclude tests with tag s --serversides"Turn on server side cursors for PGs--mysql-enginetstoret mysql_engines\Use the specified MySQL storage engine for all tables, default is a db-default/InnoDB combo.(t_logt _list_dbstFalset_requirements_optt _include_tagt _exclude_tagtNone(t make_option((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt setup_options9sP    cC@sddlm}||_dS(sConfigure required state for a follower. This invokes in the parent process and typically includes database creation. i(t provisionN(talembic.testingRtFOLLOWER_IDENT(tfollower_identR((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pytconfigure_followerjscC@s#itd6td6td6|dt setup_filters(R4((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt post_begins  cC@sytsddlatjn|jdrJtj|jtjn+|jdrutj|jtjndS(Nis-infos-debug(tloggingt basicConfigtendswitht getLoggertsetLeveltINFOtDEBUG(topt_strR7tparser((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRs  cG@sQdGHx8ttjdD]!}d|tjd|fGHqWtjddS(Ns0Available --db options (use --dburi to override)R s%20s %si(tsortedR.R1tgettsystexit(targstmacro((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRscC@st|dS(N(t_setup_requirements(RJR7RK((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRscC@stj|jdddS(Nt-t_(R&taddtreplace(RJR7RK((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRscC@stj|jdddS(NRSRT(R%RURV(RJR7RK((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRscC@stj||S(N(R2R(R4((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pytpres cC@stj||S(N(R?R(R4((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pytposts cC@s |adS(N(R1(R3R.((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt_setup_optionsscC@s|jrttd(tinspect(t InspectorRt test_schematorder_byt foreign_keyt postgresql(Rt*tname(#R R9talembic.testing.exclusionsRR@RtalembicR>tsqla_08Rtsqlalchemy.engine.reflectionRt from_engineR tConfigt all_configsR tget_view_namestNotImplementedErrortexecutet _DropViewtTabletMetaDataRvtschemastenabled_for_configtreversedtget_table_namest DropTabletsqla_100tsqlalchemy.dialectsRt get_enumst DropEnumTypetENUM(R1R.R9RRR>RRRktet inspectort view_namestvnamettnameRtenum((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt_prep_testing_database5s\                    cC@s'|jr#ddlm}|ndS(Ni(trandomize_unitofwork(Rtsqlalchemy.orm.utilR(R1R.R((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt_reverse_topologicalts cC@s&ddlm}t|_||_dS(Ni(R9(R R9R1R.(R3R.R9((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt_post_setup_options{s cC@sWt|tjstS|jjdr,tStjjrOt |dt rOtSt SdS(NRTt __backend__( t issubclassR=tTestBaseRt__name__t startswithR9R1RRxR\(tcls((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt want_classs cC@s|jjdstS|jdkr)tStr~t|dr\tj|j j tt p}t|do}|j j tt St rt|drtj|j j tt St rt|dr|j j tt St SdS(Nttest_t__tags__t_sa_exclusion_extend(RRRt __module__RR%thasattrR;ttagsRt include_testR&RR\(RR4((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt want_methods"    cc@st|dtrxt|D]o}d|j|jj|jjf}t||fid|jj|jjfd6}t||||VqWn|VdS(NRs%s_%s_%ss%s+%st __only_on__( RxRt_possible_configs_for_clsRR RtdriverRtsetattr(RtmoduleRkRtsubcls((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pytgenerate_sub_testss"# cC@st|t|dS(N(t _do_skipst _setup_engine(R((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pytstart_test_classs cC@s tdS(N(t_restore_engine(R((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pytstop_test_classscC@stjjdS(N(R9Rftreset(((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRscC@s>t|ddr:tjd|j}tjj|ndS(Nt__engine_options__R1(RxRR<ttesting_engineRR9Rft push_engine(Rteng((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRscC@sdS(N((ttestttest_module_namet test_classt test_name((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt before_testscC@sdS(N((R((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyt after_testsc C@sttjj}|jrftj|j}x3t|D]"}||r=|j|q=q=Wnt |ddrtjt j |j }x3t|D]"}||s|j|qqWnt|dr`tj}x|t|D]k}xb|jD]W}t ||}|j|}|r|j||dk rQ|j|nPqqWqWnt|drt} tj}xVt|D]H}x?|jD]4}t ||}|j|s| j|qqWqW|j| r|j| qn|S(NRt __requires__t__prefer_requires__(tsetR9RRt__unsupported_on__R;tdb_specRatremoveRxRR>tto_listRRRvRtmatching_config_reasonstextendRRRUt differencetdifference_update( RtreasonsRtspect config_objRvt requirementtcheckt skip_reasonst non_preferred((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRsB        cC@sg}t||}t|dtrlxBt|dD].}|r7td|j|jfq7q7Wn|st|dtrd|j|jf}n;d|jdjdtjj Ddj|f}t|nt |drit }t j tj|j}x*|D]"}||s!|j|q!q!W|j|ri|j|qintj|krt|j|ndS( Nt __skip_if__s'%s' skipped by %sRs('%s' unsupported for implementation '%s's.'%s' unsupported on any DB implementation %s%ss, cs@sJ|]@}d|jjdjd|jjjD|jjfVqdS(s '%s(%s)+%s'Rucs@s|]}t|VqdS(N(tstr(t.0tdig((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pys sN(R Rtjointdialecttserver_version_infoR(RR((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pys st__prefer_backends__(RRxRRRRRR9RRRRR;RR>RRRURRRft _setup_configtpop(RRRtctmsgRRR((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyRs8     cC@stjj|dS(N(R9Rftpush(Rtctx((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyR+s(ii(Ft__doc__t __future__RtnoseRt ImportErrort_pytest.runnerRRNRbt version_infotpy3kR,R-RR=R<RR;R:t assertionsRvR9R>R.RCR$RR%R&R1RR#R)R+R0R5R8RBRRRRRR2R?RWRXRYR]R`RlRpRsRRRRRRRRRRRRRRRRR(((sS/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/plugin/plugin_base.pyts       1             ?         + ,