From 70f5afef6089cdd44066a3d0f8c86d5f61a00964 2014-07-30 14:35:10 From: Jason Grout <jgrout6@bloomberg.net> Date: 2014-07-30 14:35:10 Subject: [PATCH] Explicitly set the current working directory when running tests Because of the profile directory searching algorithm, if the current working directory has a directory named 'profile_default', that will be used instead of the temporary profile directory the tests expect. --- diff --git a/IPython/testing/iptestcontroller.py b/IPython/testing/iptestcontroller.py index 7b1812d..12ee610 100644 --- a/IPython/testing/iptestcontroller.py +++ b/IPython/testing/iptestcontroller.py @@ -304,7 +304,7 @@ class JSController(TestController): command.append('--KernelManager.transport=ipc') self.stream_capturer = c = StreamCapturer() c.start() - self.server = subprocess.Popen(command, stdout=c.writefd, stderr=subprocess.STDOUT) + self.server = subprocess.Popen(command, stdout=c.writefd, stderr=subprocess.STDOUT, cwd=self.nbdir.name) self.server_info_file = os.path.join(self.ipydir.name, 'profile_default', 'security', 'nbserver-%i.json' % self.server.pid )