Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary Working Directory Test Fails #3881

Closed
rgbkrk opened this issue Aug 3, 2013 · 10 comments
Closed

Temporary Working Directory Test Fails #3881

rgbkrk opened this issue Aug 3, 2013 · 10 comments
Milestone

Comments

@rgbkrk
Copy link
Member

rgbkrk commented Aug 3, 2013

Just ran iptest and a failure occurred in the IPython.utils test suite.

FAIL: IPython.utils.tests.test_tempdir.test_temporary_working_directory
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/kyle/.virtualenvs/rc1/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/kyle/.virtualenvs/rc1/lib/python2.7/site-packages/IPython/utils/tests/test_tempdir.py", line 26, in test_temporary_working_directory
    assert os.path.abspath(os.curdir) == dir
AssertionError:
    assert <module 'os' from '/Users/kyle/.virtualenvs/rc1/lib/python2.7/os.pyc'>.path.exists('/var/folders/ps/1dvr90bd6p3blnyrnpyxnryhv45qg1/T/tmp3a9THt')
>>  assert <module 'os' from '/Users/kyle/.virtualenvs/rc1/lib/python2.7/os.pyc'>.path.abspath(<module 'os' from '/Users/kyle/.virtualenvs/rc1/lib/python2.7/os.pyc'>.curdir) == '/var/folders/ps/1dvr90bd6p3blnyrnpyxnryhv45qg1/T/tmp3a9THt'

System information:

Test suite completed for system with the following information:
{'codename': 'An Afternoon Hack',
'commit_hash': 'ad1b59c',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/Users/kyle/.virtualenvs/rc1/lib/python2.7/site-packages/IPython',
'ipython_version': '1.0.0-rc1',
'os_name': 'posix',
'platform': 'Darwin-12.4.0-x86_64-i386-64bit',
'sys_executable': '/Users/kyle/.virtualenvs/rc1/bin/python',
'sys_platform': 'darwin',
'sys_version': '2.7.5 (default, Aug 1 2013, 12:53:40) \n[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.24)]'}

Tools and libraries available at test time:
curses jinja2 pexpect sqlite3 tornado zmq

Tools and libraries NOT available at test time:
azure cython matplotlib numpy oct2py pygments pymongo qt rpy2 sphinx wx wx.aui

@ivanov
Copy link
Member

ivanov commented Aug 3, 2013

can you check if changing the test to be assert os.path.abspath(os.curdir) == os.path.abspath(dir) fixes this for you?

@rgbkrk
Copy link
Member Author

rgbkrk commented Aug 3, 2013

Checking...

@rgbkrk
Copy link
Member Author

rgbkrk commented Aug 3, 2013

Nope. Let me get some more details.

@rgbkrk
Copy link
Member Author

rgbkrk commented Aug 3, 2013

Printed out the two directory names expected, got this:

/private/var/folders/ps/1dvr90bd6p3blnyrnpyxnryhv45qg1/T/tmpgOYiRy
/var/folders/ps/1dvr90bd6p3blnyrnpyxnryhv45qg1/T/tmpgOYiRy

I'm on a mac (and a recent Mac user), but as far I can tell /var/ is actually a symlink to /private/var. This is definitely a Mac issue.

(rc1)23:20:23 {checkpoints} ~/code/bookstore$ ls -la / | grep var
lrwxr-xr-x@   1 root      wheel                        11 Mar 15 03:14 var -> private/var

@minrk
Copy link
Member

minrk commented Aug 3, 2013

needs a realpath too, then, right?

@rgbkrk
Copy link
Member Author

rgbkrk commented Aug 3, 2013

Yeah, os.path.realpath will expand/eliminate any symbolic links in the path.

ivanov added a commit to ivanov/ipython that referenced this issue Aug 3, 2013
@ivanov
Copy link
Member

ivanov commented Aug 3, 2013

ok, updating my PR

@rgbkrk
Copy link
Member Author

rgbkrk commented Aug 3, 2013

Tests pass with that, expectedly.

@minrk
Copy link
Member

minrk commented Aug 3, 2013

Thanks for the report and quick fix, guys.

@ivanov
Copy link
Member

ivanov commented Aug 4, 2013

strange, the PR which fixes this was merged and should have closed this issue automatically, closing now.

@ivanov ivanov closed this as completed Aug 4, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants