Ñò š}êGc @s³dZeZddkZddkZddklZddklZyddk l Z l Z Wn)e j oddk l Z l Z nXeieƒZdefd„ƒYZdS(s This plugin adds a test id (like #1) to each test name output. After you've run once to generate test ids, you can re-run individual tests by activating the plugin and passing the ids (with or without the # prefix) instead of test names. For example, if your normal test run looks like:: % nosetests -v tests.test_a ... ok tests.test_b ... ok tests.test_c ... ok When adding --with-id you'll see:: % nosetests -v --with-id #1 tests.test_a ... ok #2 tests.test_b ... ok #2 tests.test_c ... ok Then you can rerun individual tests by supplying just the id numbers:: % nosetests -v --with-id 2 #2 tests.test_b ... ok Then you can rerun individual tests by supplying just the id numbers:: % nosetests -v --with-id 2 3 #2 tests.test_b ... ok #3 tests.test_c ... ok Since most shells consider '#' a special character, you can leave it out when specifying a test id. iÿÿÿÿN(tPlugin(tsrc(tdumptloadtTestIdcBskeZdZdZd ZeZd„Zd„Z d„Z d d„Z d„Z d„Z d„Zd „ZRS( s Activate to add a test id (like #1) to each test name output. After you've run once to generate test ids, you can re-run individual tests by activating the plugin and passing the ids (with or without the # prefix) instead of test names. tidc Cs<ti|||ƒ|iddddddddd ƒdS( Ns --id-filetactiontstoretdestt testIdFiletdefaults.noseidsthelpsfStore test ids found in test runs in this file. Default is the file .noseids in the working directory.(Rtoptionst add_option(tselftparsertenv((s7/usr/lib/python2.6/site-packages/nose/plugins/testid.pyR <scCs‹ti|||ƒtii|iƒ|_tii|iƒp"tii|i |iƒ|_nd|_ h|_ h|_ h|_ dS(Ni(Rt configuretostpatht expanduserR tidfiletisabstjoint workingDirRtidsttestst_seen(RR tconf((s7/usr/lib/python2.6/site-packages/nose/plugins/testid.pyRDs"   cCsx|iojt|idƒ}tt|iiƒ|iiƒƒƒ}t||ƒ|i ƒt i d||iƒndS(NtwsSaved test ids: %s to %s( t shouldSavetopenRtdicttzipRtvaluestkeysRtclosetlogtdebug(RtresulttfhR((s7/usr/lib/python2.6/site-packages/nose/plugins/testid.pytfinalizeRs  '  cCsÙtid||ƒyHt|idƒ}t|ƒ|_tid|i|iƒ|iƒWn'tj otid|iƒdSXdt |i |ƒf}|i p.t t |iiƒ|iiƒƒƒ|_n|S(sTranslate ids in the list of requested names into their test addresses, if they are found in my dict of tests. s ltfn %s %strsLoaded test ids %s from %ssIO error reading %sN(R%R&RRRRR$tIOErrortNonetmapttrRR R!R"R#R(RtnamestmoduleR(R'((s7/usr/lib/python2.6/site-packages/nose/plugins/testid.pytloadTestsFromNames[s .cCsbtid|ƒ|\}}}|dj ot|ƒ}n|}|dj od||fS|S(Ns Make name %ss%s:%s(R%R&R,R(RtaddrtfilenameR0tcallthead((s7/usr/lib/python2.6/site-packages/nose/plugins/testid.pytmakeNamers  cCs ||_dS(N(tstream(RR7((s7/usr/lib/python2.6/site-packages/nose/plugins/testid.pytsetOutputStream}scCs±|iƒ}||ijo[|ip||ijo|iidƒn)|iid|i|ƒd|i|"s