[Python-checkins] python/dist/src/Lib/test test_posixpath.py,1.8,1.9
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Mon, 30 Jun 2003 20:33:33 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv32139/Lib/test
Modified Files:
test_posixpath.py
Log Message:
Fix SF #763362, test_posixpath failed
Don't check expanduser('~') if the home directory == the root directory
(ie, we are running as root).
Index: test_posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_posixpath.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_posixpath.py 29 Jun 2003 05:46:54 -0000 1.8
--- test_posixpath.py 1 Jul 2003 03:33:31 -0000 1.9
***************
*** 339,346 ****
else:
self.assert_(isinstance(posixpath.expanduser("~/"), basestring))
! self.assertEqual(
! posixpath.expanduser("~") + "/",
! posixpath.expanduser("~/")
! )
self.assert_(isinstance(posixpath.expanduser("~root/"), basestring))
self.assert_(isinstance(posixpath.expanduser("~foo/"), basestring))
--- 339,348 ----
else:
self.assert_(isinstance(posixpath.expanduser("~/"), basestring))
! # if home directory == root directory, this test makes no sense
! if posixpath.expanduser("~") != '/':
! self.assertEqual(
! posixpath.expanduser("~") + "/",
! posixpath.expanduser("~/")
! )
self.assert_(isinstance(posixpath.expanduser("~root/"), basestring))
self.assert_(isinstance(posixpath.expanduser("~foo/"), basestring))