##// END OF EJS Templates
Refactor generation of casperjs command
Thomas Kluyver -
Show More
@@ -197,6 +197,10 b' class JSController(TestController):'
197 """Create new test runner."""
197 """Create new test runner."""
198 TestController.__init__(self)
198 TestController.__init__(self)
199 self.section = section
199 self.section = section
200 js_test_dir = get_js_test_dir()
201 includes = '--includes=' + os.path.join(js_test_dir,'util.js')
202 test_cases = os.path.join(js_test_dir, self.section[len(js_prefix):])
203 self.cmd = ['casperjs', 'test', includes, test_cases]
200
204
201 def setup(self):
205 def setup(self):
202 self.ipydir = TemporaryDirectory()
206 self.ipydir = TemporaryDirectory()
@@ -208,11 +212,7 b' class JSController(TestController):'
208
212
209 # start the ipython notebook, so we get the port number
213 # start the ipython notebook, so we get the port number
210 self._init_server()
214 self._init_server()
211 js_test_dir = get_js_test_dir()
215 self.cmd.append('--port=%s' % self.server_port)
212 includes = '--includes=' + os.path.join(js_test_dir,'util.js')
213 test_cases = os.path.join(js_test_dir, self.section[len(js_prefix):])
214 port = '--port=' + str(self.server_port)
215 self.cmd = ['casperjs', 'test', port, includes, test_cases]
216
216
217 def print_extra_info(self):
217 def print_extra_info(self):
218 print("Running tests with notebook directory %r" % self.nbdir.name)
218 print("Running tests with notebook directory %r" % self.nbdir.name)
General Comments 0
You need to be logged in to leave comments. Login now