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.
This commit is contained in:
Jason Grout 2014-07-30 14:35:10 +00:00
parent a7abca5a9f
commit 35c3095da0

View File

@ -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
)