##// END OF EJS Templates
Merging -r 1185 from lp:ipython.
Brian Granger -
r2136:7d9690af merge
parent child Browse files
Show More
@@ -24,6 +24,7 b' import os'
24 import os.path as path
24 import os.path as path
25 import sys
25 import sys
26 import subprocess
26 import subprocess
27 import tempfile
27 import time
28 import time
28 import warnings
29 import warnings
29
30
@@ -195,9 +196,29 b' class IPTester(object):'
195 # Assemble call
196 # Assemble call
196 self.call_args = self.runner+self.params
197 self.call_args = self.runner+self.params
197
198
198 def run(self):
199 if sys.platform == 'win32':
199 """Run the stored commands"""
200 def run(self):
200 return subprocess.call(self.call_args)
201 """Run the stored commands"""
202 # On Windows, cd to temporary directory to run tests. Otherwise,
203 # Twisted's trial may not be able to execute 'trial IPython', since
204 # it will confuse the IPython module name with the ipython
205 # execution scripts, because the windows file system isn't case
206 # sensitive.
207 # We also use os.system instead of subprocess.call, because I was
208 # having problems with subprocess and I just don't know enough
209 # about win32 to debug this reliably. Os.system may be the 'old
210 # fashioned' way to do it, but it works just fine. If someone
211 # later can clean this up that's fine, as long as the tests run
212 # reliably in win32.
213 curdir = os.getcwd()
214 os.chdir(tempfile.gettempdir())
215 stat = os.system(' '.join(self.call_args))
216 os.chdir(curdir)
217 return stat
218 else:
219 def run(self):
220 """Run the stored commands"""
221 return subprocess.call(self.call_args)
201
222
202
223
203 def make_runners():
224 def make_runners():
General Comments 0
You need to be logged in to leave comments. Login now