[Python-checkins] python/dist/src/Lib/test test_optparse.py, 1.2, 1.2.8.1 test_posixpath.py, 1.9, 1.9.6.1 test_strptime.py, 1.19, 1.19.4.1 test_urllib.py, 1.14, 1.14.8.1 test_uu.py, 1.6, 1.6.8.1

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Mon Aug 4 16:50:14 EDT 2003


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

Modified Files:
      Tag: release23-maint
	test_optparse.py test_posixpath.py test_strptime.py 
	test_urllib.py test_uu.py 
Log Message:
Merging release23-branch into the long-term Python 2.3 maintenance branch


Index: test_optparse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_optparse.py,v
retrieving revision 1.2
retrieving revision 1.2.8.1
diff -C2 -d -r1.2 -r1.2.8.1
*** test_optparse.py	1 May 2003 17:45:38 -0000	1.2
--- test_optparse.py	4 Aug 2003 22:49:42 -0000	1.2.8.1
***************
*** 608,612 ****
      def test_version(self):
          oldargv = sys.argv[0]
!         sys.argv[0] = "./foo/bar"
          self.parser = OptionParser(usage=SUPPRESS_USAGE, version="%prog 0.1")
          self.assertStdoutEquals(["--version"], "bar 0.1\n")
--- 608,612 ----
      def test_version(self):
          oldargv = sys.argv[0]
!         sys.argv[0] = os.path.join(os.curdir, "foo", "bar")
          self.parser = OptionParser(usage=SUPPRESS_USAGE, version="%prog 0.1")
          self.assertStdoutEquals(["--version"], "bar 0.1\n")
***************
*** 1087,1091 ****
          # This trick is used to make optparse believe bar.py is being executed.
          oldargv = sys.argv[0]
!         sys.argv[0] = "./foo/bar.py"
  
          self.assertStdoutEquals(["-h"], expected_output)
--- 1087,1091 ----
          # This trick is used to make optparse believe bar.py is being executed.
          oldargv = sys.argv[0]
!         sys.argv[0] = os.path.join(os.curdir, "foo", "bar.py")
  
          self.assertStdoutEquals(["-h"], expected_output)

Index: test_posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_posixpath.py,v
retrieving revision 1.9
retrieving revision 1.9.6.1
diff -C2 -d -r1.9 -r1.9.6.1
*** test_posixpath.py	1 Jul 2003 03:33:31 -0000	1.9
--- test_posixpath.py	4 Aug 2003 22:49:42 -0000	1.9.6.1
***************
*** 327,330 ****
--- 327,332 ----
  
      def test_ismount(self):
+         if os.name in ('mac',):
+             return
          self.assertIs(posixpath.ismount("/"), True)
  

Index: test_strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strptime.py,v
retrieving revision 1.19
retrieving revision 1.19.4.1
diff -C2 -d -r1.19 -r1.19.4.1
*** test_strptime.py	24 Jul 2003 06:27:17 -0000	1.19
--- test_strptime.py	4 Aug 2003 22:49:42 -0000	1.19.4.1
***************
*** 5,8 ****
--- 5,9 ----
  import locale
  import re
+ import sys
  from test import test_support
  
***************
*** 307,310 ****
--- 308,314 ----
          strp_output = _strptime.strptime(strf_output, "%Z")
          locale_time = _strptime.LocaleTime()
+         if sys.platform == 'mac':
+             # Timezones don't really work on MacOS9
+             return
          if time.tzname[0] != time.tzname[1] or not time.daylight:
              self.failUnless(strp_output[8] == time_tuple[8],

Index: test_urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllib.py,v
retrieving revision 1.14
retrieving revision 1.14.8.1
diff -C2 -d -r1.14 -r1.14.8.1
*** test_urllib.py	12 May 2003 20:19:37 -0000	1.14
--- test_urllib.py	4 Aug 2003 22:49:42 -0000	1.14.8.1
***************
*** 107,111 ****
          # a headers value is returned.
          result = urllib.urlretrieve("file:%s" % test_support.TESTFN)
!         self.assertEqual(result[0], test_support.TESTFN)
          self.assert_(isinstance(result[1], mimetools.Message),
                       "did not get a mimetools.Message instance as second "
--- 107,112 ----
          # a headers value is returned.
          result = urllib.urlretrieve("file:%s" % test_support.TESTFN)
!         self.assertEqual(os.path.normpath(result[0]), 
!                          os.path.normpath(test_support.TESTFN))
          self.assert_(isinstance(result[1], mimetools.Message),
                       "did not get a mimetools.Message instance as second "

Index: test_uu.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_uu.py,v
retrieving revision 1.6
retrieving revision 1.6.8.1
diff -C2 -d -r1.6 -r1.6.8.1
*** test_uu.py	6 May 2003 08:57:41 -0000	1.6
--- test_uu.py	4 Aug 2003 22:49:42 -0000	1.6.8.1
***************
*** 143,147 ****
              f.close()
  
!             f = open(self.tmpout, 'r')
              s = f.read()
              f.close()
--- 143,147 ----
              f.close()
  
!             f = open(self.tmpout, 'rU')
              s = f.read()
              f.close()





More information about the Python-checkins mailing list