mς &U²Ic @s>dkTdkZdkZdklZlZdZddefddefdd e fd d d d dge fdde dƒde fdddddefdddde fgZ eoŒe edƒedƒefded ƒe fded ƒed ƒedƒedƒge fdedƒed ƒd dge fg7Z nd!„Zd"„Zd#„Zd$„Zeeƒd%GHy!eieiid&ƒdZWneefj o dZnXedj oayeeeƒZWn'ej oZd'GeiGHdZnXedj oeeƒd(GHq:n d)Gd*GHdS(+(t*N(sverifys have_unicodes-SOFTWARE\Python Registry Test Key - Delete Mes Int Valuei-s String ValsA string valuet StringExpandsThe path is %path%s Multi-stringtLotstoftstringtvaluessRaw Datatbinaryitdatas Big Stringtxiiis Big Binarys Unicode ValsA Unicode valuet UnicodeExpands Multi-unicodetunicodes Multi-mixedtUnicodetandc Csgt|ttdƒt|tƒ}t|dƒ}x-tD]%\}}}t ||d||ƒq8Wt |ƒ\}}} t|djdƒt|djdƒt |ƒ\}}} t|djdƒt|ttƒjdƒt|ƒ}t|ƒyt |ƒtd‚Wntj onXt|ƒ} |iƒyt | ƒtd‚Wntj onXdS( Ns Default valuetsub_keyiis"Not the correct number of sub keyss Not the correct number of valuessAIt appears the CloseKey() function does not close the actual key!sBIt appears the key.Close() function does not close the actual key!(tSetValuetroot_keyt test_key_nametREG_SZt CreateKeytkeyR t test_datat value_namet value_datat value_typet SetValueExt QueryInfoKeytnkeystnvaluest since_modtverifytlentintt int_sub_keytCloseKeyt RuntimeErrortEnvironmentErrortint_keytClose( RRR RRRR RRRR$((t-/data/zmath/lib/python2.4/test/test_winreg.pyt WriteTestDatas4        c Cskt|tƒ}t|djdƒt|tƒ}t|dƒ} d}xLyt | |ƒ}Wnt j oPnXt|t jdƒ|d}qIWt|t t ƒjdƒxLt D]D\}}}t| |ƒ\} }t| |jo ||jdƒq΅W| iƒt|dƒ} t| djd ƒyt|dƒtdd ƒWnt j onX|iƒdS( Ns Default values+Registry didn't give back the correct valueR iis&Didn't read back the correct test datas'Didn't read the correct number of itemss!Could not directly read the valuesRead subkey value wrongs2Was able to get a second key when I only have one!(t QueryValueRRtvalRtOpenKeyRR tindext EnumValueRR#RRRRRt QueryValueExtread_valtread_typR%tEnumKey( RR+RR)RR/RRRR.R ((R&t ReadTestDataAs8   c Cs"t|tdtƒ}t|ddtƒ}x$tD]\}}}t ||ƒq1Wt |ƒ\}}}t|djo |djdƒ|iƒt|dƒyt|dƒtddƒWntj onX|iƒt|tƒy t|tƒ}tddƒWntj onXdS(NiR ssubkey not empty before deletes Deleting the key twice succeededsCould open the non-existent key(R*RRtKEY_ALL_ACCESSRR RRRRt DeleteValueRRRRRR%t DeleteKeyR#t WindowsError( RRRRRRRRR ((R&tDeleteTestDatads*      cCs"t|ƒt|ƒt|ƒdS(N(R'RR1R6(R((R&tTestAlls  sLocal registry tests workeds--remotes)Could not connect to the remote machine -sRemote registry tests workeds)Remote registry calls can be tested usings('test_winreg.py --remote \\machine_name'(t_winregtostsysttest.test_supportRt have_unicodeRt REG_DWORDRt REG_EXPAND_SZt REG_MULTI_SZtchrt REG_BINARYRR R'R1R6R7tHKEY_CURRENT_USERtargvR+t remote_namet IndexErrort ValueErrortNonetConnectRegistryt remote_keyR#texctstrerror( R'R7R<RRR:R6R1RDRIRRJR9((R&t?s6ˆ Œ % #   !