##// END OF EJS Templates
Minor cleanup in iptest.py and growl.py.
Brian Granger -
Show More
@@ -37,15 +37,6 b' import tempfile'
37 37 import time
38 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 40 # Note: monkeypatch!
50 41 # We need to monkeypatch a small problem in nose itself first, before importing
51 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 66 # Warnings control
76 67 #-----------------------------------------------------------------------------
68
77 69 # Twisted generates annoying warnings with Python 2.6, as will do other code
78 70 # that imports 'sets' as of today
79 71 warnings.filterwarnings('ignore', 'the sets module is deprecated',
@@ -153,8 +145,8 b' def make_exclude():'
153 145
154 146 For the IPythonDoctest plugin, we need to exclude certain patterns that
155 147 cause testing problems. We should strive to minimize the number of
156 skipped modules, since this means untested code. As the testing
157 machinery solidifies, this list should eventually become empty.
148 skipped modules, since this means untested code.
149
158 150 These modules and packages will NOT get scanned by nose at all for tests.
159 151 """
160 152 # Simple utility to make IPython paths more readably, we need a lot of
@@ -249,9 +241,11 b' class IPTester(object):'
249 241 if runner == 'iptest':
250 242 iptest_app = get_ipython_module_path('IPython.testing.iptest')
251 243 self.runner = pycmd2argv(iptest_app) + sys.argv[1:]
252 else:
244 elif runner == 'trial':
253 245 # For trial, it needs to be installed system-wide
254 246 self.runner = pycmd2argv(p.abspath(find_cmd('trial')))
247 else:
248 raise Exception('Not a valid test runner: %s' % repr(runner))
255 249 if params is None:
256 250 params = []
257 251 if isinstance(params, str):
@@ -273,6 +267,8 b' class IPTester(object):'
273 267 # fashioned' way to do it, but it works just fine. If someone
274 268 # later can clean this up that's fine, as long as the tests run
275 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 272 return os.system(' '.join(self.call_args))
277 273 else:
278 274 def _run_cmd(self):
@@ -1,6 +1,22 b''
1 #!/usr/bin/env python
2 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 21 class IPythonGrowlError(Exception):
6 22 pass
General Comments 0
You need to be logged in to leave comments. Login now