From 02c6bf1f581a6ac11b3a7e2d533bd06e52592ac7 2014-02-08 00:21:22 From: Paul Ivanov Date: 2014-02-08 00:21:22 Subject: [PATCH] shorten the js section names --- diff --git a/IPython/testing/iptestcontroller.py b/IPython/testing/iptestcontroller.py index 19f4bff..e5d5ca7 100644 --- a/IPython/testing/iptestcontroller.py +++ b/IPython/testing/iptestcontroller.py @@ -159,20 +159,24 @@ class PyTestController(TestController): self.cmd[2] = self.pycmd super(PyTestController, self).launch() +js_prefix = 'js-' + def get_js_test_dir(): import IPython.html.tests as t - return os.path.join(os.path.dirname(t.__file__), 'casperjs') + return os.path.join(os.path.dirname(t.__file__), 'casperjs','') def all_js_groups(): import glob - return glob.glob(get_js_test_dir() + '*/') + test_dir = get_js_test_dir() + all_subdirs = glob.glob(test_dir + '*/') + return [js_prefix+os.path.relpath(x, test_dir) for x in all_subdirs] class JSController(TestController): """Run CasperJS tests """ def __init__(self, section): """Create new test runner.""" TestController.__init__(self) - self.section = section + self.section = section[len(js_prefix):] self.ipydir = TemporaryDirectory() self.nbdir = TemporaryDirectory()