def setup(self): ''' let the super set up the temporary ipython dir, then install assets ''' super(JSController, self).setup() # install the assets setup_assets(user=True, ipython_dir=self.ipydir.name)
def setup(): """setup temporary IPYTHONDIR for tests""" global IPYTHONDIR global save_env global save_get_ipython_dir IPYTHONDIR = tempfile.mkdtemp() save_env = os.environ.copy() os.environ["IPYTHONDIR"] = IPYTHONDIR save_get_ipython_dir = path.get_ipython_dir path.get_ipython_dir = lambda: IPYTHONDIR setup_assets(user=True)
def run(self): _cmd.run(self) from hy_kernel import setup_assets setup_assets(True)