[Python-checkins] python/dist/src/Lib/test pystone.py, 1.8, 1.9 test_applesingle.py, 1.1, 1.2 test_codeccallbacks.py, 1.15, 1.16 test_codecencodings_cn.py, 1.1, 1.2 test_codecencodings_jp.py, 1.1, 1.2 test_codecencodings_kr.py, 1.1, 1.2 test_codecencodings_tw.py, 1.1, 1.2 test_codecmaps_cn.py, 1.1, 1.2 test_codecmaps_jp.py, 1.1, 1.2 test_codecmaps_kr.py, 1.1, 1.2 test_codecmaps_tw.py, 1.1, 1.2 test_curses.py, 1.6, 1.7 test_descr.py, 1.198, 1.199 test_difflib.py, 1.8, 1.9 test_marshal.py, 1.4, 1.5 test_md5.py, 1.5, 1.6 test_multibytecodec.py, 1.1, 1.2 test_multibytecodec_support.py, 1.1, 1.2 test_os.py, 1.20, 1.21 test_re.py, 1.46, 1.47 test_set.py, 1.9, 1.10 test_sort.py, 1.11, 1.12 test_support.py, 1.61, 1.62 test_unicode_file.py, 1.12, 1.13 test_urllib2.py, 1.10, 1.11

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sun Jan 18 15:29:57 EST 2004


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

Modified Files:
	pystone.py test_applesingle.py test_codeccallbacks.py 
	test_codecencodings_cn.py test_codecencodings_jp.py 
	test_codecencodings_kr.py test_codecencodings_tw.py 
	test_codecmaps_cn.py test_codecmaps_jp.py test_codecmaps_kr.py 
	test_codecmaps_tw.py test_curses.py test_descr.py 
	test_difflib.py test_marshal.py test_md5.py 
	test_multibytecodec.py test_multibytecodec_support.py 
	test_os.py test_re.py test_set.py test_sort.py test_support.py 
	test_unicode_file.py test_urllib2.py 
Log Message:
Whitespace normalization.


Index: pystone.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/pystone.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** pystone.py	2 Jan 2004 17:11:54 -0000	1.8
--- pystone.py	18 Jan 2004 20:29:54 -0000	1.9
***************
*** 265,267 ****
          loops = LOOPS
      main(loops)
- 
--- 265,266 ----

Index: test_applesingle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_applesingle.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_applesingle.py	18 Nov 2003 22:36:12 -0000	1.1
--- test_applesingle.py	18 Jan 2004 20:29:54 -0000	1.2
***************
*** 56,60 ****
          self.compareData(False, dataforkdata)
          self.compareData(True, resourceforkdata)
!         
      def test_applesingle_resonly(self):
          try:
--- 56,60 ----
          self.compareData(False, dataforkdata)
          self.compareData(True, resourceforkdata)
! 
      def test_applesingle_resonly(self):
          try:

