A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-February/124132.html below:

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

[Python-Dev] cpython (2.7): Fix posixpath.realpath() for multiple pardirs (fixes issue #6975). [Python-Dev] cpython (2.7): Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).Antoine Pitrou solipsis at pitrou.net
Mon Feb 18 18:26:09 CET 2013
On Mon, 18 Feb 2013 11:24:40 +0100 (CET)
serhiy.storchaka <python-checkins at python.org> 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.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4