Show More
@@ -167,13 +167,12 b' class JSController(TestController):' | |||
|
167 | 167 | self.section = section |
|
168 | 168 | |
|
169 | 169 | self.ipydir = TemporaryDirectory() |
|
170 | self.nbdir = os.path.join(self.ipydir.name, 'notebooks') | |
|
171 | print("Running notebook tests in directory: %r" % self.nbdir) | |
|
172 |
os.makedirs(os.path.join(self.nbdir, ' |
|
|
173 |
os.makedirs(os.path.join(self.nbdir, ' |
|
|
174 | # print(self.ipydir.name) | |
|
170 | self.nbdir = TemporaryDirectory() | |
|
171 | print("Running notebook tests in directory: %r" % self.nbdir.name) | |
|
172 | os.makedirs(os.path.join(self.nbdir.name, os.path.join('subdir1', 'subdir1a'))) | |
|
173 | os.makedirs(os.path.join(self.nbdir.name, os.path.join('subdir2', 'subdir2a'))) | |
|
175 | 174 | self.dirs.append(self.ipydir) |
|
176 | self.env['IPYTHONDIR'] = self.ipydir.name | |
|
175 | self.dirs.append(self.nbdir) | |
|
177 | 176 | |
|
178 | 177 | def launch(self): |
|
179 | 178 | # start the ipython notebook, so we get the port number |
@@ -195,7 +194,7 b' class JSController(TestController):' | |||
|
195 | 194 | def _init_server(self): |
|
196 | 195 | "Start the notebook server in a separate process" |
|
197 | 196 | self.queue = q = Queue() |
|
198 | self.server = Process(target=run_webapp, args=(q, self.ipydir.name, self.nbdir)) | |
|
197 | self.server = Process(target=run_webapp, args=(q, self.ipydir.name, self.nbdir.name)) | |
|
199 | 198 | self.server.start() |
|
200 | 199 | self.server_port = q.get() |
|
201 | 200 | |
@@ -212,12 +211,11 b' def run_webapp(q, ipydir, nbdir, loglevel=0):' | |||
|
212 | 211 | import IPython.html.notebookapp as nbapp |
|
213 | 212 | import sys |
|
214 | 213 | sys.stderr = open(os.devnull, 'w') |
|
215 | os.environ["IPYTHONDIR"] = ipydir | |
|
216 | 214 | server = nbapp.NotebookApp() |
|
217 | 215 | args = ['--no-browser'] |
|
218 |
args. |
|
|
219 |
args. |
|
|
220 |
args. |
|
|
216 | args.extend(['--ipython-dir', ipydir]) | |
|
217 | args.extend(['--notebook-dir', nbdir]) | |
|
218 | args.extend(['--log-level', str(loglevel)]) | |
|
221 | 219 | server.initialize(args) |
|
222 | 220 | # communicate the port number to the parent process |
|
223 | 221 | q.put(server.port) |
General Comments 0
You need to be logged in to leave comments.
Login now