[Python-checkins] python/dist/src/Lib/test string_tests.py,1.31,1.32 test_capi.py,1.5,1.6 test_codecs.py,1.7,1.8 test_csv.py,1.3,1.4 test_getargs2.py,1.2,1.3 test_gettext.py,1.12,1.13 test_macfs.py,1.6,1.7 test_pwd.py,1.15,1.16 test_scriptpackages.py,1.2,1.3 test_shlex.py,1.3,1.4 test_signal.py,1.13,1.14 test_stringprep.py,1.1,1.2 test_time.py,1.14,1.15 test_unicode_file.py,1.8,1.9

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Thu, 24 Apr 2003 09:03:29 -0700


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

Modified Files:
	string_tests.py test_capi.py test_codecs.py test_csv.py 
	test_getargs2.py test_gettext.py test_macfs.py test_pwd.py 
	test_scriptpackages.py test_shlex.py test_signal.py 
	test_stringprep.py test_time.py test_unicode_file.py 
Log Message:
Whitespace normalization.


Index: string_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** string_tests.py	10 Apr 2003 22:35:31 -0000	1.31
--- string_tests.py	24 Apr 2003 16:02:50 -0000	1.32
***************
*** 632,634 ****
          self.checkraises(TypeError, 'xyz', 'decode', 42)
          self.checkraises(TypeError, 'xyz', 'encode', 42)
- 
--- 632,633 ----

Index: test_capi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_capi.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_capi.py	19 Apr 2003 15:41:46 -0000	1.5
--- test_capi.py	24 Apr 2003 16:02:51 -0000	1.6
***************
*** 28,32 ****
      def callback():
          idents.append(thread.get_ident())
!     
      _testcapi._test_thread_state(callback)
      time.sleep(1)
--- 28,32 ----
      def callback():
          idents.append(thread.get_ident())
! 
      _testcapi._test_thread_state(callback)
      time.sleep(1)
***************
*** 41,45 ****
  except AttributeError:
      have_thread_state = False
!     
  if have_thread_state:
      TestThreadState()
--- 41,45 ----
  except AttributeError:
      have_thread_state = False
! 
  if have_thread_state:
      TestThreadState()

Index: test_codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecs.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_codecs.py	18 Apr 2003 20:21:00 -0000	1.7
--- test_codecs.py	24 Apr 2003 16:02:51 -0000	1.8
***************
*** 106,110 ****
      (u"\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F",
       "3B-ww4c5e180e575a65lsy2b"),
!     
      # (M) <amuro><namie>-with-SUPER-MONKEYS
      (u"\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074"
--- 106,110 ----
      (u"\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F",
       "3B-ww4c5e180e575a65lsy2b"),
! 
      # (M) <amuro><namie>-with-SUPER-MONKEYS
      (u"\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074"
***************
*** 265,269 ****
       None),
      # 3.33 Display property character U+0341.
!     ('\xcd\x81', 
       '\xcc\x81'),
      # 3.34 Left-to-right mark U+200E.
--- 265,269 ----
       None),
      # 3.33 Display property character U+0341.
!     ('\xcd\x81',
       '\xcc\x81'),
      # 3.34 Left-to-right mark U+200E.

Index: test_csv.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_csv.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_csv.py	10 Apr 2003 17:16:15 -0000	1.3
--- test_csv.py	24 Apr 2003 16:02:51 -0000	1.4
***************
*** 11,15 ****
  class Test_Csv(unittest.TestCase):
      """
!     Test the underlying C csv parser in ways that are not appropriate 
      from the high level interface. Further tests of this nature are done
      in TestDialectRegistry.
--- 11,15 ----
  class Test_Csv(unittest.TestCase):
      """
!     Test the underlying C csv parser in ways that are not appropriate
      from the high level interface. Further tests of this nature are done
      in TestDialectRegistry.
***************
*** 39,43 ****
          self.assertEqual(obj.dialect.delimiter, '\t')
          self.assertRaises(TypeError, delattr, obj.dialect, 'delimiter')
