ipython/ipython — Issue #1183: 0.12 testsuite failures
Author: juliantaylor
Created: 2011-12-19 19:22:41+00:00
State: open

the 0.12 testsuite fails when HOME is set to / and when run with root rights (yes I know very unusual settings ;) )

```
======================================================================
FAIL: test_get_ipython_dir_7, test home directory expansion on IPYTHON_DIR
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 187, in runTest
self.test(*self.arg)
File "/ipython-0.12/IPython/utils/tests/test_path.py", line 285, in test_get_ipython_dir_7
nt.assert_equal(ipdir, os.path.join(home_dir, 'somewhere'))
AssertionError: u'//somewhere' != '/somewhere'
"u'//somewhere' != '/somewhere'" = '%s != %s' % (safe_repr(u'//somewhere'), safe_repr('/somewhere'))
"u'//somewhere' != '/somewhere'" = self._formatMessage("u'//somewhere' != '/somewhere'", "u'//somewhere' != '/somewhere'")
>> raise self.failureException("u'//somewhere' != '/somewhere'")

======================================================================
FAIL: IPython.utils.tests.test_path.test_not_writable_ipdir
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 187, in runTest
self.test(*self.arg)
File "/ipython-0.12/IPython/testing/decorators.py", line 228, in skipper_func
return f(*args, **kwargs)
File "/ipython-0.12/IPython/utils/tests/test_path.py", line 370, in test_not_writable_ipdir
ipdir = path.get_ipython_dir()
File "/ipython-0.12/IPython/testing/tools.py", line 369, in __exit__
assert self.s in printed, notprinted_msg.format(self.s, self.channel, printed)
AssertionError: Did not find 'is not a writable location' in printed output (on stderr):
u''
.tee.flush()
setattr(, .channel, .orig_stream)
u'' = .buffer.getvalue()
>> assert .s in u'', 'Did not find {0!r} in printed output (on {1}):\n{2!r}'.format(.s, .channel, u'')
return False
```