diff options
-rw-r--r-- | numpy/core/tests/test_memmap.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/tests/test_memmap.py b/numpy/core/tests/test_memmap.py index 59ca28324..990d0ae26 100644 --- a/numpy/core/tests/test_memmap.py +++ b/numpy/core/tests/test_memmap.py @@ -81,7 +81,10 @@ class TestMemmap(object): tmpname = mktemp('', 'mmap', dir=self.tempdir) fp = memmap(Path(tmpname), dtype=self.dtype, mode='w+', shape=self.shape) - abspath = os.path.realpath(os.path.abspath(tmpname)) + # os.path.realpath does not resolve symlinks on Windows + # see: https://bugs.python.org/issue9949 + # use Path.resolve, just as memmap class does internally + abspath = str(Path(tmpname).resolve()) fp[:] = self.data[:] assert_equal(abspath, str(fp.filename.resolve())) b = fp[:1] |