!         self.assertRaises(TypeError, setattr, obj.dialect, 
                            'lineterminator', None)
          obj.dialect.escapechar = None
--- 39,43 ----
          self.assertEqual(obj.dialect.delimiter, '\t')
          self.assertRaises(TypeError, delattr, obj.dialect, 'delimiter')
!         self.assertRaises(TypeError, setattr, obj.dialect,
                            'lineterminator', None)
          obj.dialect.escapechar = None
***************
*** 58,62 ****
          writer = csv.writer(fileobj, **kwargs)
          writer.writerow(fields)
!         self.assertEqual(fileobj.getvalue(), 
                           expect + writer.dialect.lineterminator)
  
--- 58,62 ----
          writer = csv.writer(fileobj, **kwargs)
          writer.writerow(fields)
!         self.assertEqual(fileobj.getvalue(),
                           expect + writer.dialect.lineterminator)
  
***************
*** 65,69 ****
          self._write_test((), '')
          self._write_test([None], '""')
!         self.assertRaises(csv.Error, self._write_test, 
                            [None], None, quoting = csv.QUOTE_NONE)
          # Check that exceptions are passed up the chain
--- 65,69 ----
          self._write_test((), '')
          self._write_test([None], '""')
!         self.assertRaises(csv.Error, self._write_test,
                            [None], None, quoting = csv.QUOTE_NONE)
          # Check that exceptions are passed up the chain
***************
*** 88,92 ****
      def test_write_quoting(self):
          self._write_test(['a','1','p,q'], 'a,1,"p,q"')