Index: test_codeccallbacks.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codeccallbacks.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** test_codeccallbacks.py	24 Oct 2003 14:25:28 -0000	1.15
--- test_codeccallbacks.py	18 Jan 2004 20:29:54 -0000	1.16
***************
*** 698,702 ****
              ord('"'): u""",
          }
!         
          for n in (1, 10, 100, 1000):
              text = u'abc<def>ghi'*n
--- 698,702 ----
              ord('"'): u"&quot;",
          }
! 
          for n in (1, 10, 100, 1000):
              text = u'abc<def>ghi'*n

Index: test_codecencodings_cn.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecencodings_cn.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecencodings_cn.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecencodings_cn.py	18 Jan 2004 20:29:54 -0000	1.2
***************
*** 28,33 ****
      codectests = (
          # invalid bytes
!         ("abc\x80\x80\xc1\xc4", "strict",  None),  
!         ("abc\xc8", "strict",  None),  
          ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u804a"),
          ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u804a\ufffd"),
--- 28,33 ----
      codectests = (
          # invalid bytes
!         ("abc\x80\x80\xc1\xc4", "strict",  None),
!         ("abc\xc8", "strict",  None),
          ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u804a"),
          ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u804a\ufffd"),
***************
*** 59,61 ****
  if __name__ == "__main__":
      test_main()
- 
--- 59,60 ----

Index: test_codecencodings_jp.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecencodings_jp.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecencodings_jp.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecencodings_jp.py	18 Jan 2004 20:29:54 -0000	1.2
***************
*** 132,134 ****
  if __name__ == "__main__":
      test_main()
- 
--- 132,133 ----

Index: test_codecencodings_kr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecencodings_kr.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecencodings_kr.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecencodings_kr.py	18 Jan 2004 20:29:54 -0000	1.2
***************
*** 55,57 ****
  if __name__ == "__main__":
      test_main()
- 
--- 55,56 ----

Index: test_codecencodings_tw.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecencodings_tw.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecencodings_tw.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecencodings_tw.py	18 Jan 2004 20:29:54 -0000	1.2
***************
*** 29,31 ****
  if __name__ == "__main__":
      test_main()
- 
--- 29,30 ----

Index: test_codecmaps_cn.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecmaps_cn.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecmaps_cn.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecmaps_cn.py	18 Jan 2004 20:29:54 -0000	1.2
***************
*** 32,34 ****
  if __name__ == "__main__":
      test_main()
- 
--- 32,33 ----

Index: test_codecmaps_jp.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecmaps_jp.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecmaps_jp.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecmaps_jp.py	18 Jan 2004 20:29:55 -0000	1.2
***************
*** 88,90 ****
  if __name__ == "__main__":
      test_main()
- 
--- 88,89 ----

Index: test_codecmaps_kr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecmaps_kr.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecmaps_kr.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecmaps_kr.py	18 Jan 2004 20:29:55 -0000	1.2
***************
*** 49,51 ****
  if __name__ == "__main__":
      test_main()
- 
--- 49,50 ----

Index: test_codecmaps_tw.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecmaps_tw.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_codecmaps_tw.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_codecmaps_tw.py	18 Jan 2004 20:29:55 -0000	1.2
***************
*** 37,39 ****
  if __name__ == "__main__":
      test_main()
- 
--- 37,38 ----

Index: test_curses.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_curses.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_curses.py	29 Aug 2003 18:49:05 -0000	1.6
--- test_curses.py	18 Jan 2004 20:29:55 -0000	1.7
***************
*** 205,209 ****
          if ascii.unctrl(ch) != expected:
              print 'curses.unctrl fails on character', repr(ch)
!             
  
  
--- 205,209 ----
          if ascii.unctrl(ch) != expected:
              print 'curses.unctrl fails on character', repr(ch)
! 
  
  
***************
*** 216,220 ****
          curses.resetty()
  
!     
  if __name__ == '__main__':
      curses.wrapper(main)
--- 216,220 ----
          curses.resetty()
  
! 
  if __name__ == '__main__':
      curses.wrapper(main)

Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.198
retrieving revision 1.199
diff -C2 -d -r1.198 -r1.199
*** test_descr.py	15 Aug 2003 13:07:47 -0000	1.198
--- test_descr.py	18 Jan 2004 20:29:55 -0000	1.199
***************
*** 3967,3971 ****
      import gc; gc.collect()
      vereq(hasattr(c, 'attr'), False)
!     
  
  def test_main():
--- 3967,3971 ----
      import gc; gc.collect()
      vereq(hasattr(c, 'attr'), False)
! 
  
  def test_main():

Index: test_difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_difflib.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_difflib.py	16 Jul 2003 04:34:56 -0000	1.8
--- test_difflib.py	18 Jan 2004 20:29:55 -0000	1.9
***************
*** 16,18 ****
  
  test_support.run_unittest(TestSFbugs, Doctests)
- 
--- 16,17 ----

Index: test_marshal.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_marshal.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_marshal.py	2 Aug 2003 15:02:33 -0000	1.4
--- test_marshal.py	18 Jan 2004 20:29:55 -0000	1.5
***************
*** 56,60 ****
              self.assertEqual(b, new)
              self.assertEqual(type(b), type(new))
!             
  class FloatTestCase(unittest.TestCase):
      def test_floats(self):
--- 56,60 ----
              self.assertEqual(b, new)
              self.assertEqual(type(b), type(new))
! 
  class FloatTestCase(unittest.TestCase):
      def test_floats(self):
***************
*** 123,127 ****
              self.assertEqual(s, new)
          os.unlink(test_support.TESTFN)
!             
  class ExceptionTestCase(unittest.TestCase):
      def test_exceptions(self):
--- 123,127 ----
              self.assertEqual(s, new)
          os.unlink(test_support.TESTFN)
! 
  class ExceptionTestCase(unittest.TestCase):
      def test_exceptions(self):
***************
*** 152,156 ****
          self.assertEqual(self.d, new)
          os.unlink(test_support.TESTFN)
!         
      def test_list(self):
          lst = self.d.items()
--- 152,156 ----
          self.assertEqual(self.d, new)
          os.unlink(test_support.TESTFN)
! 
      def test_list(self):
          lst = self.d.items()
***************
*** 170,174 ****
          self.assertEqual(t, new)
          os.unlink(test_support.TESTFN)
!         
  class BugsTestCase(unittest.TestCase):
      def test_bug_5888452(self):
--- 170,174 ----
          self.assertEqual(t, new)
          os.unlink(test_support.TESTFN)
! 
  class BugsTestCase(unittest.TestCase):
      def test_bug_5888452(self):

Index: test_md5.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_md5.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_md5.py	11 Dec 2003 12:33:58 -0000	1.5
--- test_md5.py	18 Jan 2004 20:29:55 -0000	1.6
***************
*** 27,33 ****
          eq('message digest', 'f96b697d7cb7938d525a2f31aaf161d0')
          eq('abcdefghijklmnopqrstuvwxyz', 'c3fcd3d76192e4007dfb496cca67e13b')
!         eq('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', 
             'd174ab98d277d9f5a5611c2c9f419d9f')
!         eq('12345678901234567890123456789012345678901234567890123456789012345678901234567890', 
             '57edf4a22be3c955ac49da2e2107b67a')
  
--- 27,33 ----
          eq('message digest', 'f96b697d7cb7938d525a2f31aaf161d0')
          eq('abcdefghijklmnopqrstuvwxyz', 'c3fcd3d76192e4007dfb496cca67e13b')
!         eq('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
             'd174ab98d277d9f5a5611c2c9f419d9f')
!         eq('12345678901234567890123456789012345678901234567890123456789012345678901234567890',
             '57edf4a22be3c955ac49da2e2107b67a')
  

Index: test_multibytecodec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_multibytecodec.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_multibytecodec.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_multibytecodec.py	18 Jan 2004 20:29:55 -0000	1.2
***************
*** 77,79 ****
  if __name__ == "__main__":
      test_main()
- 
--- 77,78 ----

Index: test_multibytecodec_support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_multibytecodec_support.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_multibytecodec_support.py	17 Jan 2004 14:29:28 -0000	1.1
--- test_multibytecodec_support.py	18 Jan 2004 20:29:55 -0000	1.2
***************
*** 231,233 ****
      else:
          sys.modules[case.__module__].skip_expected = False
- 
--- 231,232 ----

Index: test_os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_os.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** test_os.py	23 Dec 2003 16:36:11 -0000	1.20
--- test_os.py	18 Jan 2004 20:29:55 -0000	1.21
***************
*** 320,327 ****
                              'dir5', 'dir6')
          os.makedirs(path)
-         
  
!     
!         
      def tearDown(self):
          path = os.path.join(test_support.TESTFN, 'dir1', 'dir2', 'dir3',
--- 320,327 ----
                              'dir5', 'dir6')
          os.makedirs(path)
  
! 
! 
! 
      def tearDown(self):
          path = os.path.join(test_support.TESTFN, 'dir1', 'dir2', 'dir3',

Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** test_re.py	17 Oct 2003 22:13:16 -0000	1.46
--- test_re.py	18 Jan 2004 20:29:55 -0000	1.47
***************
*** 406,410 ****
          self.assertEqual(re.match('.*?cd', 20000*'abc'+'de').end(0), 60001)
          # non-simple '*?' still used to hit the recursion limit, before the
!         # non-recursive scheme was implemented. 
          self.assertEqual(re.search('(a|b)*?c', 10000*'ab'+'cd').end(0), 20001)
  
--- 406,410 ----
          self.assertEqual(re.match('.*?cd', 20000*'abc'+'de').end(0), 60001)
          # non-simple '*?' still used to hit the recursion limit, before the
!         # non-recursive scheme was implemented.
          self.assertEqual(re.search('(a|b)*?c', 10000*'ab'+'cd').end(0), 20001)
  

Index: test_set.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_set.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** test_set.py	31 Dec 2003 02:01:33 -0000	1.9
--- test_set.py	18 Jan 2004 20:29:55 -0000	1.10
***************
*** 180,184 ****
                  self.value = value
              def __hash__(self):
!                     return self.value
              def __deepcopy__(self, memo=None):
                  return Tracer(self.value + 1)
--- 180,184 ----
                  self.value = value
              def __hash__(self):
!                 return self.value
              def __deepcopy__(self, memo=None):
                  return Tracer(self.value + 1)

Index: test_sort.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sort.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** test_sort.py	17 Dec 2003 20:43:32 -0000	1.11
--- test_sort.py	18 Jan 2004 20:29:55 -0000	1.12
***************
*** 271,274 ****
  if __name__ == "__main__":
      test_main(verbose=True)
- 
- 
--- 271,272 ----

Index: test_support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** test_support.py	4 Dec 2003 05:39:43 -0000	1.61
--- test_support.py	18 Jan 2004 20:29:55 -0000	1.62
***************
*** 142,146 ****
          if (not hasattr(sys, "getwindowsversion") or
                  sys.getwindowsversion()[3] < 2): #  0=win32s or 1=9x/ME
!            TESTFN_UNICODE_UNENCODEABLE = None
          else:
              # Japanese characters (I think - from bug 846133)
--- 142,146 ----
          if (not hasattr(sys, "getwindowsversion") or
                  sys.getwindowsversion()[3] < 2): #  0=win32s or 1=9x/ME
!             TESTFN_UNICODE_UNENCODEABLE = None
          else:
              # Japanese characters (I think - from bug 846133)

Index: test_unicode_file.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode_file.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** test_unicode_file.py	3 Dec 2003 22:16:47 -0000	1.12
--- test_unicode_file.py	18 Jan 2004 20:29:55 -0000	1.13
***************
*** 21,25 ****
      # The 'do_' functions are the actual tests.  They generally assume the
      # file already exists etc.
!     
      # Do all the tests we can given only a single filename.  The file should
      # exist.
--- 21,25 ----
      # The 'do_' functions are the actual tests.  They generally assume the
      # file already exists etc.
! 
      # Do all the tests we can given only a single filename.  The file should
      # exist.
***************
*** 40,44 ****
          path, base = os.path.split(os.path.abspath(filename))
          self.failUnless(base in os.listdir(path))
!     
      # Do as many "equivalancy' tests as we can - ie, check that although we
      # have different types for the filename, they refer to the same file.
--- 40,44 ----
          path, base = os.path.split(os.path.abspath(filename))
          self.failUnless(base in os.listdir(path))
! 
      # Do as many "equivalancy' tests as we can - ie, check that although we
      # have different types for the filename, they refer to the same file.
***************
*** 125,129 ****
          finally:
              os.unlink(filename)
!     
      def _test_equivalent(self, filename1, filename2):
          remove_if_exists(filename1)
--- 125,129 ----
          finally:
              os.unlink(filename)
! 
      def _test_equivalent(self, filename1, filename2):
          remove_if_exists(filename1)

Index: test_urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllib2.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_urllib2.py	17 Dec 2003 20:47:28 -0000	1.10
--- test_urllib2.py	18 Jan 2004 20:29:55 -0000	1.11
***************
*** 270,273 ****
--- 270,281 ----
  
  
+ def sanepathname2url(path):
+     import urllib
+     urlpath = urllib.pathname2url(path)
+     if os.name == "nt" and urlpath.startswith("///"):
+         urlpath = urlpath[2:]
+     # XXX don't ask me about the mac...
+     return urlpath
+ 
  class HandlerTests(unittest.TestCase):
  
***************
*** 324,340 ****
          o = h.parent = MockOpener()
  
!         #from test_support import TESTFN
!         TESTFN = "test.txt"
          towrite = "hello, world\n"
          for url in [
!             "file://localhost%s/%s" % (os.getcwd(), TESTFN),
!             "file://%s/%s" % (os.getcwd(), TESTFN),
!             "file://%s%s/%s" % (socket.gethostbyname('localhost'),
!                                 os.getcwd(), TESTFN),
!             "file://%s%s/%s" % (socket.gethostbyname(socket.gethostname()),
!                                 os.getcwd(), TESTFN),
!             # XXX Windows / Mac format(s), ... ?
              ]:
!             f = open(TESTFN, "w")
              try:
                  try:
--- 332,346 ----
          o = h.parent = MockOpener()
  
!         TESTFN = test_support.TESTFN
!         urlpath = sanepathname2url(os.path.abspath(TESTFN))
          towrite = "hello, world\n"
          for url in [
!             "file://localhost%s" % urlpath,
!             "file://%s" % urlpath,
!             "file://%s%s" % (socket.gethostbyname('localhost'), urlpath),
!             "file://%s%s" % (socket.gethostbyname(socket.gethostname()),
!                              urlpath),
              ]:
!             f = open(TESTFN, "wb")
              try:
                  try:
***************
*** 346,354 ****
                  try:
                      data = r.read()
-                     read_time = time.time()
                      headers = r.info()
                      newurl = r.geturl()
                  finally:
                      r.close()
              finally:
                  os.remove(TESTFN)
--- 352,361 ----
                  try:
                      data = r.read()
                      headers = r.info()
                      newurl = r.geturl()
                  finally:
                      r.close()
+                 stats = os.stat(TESTFN)
+                 modified = rfc822.formatdate(stats.st_mtime)
              finally:
                  os.remove(TESTFN)
***************
*** 356,368 ****
              self.assertEqual(headers["Content-type"], "text/plain")
              self.assertEqual(headers["Content-length"], "13")
!             # Fudge Last-modified string comparison by one second to
!             # prevent spurious failure on crossing a second boundary while
!             # executing this test.
!             unfudged = rfc822.formatdate(read_time)
!             fudged = rfc822.formatdate(read_time-1)
!             self.assert_(headers["Last-modified"] in [unfudged, fudged])
  
          for url in [
!             "file://localhost:80%s/%s" % (os.getcwd(), TESTFN),
  # XXXX bug: these fail with socket.gaierror, should be URLError
  ##             "file://%s:80%s/%s" % (socket.gethostbyname('localhost'),
--- 363,370 ----
              self.assertEqual(headers["Content-type"], "text/plain")
              self.assertEqual(headers["Content-length"], "13")
!             self.assertEqual(headers["Last-modified"], modified)
  
          for url in [
!             "file://localhost:80%s" % urlpath,
  # XXXX bug: these fail with socket.gaierror, should be URLError
  ##             "file://%s:80%s/%s" % (socket.gethostbyname('localhost'),
***************
*** 372,376 ****
              ]:
              try:
!                 f = open(TESTFN, "w")
                  try:
                      f.write(towrite)
--- 374,378 ----
              ]:
              try:
!                 f = open(TESTFN, "wb")
                  try:
                      f.write(towrite)





More information about the Python-checkins mailing list