Mercurial > paraspace
diff paraspace/tests/injection_test.py @ 93:2fa9b6f21344
Add DEXFile_linked to model linked DEX
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 25 Jul 2011 13:23:02 +0800 |
parents | 1728795c29b7 |
children | 9373465643e0 |
line wrap: on
line diff
--- a/paraspace/tests/injection_test.py Mon Jul 25 10:01:14 2011 +0800 +++ b/paraspace/tests/injection_test.py Mon Jul 25 13:23:02 2011 +0800 @@ -3,7 +3,7 @@ def _install_dexfile_4_deptracker(): global dexfile - import imp + import imp, sys from paraspace import dex_deptracker try: @@ -14,6 +14,8 @@ dex_deptracker.dexfile = new_dexfile dexfile = new_dexfile dex_deptracker._nest_types = (dexfile.array, dexfile.cond, dexfile.switch) + + sys.modules['paraspace.dexfile'] = new_dexfile pass @@ -30,10 +32,14 @@ helloworld_fn = os.path.join(srcroot, 'data', 'helloworld.dex') helloworld_dex = dexfile.DEXFile.open(helloworld_fn) - build_dependencies(helloworld_dex, all_dep_decls) + helloworld_linked = \ + dexfile.DEXFile_linked.build_dependencies(helloworld_dex, + all_dep_decls) fakefile_fn = os.path.join(srcroot, 'data', 'fakefile.dex') fakefile_dex = dexfile.DEXFile.open(fakefile_fn) - build_dependencies(fakefile_dex, all_dep_decls) + fakefile_linked = \ + dexfile.DEXFile_linked.build_dependencies(fakefile_dex, + all_dep_decls) pass