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

memmap test failure with version '1.12.0.dev0+866bc02' on OS X 10.9.5. #8077

Closed
WarrenWeckesser opened this issue Sep 21, 2016 · 4 comments
Closed

Comments

@WarrenWeckesser
Copy link
Member

WarrenWeckesser commented Sep 21, 2016

On OS X 10.9.5, Python 3.5.1 (from Anaconda), I get the following test failure:

======================================================================
FAIL: test_path (test_memmap.TestMemmap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/warren/foo/lib/python3.5/site-packages/numpy-1.12.0.dev0+866bc02-py3.5-macosx-10.6-x86_64.egg/numpy/testing/decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "/Users/warren/foo/lib/python3.5/site-packages/numpy-1.12.0.dev0+866bc02-py3.5-macosx-10.6-x86_64.egg/numpy/core/tests/test_memmap.py", line 84, in test_path
    self.assertEqual(abspath, str(fp.filename))
AssertionError: '/var/folders/p9/j_v_3wvd2bx5ftq544pvvf1w00[27 chars]va7x' != '/private/var/folders/p9/j_v_3wvd2bx5ftq544[35 chars]va7x'
- /var/folders/p9/j_v_3wvd2bx5ftq544pvvf1w0000gn/T/tmpsxdl57mm/mmapio4jva7x
+ /private/var/folders/p9/j_v_3wvd2bx5ftq544pvvf1w0000gn/T/tmpsxdl57mm/mmapio4jva7x
? ++++++++

This is the test:

    @dec.skipif(Path is None, "No pathlib.Path")
    def test_path(self):
        tmpname = mktemp('', 'mmap', dir=self.tempdir)
        fp = memmap(Path(tmpname), dtype=self.dtype, mode='w+',
                       shape=self.shape)
        abspath = os.path.abspath(tmpname)
        fp[:] = self.data[:]
        self.assertEqual(abspath, str(fp.filename))
        b = fp[:1]
        self.assertEqual(abspath, str(b.filename))
        del b
        del fp

The first assertEqual is failing. The problem is that str(fp.filename) has the additional top-level directory /private in the path.

@WarrenWeckesser
Copy link
Member Author

In my root directory, I see that /var is a link to /private/var:

/$ ls -l var
lrwxr-xr-x@ 1 root  wheel  11 Oct 31  2013 var@ -> private/var

@WarrenWeckesser
Copy link
Member Author

The test was added in 5ac270b

Ping @wackywendell

@wackywendell
Copy link
Contributor

Interesting; perhaps the test just needs to resolve symlinks. I can give it a whirl tomorrow...

wackywendell added a commit to wackywendell/numpy that referenced this issue Nov 13, 2016
charris pushed a commit to charris/numpy that referenced this issue Nov 13, 2016
@charris
Copy link
Member

charris commented Dec 4, 2016

Should be fixed by #8271.

@charris charris closed this as completed Dec 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants