##// END OF EJS Templates
shorten the js section names
Paul Ivanov -
Show More
@@ -159,20 +159,24 b' class PyTestController(TestController):'
159 self.cmd[2] = self.pycmd
159 self.cmd[2] = self.pycmd
160 super(PyTestController, self).launch()
160 super(PyTestController, self).launch()
161
161
162 js_prefix = 'js-'
163
162 def get_js_test_dir():
164 def get_js_test_dir():
163 import IPython.html.tests as t
165 import IPython.html.tests as t
164 return os.path.join(os.path.dirname(t.__file__), 'casperjs')
166 return os.path.join(os.path.dirname(t.__file__), 'casperjs','')
165
167
166 def all_js_groups():
168 def all_js_groups():
167 import glob
169 import glob
168 return glob.glob(get_js_test_dir() + '*/')
170 test_dir = get_js_test_dir()
171 all_subdirs = glob.glob(test_dir + '*/')
172 return [js_prefix+os.path.relpath(x, test_dir) for x in all_subdirs]
169
173
170 class JSController(TestController):
174 class JSController(TestController):
171 """Run CasperJS tests """
175 """Run CasperJS tests """
172 def __init__(self, section):
176 def __init__(self, section):
173 """Create new test runner."""
177 """Create new test runner."""
174 TestController.__init__(self)
178 TestController.__init__(self)
175 self.section = section
179 self.section = section[len(js_prefix):]
176
180
177 self.ipydir = TemporaryDirectory()
181 self.ipydir = TemporaryDirectory()
178 self.nbdir = TemporaryDirectory()
182 self.nbdir = TemporaryDirectory()
General Comments 0
You need to be logged in to leave comments. Login now