Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ccda1e commit 168e73dCopy full SHA for 168e73d
1 file changed
Lib/test/test_posixpath.py
@@ -338,10 +338,12 @@ def test_expanduser(self):
338
pass
339
else:
340
self.assert_(isinstance(posixpath.expanduser("~/"), basestring))
341
- self.assertEqual(
342
- posixpath.expanduser("~") + "/",
343
- posixpath.expanduser("~/")
344
- )
+ # if home directory == root directory, this test makes no sense
+ if posixpath.expanduser("~") != '/':
+ self.assertEqual(
+ posixpath.expanduser("~") + "/",
345
+ posixpath.expanduser("~/")
346
+ )
347
self.assert_(isinstance(posixpath.expanduser("~root/"), basestring))
348
self.assert_(isinstance(posixpath.expanduser("~foo/"), basestring))
349
0 commit comments