summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_posixpath.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-05-09 12:24:30 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-05-09 12:24:30 (GMT)
commit79ec9f0ec970c50325d68820d08b40d540cde6f9 (patch)
treecc9e164a417aa56795ea6fec60c7b42388198c2f /Lib/test/test_posixpath.py
parentb3c5d8568030842c6fbd30a6f197c8b684e0ccc6 (diff)
parentce82d57c7480c7360539c9e606d0b2f620e0c181 (diff)
downloadcpython-79ec9f0ec970c50325d68820d08b40d540cde6f9.zip
cpython-79ec9f0ec970c50325d68820d08b40d540cde6f9.tar.gz
cpython-79ec9f0ec970c50325d68820d08b40d540cde6f9.tar.bz2
#17809: merge with 3.3.
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r--Lib/test/test_posixpath.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index 1f05050..412849c 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -261,7 +261,8 @@ class PosixPathTest(unittest.TestCase):
# expanduser should fall back to using the password database
del env['HOME']
home = pwd.getpwuid(os.getuid()).pw_dir
- self.assertEqual(posixpath.expanduser("~"), home)
+ # $HOME can end with a trailing /, so strip it (see #17809)
+ self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))
def test_normpath(self):
self.assertEqual(posixpath.normpath(""), ".")