Re: [Python-Dev] cpython (2.7): Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).

2013年2月18日 09:31:34 -0800

On 2013年2月18日 11:24:40 +0100 (CET)
serhiy.storchaka <[email protected]> wrote:
> 
> + def test_realpath_curdir(self):
> + self.assertEqual(realpath('.'), os.getcwd())
> + self.assertEqual(realpath('./.'), os.getcwd())
> + self.assertEqual(realpath('/'.join(['.'] * 100)), os.getcwd())
> +
> + def test_realpath_pardir(self):
> + self.assertEqual(realpath('..'), dirname(os.getcwd()))
> + self.assertEqual(realpath('../..'), dirname(dirname(os.getcwd())))
> + self.assertEqual(realpath('/'.join(['..'] * 100)), '/')
What if there's a symlink along os.getcwd()?
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to