!         self.assertRaises(csv.Error, 
                            self._write_test,
                            ['a','1','p,q'], 'a,1,"p,q"',
--- 88,92 ----
      def test_write_quoting(self):
          self._write_test(['a','1','p,q'], 'a,1,"p,q"')
!         self.assertRaises(csv.Error,
                            self._write_test,
                            ['a','1','p,q'], 'a,1,"p,q"',
***************
*** 312,324 ****
  
      def test_quoted(self):
!         self.readerAssertEqual('1,2,3,"I think, therefore I am",5,6', 
!                                [['1', '2', '3', 
!                                  'I think, therefore I am', 
                                   '5', '6']])
  
      def test_quoted_quote(self):
          self.readerAssertEqual('1,2,3,"""I see,"" said the blind man","as he picked up his hammer and saw"',
!                                [['1', '2', '3', 
!                                  '"I see," said the blind man', 
                                   'as he picked up his hammer and saw']])
  
--- 312,324 ----
  
      def test_quoted(self):
!         self.readerAssertEqual('1,2,3,"I think, therefore I am",5,6',
!                                [['1', '2', '3',
!                                  'I think, therefore I am',
                                   '5', '6']])
  
      def test_quoted_quote(self):
          self.readerAssertEqual('1,2,3,"""I see,"" said the blind man","as he picked up his hammer and saw"',
!                                [['1', '2', '3',
!                                  '"I see," said the blind man',
                                   'as he picked up his hammer and saw']])
  
***************
*** 330,335 ****
  9,8,7,6'''
          self.readerAssertEqual(input,
!                                [['1', '2', '3', 
!                                    '"I see,"\nsaid the blind man', 
                                     'as he picked up his\nhammer and saw'],
                                  ['9','8','7','6']])
--- 330,335 ----
  9,8,7,6'''
          self.readerAssertEqual(input,
!                                [['1', '2', '3',
!                                    '"I see,"\nsaid the blind man',
                                     'as he picked up his\nhammer and saw'],
                                  ['9','8','7','6']])

Index: test_getargs2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_getargs2.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_getargs2.py	18 Apr 2003 00:13:53 -0000	1.2
--- test_getargs2.py	24 Apr 2003 16:02:51 -0000	1.3
***************
*** 200,204 ****
          self.failUnlessEqual(42, ll_convert("L", 42L))
          self.assertRaises(OverflowError, ll_convert, "L", VERY_LARGE)
!         
      def test_K(self):
          # K return 'unsigned long long', no range checking
--- 200,204 ----
          self.failUnlessEqual(42, ll_convert("L", 42L))
          self.assertRaises(OverflowError, ll_convert, "L", VERY_LARGE)
! 
      def test_K(self):
          # K return 'unsigned long long', no range checking

Index: test_gettext.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_gettext.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** test_gettext.py	11 Apr 2003 18:36:22 -0000	1.12
--- test_gettext.py	24 Apr 2003 16:02:52 -0000	1.13
***************
*** 297,301 ****
      suite.addTest(unittest.makeSuite(UnicodeTranslationsTest))
      return suite
!     
  
  def test_main():
--- 297,301 ----
      suite.addTest(unittest.makeSuite(UnicodeTranslationsTest))
      return suite
! 
  
  def test_main():

Index: test_macfs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_macfs.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_macfs.py	21 Mar 2003 12:54:02 -0000	1.6
--- test_macfs.py	24 Apr 2003 16:02:52 -0000	1.7
***************
*** 30,34 ****
          fsr = macfs.FSRef(test_support.TESTFN)
          self.assertEqual(os.path.realpath(test_support.TESTFN), fsr.as_pathname())
!         
      def test_fsref_unicode(self):
          if sys.getfilesystemencoding():
--- 30,34 ----
          fsr = macfs.FSRef(test_support.TESTFN)
          self.assertEqual(os.path.realpath(test_support.TESTFN), fsr.as_pathname())
! 
      def test_fsref_unicode(self):
          if sys.getfilesystemencoding():

Index: test_pwd.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pwd.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** test_pwd.py	22 Apr 2003 11:05:56 -0000	1.15
--- test_pwd.py	24 Apr 2003 16:02:52 -0000	1.16
***************
*** 93,95 ****
  if __name__ == "__main__":
      test_main()
- 
--- 93,94 ----

Index: test_scriptpackages.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scriptpackages.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_scriptpackages.py	15 Apr 2003 21:40:30 -0000	1.2
--- test_scriptpackages.py	24 Apr 2003 16:02:52 -0000	1.3
***************
*** 9,13 ****
  
  class TestScriptpackages(unittest.TestCase):
!     
      def _test_scriptpackage(self, package, testobject=1):
          # Check that we can import the package
--- 9,13 ----
  
  class TestScriptpackages(unittest.TestCase):
! 
      def _test_scriptpackage(self, package, testobject=1):
          # Check that we can import the package
***************
*** 20,45 ****
              # Test that we can get an application object
              obj = mod.application(0)
!         
      def test__builtinSuites(self):
          self._test_scriptpackage('_builtinSuites', testobject=0)
!         
      def test_StdSuites(self):
          self._test_scriptpackage('StdSuites')
!         
      def test_SystemEvents(self):
          self._test_scriptpackage('SystemEvents')
!         
      def test_Finder(self):
          self._test_scriptpackage('Finder')
!         
      def test_Terminal(self):
          self._test_scriptpackage('Terminal')
!         
      def test_Netscape(self):
          self._test_scriptpackage('Netscape')
!         
      def test_Explorer(self):
          self._test_scriptpackage('Explorer')
!         
      def test_CodeWarrior(self):
          self._test_scriptpackage('CodeWarrior')
--- 20,45 ----
              # Test that we can get an application object
              obj = mod.application(0)
! 
      def test__builtinSuites(self):
          self._test_scriptpackage('_builtinSuites', testobject=0)
! 
      def test_StdSuites(self):
          self._test_scriptpackage('StdSuites')
! 
      def test_SystemEvents(self):
          self._test_scriptpackage('SystemEvents')
! 
      def test_Finder(self):
          self._test_scriptpackage('Finder')
! 
      def test_Terminal(self):
          self._test_scriptpackage('Terminal')
! 
      def test_Netscape(self):
          self._test_scriptpackage('Netscape')
! 
      def test_Explorer(self):
          self._test_scriptpackage('Explorer')
! 
      def test_CodeWarrior(self):
          self._test_scriptpackage('CodeWarrior')

Index: test_shlex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_shlex.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_shlex.py	20 Apr 2003 01:57:03 -0000	1.3
--- test_shlex.py	24 Apr 2003 16:02:52 -0000	1.4
***************
*** 167,174 ****
              tok = lex.get_token()
          return ret
!     
      def testSplitPosix(self):
          """Test data splitting with posix parser"""
!         self.splitTest(self.posix_data, comments=True) 
  
      def testCompat(self):
--- 167,174 ----
              tok = lex.get_token()
          return ret
! 
      def testSplitPosix(self):
          """Test data splitting with posix parser"""
!         self.splitTest(self.posix_data, comments=True)
  
      def testCompat(self):

Index: test_signal.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_signal.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_signal.py	13 Mar 2003 13:56:52 -0000	1.13
--- test_signal.py	24 Apr 2003 16:02:52 -0000	1.14
***************
*** 64,66 ****
      if verbose:
          print "KeyboardInterrupt (assume the alarm() went off)"
- 
--- 64,65 ----

Index: test_stringprep.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_stringprep.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_stringprep.py	19 Apr 2003 12:57:57 -0000	1.1
--- test_stringprep.py	24 Apr 2003 16:02:53 -0000	1.2
***************
*** 87,90 ****
  #     h.update(data)
  #     print p,h.hexdigest()
-       
-     
--- 87,88 ----

Index: test_time.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_time.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** test_time.py	11 Apr 2003 15:35:53 -0000	1.14
--- test_time.py	24 Apr 2003 16:02:53 -0000	1.15
***************
*** 59,65 ****
          from os import environ
  
!         # Epoch time of midnight Dec 25th 2002. Never DST in northern 
          # hemisphere.
!         xmas2002 = 1040774400.0 
  
          # These formats are correct for 2002, and possibly future years
--- 59,65 ----
          from os import environ
  
!         # Epoch time of midnight Dec 25th 2002. Never DST in northern
          # hemisphere.
!         xmas2002 = 1040774400.0
  
          # These formats are correct for 2002, and possibly future years
***************
*** 68,72 ****
          # They are also documented in the tzset(3) man page on most Unix
          # systems.
!         eastern = 'EST+05EDT,M4.1.0,M10.5.0' 
          victoria = 'AEST-10AEDT-11,M10.5.0,M3.5.0'
          utc='UTC+0'
--- 68,72 ----
          # They are also documented in the tzset(3) man page on most Unix
          # systems.
!         eastern = 'EST+05EDT,M4.1.0,M10.5.0'
          victoria = 'AEST-10AEDT-11,M10.5.0,M3.5.0'
          utc='UTC+0'
***************
*** 84,88 ****
                  time.gmtime(xmas2002), time.localtime(xmas2002)
                  )
!             self.failUnlessEqual(time.daylight, 0) 
              self.failUnlessEqual(time.timezone, 0)
              self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 0)
--- 84,88 ----
                  time.gmtime(xmas2002), time.localtime(xmas2002)
                  )
!             self.failUnlessEqual(time.daylight, 0)
              self.failUnlessEqual(time.timezone, 0)
              self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 0)
***************
*** 120,124 ****
                  del environ['TZ']
              time.tzset()
!             
  
  def test_main():
--- 120,124 ----
                  del environ['TZ']
              time.tzset()
! 
  
  def test_main():

Index: test_unicode_file.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode_file.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_unicode_file.py	17 Mar 2003 18:30:15 -0000	1.8
--- test_unicode_file.py	24 Apr 2003 16:02:53 -0000	1.9
***************
*** 7,11 ****
  from test.test_support import TESTFN_ENCODING
  try:
!     TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING)    
  except (UnicodeError, TypeError):
      # Either the file system encoding is None, or the file name
--- 7,11 ----
  from test.test_support import TESTFN_ENCODING
  try:
!     TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING)
  except (UnicodeError, TypeError):
      # Either the file system encoding is None, or the file name