528 self.mainThread.run( |
529 self.mainThread.run( |
529 code, self.debugMod.__dict__, debug=False, closeSession=False |
530 code, self.debugMod.__dict__, debug=False, closeSession=False |
530 ) |
531 ) |
531 |
532 |
532 elif method == "RequestCoverage": |
533 elif method == "RequestCoverage": |
533 from coverage import Coverage |
534 from coverage import Coverage # __IGNORE_WARNING_I10__ |
534 |
535 |
535 self.disassembly = None |
536 self.disassembly = None |
536 sys.argv = [] |
537 sys.argv = [] |
537 if params["argv"] and params["argv"][0].startswith("--plugin="): |
538 if params["argv"] and params["argv"][0].startswith("--plugin="): |
538 # we are coverage testing an eric IDE plug-in |
539 # we are coverage testing an eric IDE plug-in |
1937 self.debugMod.__dict__["__file__"] = self.running |
1938 self.debugMod.__dict__["__file__"] = self.running |
1938 sys.modules["__main__"] = self.debugMod |
1939 sys.modules["__main__"] = self.debugMod |
1939 if codeStr: |
1940 if codeStr: |
1940 code = self.__compileCommand(codeStr) |
1941 code = self.__compileCommand(codeStr) |
1941 elif scriptModule: |
1942 elif scriptModule: |
1942 import runpy |
|
1943 |
|
1944 modName, modSpec, code = runpy._get_module_details(scriptModule) |
1943 modName, modSpec, code = runpy._get_module_details(scriptModule) |
1945 self.running = code.co_filename |
1944 self.running = code.co_filename |
1946 self.debugMod.__dict__.clear() |
1945 self.debugMod.__dict__.clear() |
1947 self.debugMod.__dict__.update( |
1946 self.debugMod.__dict__.update( |
1948 { |
1947 { |