From f80e4dc72eca12a5083cd76323a26962a3445afe Mon Sep 17 00:00:00 2001 From: MinRK Date: Sun, 9 Feb 2014 13:35:29 -0800 Subject: [PATCH] don't create js test directories unless they are being used just moves a setup block from `__init__` to `launch` --- IPython/testing/iptestcontroller.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/IPython/testing/iptestcontroller.py b/IPython/testing/iptestcontroller.py index 39fb93339..8300e32c3 100644 --- a/IPython/testing/iptestcontroller.py +++ b/IPython/testing/iptestcontroller.py @@ -178,15 +178,16 @@ class JSController(TestController): TestController.__init__(self) self.section = section + + def launch(self): self.ipydir = TemporaryDirectory() self.nbdir = TemporaryDirectory() - print("Running notebook tests in directory: %r" % self.nbdir.name) + print("Running %s tests in directory: %r" % (self.section, self.nbdir.name)) os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir1', u'sub ∂ir 1a'))) os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir2', u'sub ∂ir 1b'))) self.dirs.append(self.ipydir) self.dirs.append(self.nbdir) - - def launch(self): + # start the ipython notebook, so we get the port number self._init_server() js_test_dir = get_js_test_dir()