[Python-checkins] CVS: python/dist/src/Lib/test test_ntpath.py,1.12,1.13

Tim Peters tim_one@users.sourceforge.net
Mon, 05 Nov 2001 13:25:04 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv11207/python/Lib/test

Modified Files:
	test_ntpath.py 
Log Message:
SF bug 478425:  Change in os.path.join (ntpath.py)
ntpath.join('a', '') was producing 'a' instead of 'a\\' as in 2.1.
Impossible to guess what was ever *intended*, but since split('a\\')
produces ('a', ''), I think it's best if join('a', '') gives 'a\\' back.


Index: test_ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_ntpath.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** test_ntpath.py	2001/08/30 22:05:26	1.12
--- test_ntpath.py	2001/11/05 21:25:02	1.13
***************
*** 75,78 ****
--- 75,86 ----
  tester("ntpath.join('c:/', 'd:/a/b')", 'd:/a/b')
  
+ tester("ntpath.join('')", '')
+ tester("ntpath.join('', '', '', '', '')", '')
+ tester("ntpath.join('a')", 'a')
+ tester("ntpath.join('', 'a')", 'a')
+ tester("ntpath.join('', '', '', '', 'a')", 'a')
+ tester("ntpath.join('a', '')", 'a\\')
+ tester("ntpath.join('a', '', '', '', '')", 'a\\')
+ 
  tester("ntpath.normpath('A//////././//.//B')", r'A\B')
  tester("ntpath.normpath('A/./B')", r'A\B')