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