##// END OF EJS Templates
be explicit about skipping js tests...
Paul Ivanov -
Show More
@@ -208,15 +208,17 b' def get_js_test_dir():'
208 def all_js_groups():
208 def all_js_groups():
209 import glob
209 import glob
210 test_dir = get_js_test_dir()
210 test_dir = get_js_test_dir()
211 all_subdirs = glob.glob(test_dir + '*/')
211 all_subdirs = glob.glob(test_dir + '[!_]*/')
212 return [js_prefix+os.path.relpath(x, test_dir) for x in all_subdirs if os.path.relpath(x, test_dir) != '__pycache__']
212 return [js_prefix+os.path.relpath(x, test_dir) for x in all_subdirs]
213
213
214 class JSController(TestController):
214 class JSController(TestController):
215 """Run CasperJS tests """
215 """Run CasperJS tests """
216 def __init__(self, section):
216 requirements = ['zmq', 'tornado', 'jinja2', 'casperjs', 'sqlite3']
217 def __init__(self, section, enabled=True):
217 """Create new test runner."""
218 """Create new test runner."""
218 TestController.__init__(self)
219 TestController.__init__(self)
219 self.section = section
220 self.section = section
221 self.enabled = enabled
220 js_test_dir = get_js_test_dir()
222 js_test_dir = get_js_test_dir()
221 includes = '--includes=' + os.path.join(js_test_dir,'util.js')
223 includes = '--includes=' + os.path.join(js_test_dir,'util.js')
222 test_cases = os.path.join(js_test_dir, self.section[len(js_prefix):])
224 test_cases = os.path.join(js_test_dir, self.section[len(js_prefix):])
@@ -244,7 +246,7 b' class JSController(TestController):'
244
246
245 @property
247 @property
246 def will_run(self):
248 def will_run(self):
247 return all(have[a] for a in ['zmq', 'tornado', 'jinja2', 'casperjs', 'sqlite3'])
249 return self.enabled and all(have[a] for a in self.requirements)
248
250
249 def _init_server(self):
251 def _init_server(self):
250 "Start the notebook server in a separate process"
252 "Start the notebook server in a separate process"
@@ -335,15 +337,15 b' def prepare_controllers(options):'
335 js_testgroups = all_js_groups()
337 js_testgroups = all_js_groups()
336 else:
338 else:
337 js_testgroups = [g for g in testgroups if g not in py_testgroups]
339 js_testgroups = [g for g in testgroups if g not in py_testgroups]
340 js_enabled = len(js_testgroups) > 0
338 else:
341 else:
339 py_testgroups = py_test_group_names
342 py_testgroups = py_test_group_names
343 js_testgroups = all_js_groups()
340 if not options.all:
344 if not options.all:
341 js_testgroups = []
345 js_enabled = False
342 test_sections['parallel'].enabled = False
346 test_sections['parallel'].enabled = False
343 else:
344 js_testgroups = all_js_groups()
345
347
346 c_js = [JSController(name) for name in js_testgroups]
348 c_js = [JSController(name, js_enabled) for name in js_testgroups]
347 c_py = [PyTestController(name, options) for name in py_testgroups]
349 c_py = [PyTestController(name, options) for name in py_testgroups]
348
350
349 controllers = c_py + c_js
351 controllers = c_py + c_js
General Comments 0
You need to be logged in to leave comments. Login now