Ñò ‡„[Jc@sAddkZddkZddkZddkZddkZddkZddkZddkZddkl Z l Z l Z l a l Z lZlZlZlZlZlZlZlZlZlZlZlZddklZlZlZddklZddkl Z ddk!Z"ei#dƒZ$defd„ƒYZ%dS( iÿÿÿÿN(tdbtdb_labeltdb_urlt file_configt base_configtpost_configuret _list_dbst_server_side_cursorst_engine_strategyt _engine_urit_requiret _engine_poolt_create_testing_enginet_prep_testing_databaset_set_table_optionst_reverse_topologicalt_log(ttestingtconfigtrequires(tPlugin(ttolistsnose.plugins.sqlalchemytNoseSQLAlchemycBseeZdZeZdZdZeid„Z d„Z d„Z d„Z d„Z d„Zd „ZRS( sP Handles the setup and extra properties required for testing SQLAlchemy t sqlalchemyidc Cslti|||ƒ|i}|ddddddtddƒ|ddddddtdd ƒ|d dd d d dgddƒ|dddd dddddƒ|ddddtddƒ|dddd dddƒ|dddd dddƒ|dddd ddd ƒ|d!dddddtdd"ƒ|d#ddd d$dtdd%ƒ|d&ddd d'dtdd(ƒ|d)ddd d*dtdd+ƒ|d,ddd d-dtdd.ƒ|d/dddtdd0ƒ|d1ddd d2dddd3ƒ|d4dd d d5dgdd6ƒt i ƒa t i t i t ƒƒt id7tiid8ƒgƒt t_ dS(9Ns --log-infotactiontcallbackttypetstringthelps,turn on info logging for (multiple OK)s --log-debugs-turn on debug logging for (multiple OK)s --requiretappendtdesttrequiretdefaults;require a particular driver or module version (multiple OK)s--dbtstoreRtsqlitesUse prefab database uris--dbssList available prefab dbss--dburitdburisDatabase uri (overrides --db)s --dropfirstt store_truet dropfirstsQDrop all tables in the target database first (use with caution on Oracle, MS-SQL)s --mockpooltmockpools0Use mock pool (asserts only one connection used)s--enginestrategys9Engine strategy (plain or threadlocal, defaults to plain)s --reversetopt reversetopsVReverse the collection ordering for topological sorts (helps reveal dependency issues)s --unhashablet unhashablesDDisallow SQLAlchemy from performing a hash() on mapped test objects.s--noncomparablet noncomparables>Disallow SQLAlchemy from performing == on mapped test objects.s --truthlesst truthlesss>Disallow SQLAlchemy from truth-evaluating mapped test objects.s --serversides"Turn on server side cursors for PGs--mysql-enginet mysql_engines\Use the specified MySQL storage engine for all tables, default is a db-default/InnoDB combo.s--table-optiont tableoptss.Add a dialect-specific table option, key=valuestest.cfgs ~/.satest.cfg(Rtoptionst add_optionRRRtFalseRtNonet ConfigParserRtreadfptStringIORtreadtostpatht expanduserR(tselftparsertenvtopt((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyR-sN  cCs_ti|||ƒddk}ddk}t|_||_xtD]}||tƒqDWdS(Niÿÿÿÿ(Rt configureRRRRR(R8R-tconfRRtfn((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyR<Ns  cCsdS(Nt((R8ttest((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyt describeTestYscCsUt|tiƒptSt|dƒotii|ijotS|i |ƒ SdS(sýReturn true if you want the main test selector to collect tests from this class, false if you don't, and None if you don't care. :Parameters: cls : class The class being examined by the selector t __whitelist__N( t issubclassRtTestBaseR/thasattrRtnameRBtTruet _NoseSQLAlchemy__should_skip_for(R8tcls((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyt wantClass\s c Cs•t|dƒoKd„}x?|iD]0}tt|ƒ}||ƒƒdjotSq#Wnt|dƒo6tii|ijo d|i i tiifGHtSt|ddƒdtiifjo d|i i tiifGHtSt|dt ƒoExBt|dƒD]-}|ƒod|i i |i fGHtSq WnxPt|d d ƒD]<}ti |Œo&d |i i tiitƒfGHtSqQWt S( Nt __requires__cSsdS(Ntok((((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyt test_suitersRLt__unsupported_on__s*'%s' unsupported on DB implementation '%s't __only_on__t __skip_if__s'%s' skipped by %st__excluded_on__s$'%s' unsupported on DB %s version %s((RERKtgetattrRRGRRRFRNt __class__t__name__R0R/t _is_excludedt_server_version(R8RIRMt requirementtchecktctrule((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyt__should_skip_forps>   %    cCstiƒdS(N(Rt resetwarnings(R8R@((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyt beforeTest’scCstiƒdS(N(RR\(R8R@((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyt afterTest•s(RTt __module__t__doc__RGtenabledRFtscoreR5tenvironR-R<RARJRHR]R^(((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyRs0   " (&tloggingR5tretsysttimetwarningsR1R3RRRRRRRRRRR R R R R RRRtsqlalchemy.testRRt nose.pluginsRt nose.utilRt nose.casetnoset getLoggertlogR(((s>/usr/lib/python2.6/site-packages/sqlalchemy/test/noseplugin.pyts        p