def _runmodule(self, module_name):
    import runpy
    (mod_name, mod_spec, code) = runpy._get_module_details(module_name)
    self.mainpyfile = self.canonic(code.co_filename)
    import __main__
    __main__.__dict__.clear()
    __main__.__dict__.update({'__name__': '__main__', '__file__': self.mainpyfile, '__spec__': mod_spec, '__builtins__': __builtins__, '__package__': mod_spec.parent, '__loader__': mod_spec.loader})
    self._wait_for_mainpyfile = True
    self.run(code)
def _runmodule(self, module_name):
    import runpy
    (mod_name, mod_spec, code) = runpy._get_module_details(module_name)
    self.mainpyfile = self.canonic(code.co_filename)
    import __main__
    __main__.__dict__.clear()
    __main__.__dict__.update({'__name__': '__main__', '__file__': self.mainpyfile, '__spec__': mod_spec, '__builtins__': __builtins__, '__package__': mod_spec.parent, '__loader__': mod_spec.loader})
    self._wait_for_mainpyfile = True
    self.run(code)