##// END OF EJS Templates
Minor cleanup in iptest.py and growl.py.
Brian Granger -
Show More
@@ -37,15 +37,6 b' import tempfile'
37 import time
37 import time
38 import warnings
38 import warnings
39
39
40
41 # Ugly, but necessary hack to ensure the test suite finds our version of
42 # IPython and not a possibly different one that may exist system-wide.
43 # Note that this must be done here, so the imports that come next work
44 # correctly even if IPython isn't installed yet.
45 p = os.path
46 ippath = p.abspath(p.join(p.dirname(__file__),'..','..'))
47 sys.path.insert(0, ippath)
48
49 # Note: monkeypatch!
40 # Note: monkeypatch!
50 # We need to monkeypatch a small problem in nose itself first, before importing
41 # We need to monkeypatch a small problem in nose itself first, before importing
51 # it for actual use. This should get into nose upstream, but its release cycle
42 # it for actual use. This should get into nose upstream, but its release cycle
@@ -74,6 +65,7 b' pjoin = path.join'
74 #-----------------------------------------------------------------------------
65 #-----------------------------------------------------------------------------
75 # Warnings control
66 # Warnings control
76 #-----------------------------------------------------------------------------
67 #-----------------------------------------------------------------------------
68
77 # Twisted generates annoying warnings with Python 2.6, as will do other code
69 # Twisted generates annoying warnings with Python 2.6, as will do other code
78 # that imports 'sets' as of today
70 # that imports 'sets' as of today
79 warnings.filterwarnings('ignore', 'the sets module is deprecated',
71 warnings.filterwarnings('ignore', 'the sets module is deprecated',
@@ -150,11 +142,11 b' def report():'
150
142
151 def make_exclude():
143 def make_exclude():
152 """Make patterns of modules and packages to exclude from testing.
144 """Make patterns of modules and packages to exclude from testing.
153
145
154 For the IPythonDoctest plugin, we need to exclude certain patterns that
146 For the IPythonDoctest plugin, we need to exclude certain patterns that
155 cause testing problems. We should strive to minimize the number of
147 cause testing problems. We should strive to minimize the number of
156 skipped modules, since this means untested code. As the testing
148 skipped modules, since this means untested code.
157 machinery solidifies, this list should eventually become empty.
149
158 These modules and packages will NOT get scanned by nose at all for tests.
150 These modules and packages will NOT get scanned by nose at all for tests.
159 """
151 """
160 # Simple utility to make IPython paths more readably, we need a lot of
152 # Simple utility to make IPython paths more readably, we need a lot of
@@ -249,9 +241,11 b' class IPTester(object):'
249 if runner == 'iptest':
241 if runner == 'iptest':
250 iptest_app = get_ipython_module_path('IPython.testing.iptest')
242 iptest_app = get_ipython_module_path('IPython.testing.iptest')
251 self.runner = pycmd2argv(iptest_app) + sys.argv[1:]
243 self.runner = pycmd2argv(iptest_app) + sys.argv[1:]
252 else:
244 elif runner == 'trial':
253 # For trial, it needs to be installed system-wide
245 # For trial, it needs to be installed system-wide
254 self.runner = pycmd2argv(p.abspath(find_cmd('trial')))
246 self.runner = pycmd2argv(p.abspath(find_cmd('trial')))
247 else:
248 raise Exception('Not a valid test runner: %s' % repr(runner))
255 if params is None:
249 if params is None:
256 params = []
250 params = []
257 if isinstance(params, str):
251 if isinstance(params, str):
@@ -273,6 +267,8 b' class IPTester(object):'
273 # fashioned' way to do it, but it works just fine. If someone
267 # fashioned' way to do it, but it works just fine. If someone
274 # later can clean this up that's fine, as long as the tests run
268 # later can clean this up that's fine, as long as the tests run
275 # reliably in win32.
269 # reliably in win32.
270 # What types of problems are you having. They may be related to
271 # running Python in unboffered mode. BG.
276 return os.system(' '.join(self.call_args))
272 return os.system(' '.join(self.call_args))
277 else:
273 else:
278 def _run_cmd(self):
274 def _run_cmd(self):
@@ -1,6 +1,22 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
1 # encoding: utf-8
2 """
3 Utilities using Growl on OS X for notifications.
4 """
3
5
6 #-----------------------------------------------------------------------------
7 # Copyright (C) 2008-2009 The IPython Development Team
8 #
9 # Distributed under the terms of the BSD License. The full license is in
10 # the file COPYING, distributed as part of this software.
11 #-----------------------------------------------------------------------------
12
13 #-----------------------------------------------------------------------------
14 # Imports
15 #-----------------------------------------------------------------------------
16
17 #-----------------------------------------------------------------------------
18 # Code
19 #-----------------------------------------------------------------------------
4
20
5 class IPythonGrowlError(Exception):
21 class IPythonGrowlError(Exception):
6 pass
22 pass
General Comments 0
You need to be logged in to leave comments. Login now