[Python-checkins] python/dist/src/Lib/test string_tests.py,1.20,1.21 test_format.py,1.15,1.16 test_slice.py,1.2,1.3 test_socket.py,1.53,1.54 test_strptime.py,1.1,1.2 test_whichdb.py,1.1,1.2

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Thu, 08 Aug 2002 13:19:22 -0700


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

Modified Files:
	string_tests.py test_format.py test_slice.py test_socket.py 
	test_strptime.py test_whichdb.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.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** string_tests.py	6 Aug 2002 16:58:20 -0000	1.20
--- string_tests.py	8 Aug 2002 20:19:19 -0000	1.21
***************
*** 315,317 ****
      vereq('asdf' in 'asd', False)
      vereq('asdf' in '', False)
- 
--- 315,316 ----

Index: test_format.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_format.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** test_format.py	28 Jul 2002 16:44:23 -0000	1.15
--- test_format.py	8 Aug 2002 20:19:19 -0000	1.16
***************
*** 222,224 ****
  test_exc('%d', '1', TypeError, "int argument required")
  test_exc('%g', '1', TypeError, "float argument required")
- 
--- 222,223 ----

Index: test_slice.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_slice.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_slice.py	23 Jul 2002 19:04:02 -0000	1.2
--- test_slice.py	8 Aug 2002 20:19:19 -0000	1.3
***************
*** 12,14 ****
  vereq(slice(100,  -100,  -1).indices(10), slice(None, None, -1).indices(10))
  vereq(slice(-100L, 100L, 2L).indices(10), (0, 10,  2))
- 
--- 12,13 ----

Index: test_socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** test_socket.py	8 Aug 2002 01:00:28 -0000	1.53
--- test_socket.py	8 Aug 2002 20:19:19 -0000	1.54
***************
*** 572,576 ****
  
      """Repeat the tests from FileObjectClassTestCase with bufsize==0.
!     
      In this case (and in this case only), it should be possible to
      create a file object, read a line from it, create another file
--- 572,576 ----
  
      """Repeat the tests from FileObjectClassTestCase with bufsize==0.
! 
      In this case (and in this case only), it should be possible to
      create a file object, read a line from it, create another file

Index: test_strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strptime.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_strptime.py	19 Jul 2002 17:04:46 -0000	1.1
--- test_strptime.py	8 Aug 2002 20:19:19 -0000	1.2
***************
*** 21,25 ****
  
      def compare_against_time(self, testing, directive, tuple_position, error_msg):
!         """Helper method that tests testing against directive based on the 
          tuple_position of time_tuple.  Uses error_msg as error message.
  
--- 21,25 ----
  
      def compare_against_time(self, testing, directive, tuple_position, error_msg):
!         """Helper method that tests testing against directive based on the
          tuple_position of time_tuple.  Uses error_msg as error message.
  
***************
*** 29,37 ****
          self.failUnless(strftime_output in testing, "%s: not found in tuple" % error_msg)
          self.failUnless(comparison == strftime_output, "%s: position within tuple incorrect; %s != %s" % (error_msg, comparison, strftime_output))
!     
      def test_weekday(self):
!         """Make sure that full and abbreviated weekday names are correct in 
          both string and position with tuple.
!         
          """
          self.compare_against_time(self.LT_ins.f_weekday, '%A', 6, "Testing of full weekday name failed")
--- 29,37 ----
          self.failUnless(strftime_output in testing, "%s: not found in tuple" % error_msg)
          self.failUnless(comparison == strftime_output, "%s: position within tuple incorrect; %s != %s" % (error_msg, comparison, strftime_output))
! 
      def test_weekday(self):
!         """Make sure that full and abbreviated weekday names are correct in
          both string and position with tuple.
! 
          """
          self.compare_against_time(self.LT_ins.f_weekday, '%A', 6, "Testing of full weekday name failed")
***************
*** 39,43 ****
  
      def test_month(self):
!         """Test full and abbreviated month names; both string and position 
          within the tuple.
  
--- 39,43 ----
  
      def test_month(self):
!         """Test full and abbreviated month names; both string and position
          within the tuple.
  
***************
*** 126,132 ****
          compiled = self.time_re.compile(r"%a %b")
          found = compiled.match("%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4]))
!         self.failUnless(found, 
              "Match failed with '%s' regex and '%s' string" % (compiled.pattern, "%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4])))
!         self.failUnless(found.group('a') == self.locale_time.a_weekday[4] and found.group('b') == self.locale_time.a_month[4], 
              "re object couldn't find the abbreviated weekday month in '%s' using '%s'; group 'a' = '%s', group 'b' = %s'" % (found.string, found.re.pattern, found.group('a'), found.group('b')))
          for directive in ('a','A','b','B','c','d','H','I','j','m','M','p','S','U','w','W','x','X','y','Y','Z','%'):
--- 126,132 ----
          compiled = self.time_re.compile(r"%a %b")
          found = compiled.match("%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4]))
!         self.failUnless(found,
              "Match failed with '%s' regex and '%s' string" % (compiled.pattern, "%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4])))
!         self.failUnless(found.group('a') == self.locale_time.a_weekday[4] and found.group('b') == self.locale_time.a_month[4],
              "re object couldn't find the abbreviated weekday month in '%s' using '%s'; group 'a' = '%s', group 'b' = %s'" % (found.string, found.re.pattern, found.group('a'), found.group('b')))
          for directive in ('a','A','b','B','c','d','H','I','j','m','M','p','S','U','w','W','x','X','y','Y','Z','%'):
***************
*** 200,206 ****
      def test_timezone(self):
          """Test timezone directives.
!         
          When gmtime() is used with %Z, entire result of strftime() is empty.
!         
          """
          time_tuple = time.localtime()
--- 200,206 ----
      def test_timezone(self):
          """Test timezone directives.
! 
          When gmtime() is used with %Z, entire result of strftime() is empty.
! 
          """
          time_tuple = time.localtime()
***************
*** 247,251 ****
          strp_output = _strptime.strptime(strf_output, "%Y-%m-%d")
          self.failUnless(strp_output[7] == self.time_tuple[7], "strptime did not trigger julianday(); %s != %s" % (strp_output[7], self.time_tuple[7]))
!         
      def test_gregorian_result(self):
          """Test gregorian."""
--- 247,251 ----
          strp_output = _strptime.strptime(strf_output, "%Y-%m-%d")
          self.failUnless(strp_output[7] == self.time_tuple[7], "strptime did not trigger julianday(); %s != %s" % (strp_output[7], self.time_tuple[7]))
! 
      def test_gregorian_result(self):
          """Test gregorian."""

Index: test_whichdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_whichdb.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_whichdb.py	2 Aug 2002 17:10:10 -0000	1.1
--- test_whichdb.py	8 Aug 2002 20:19:19 -0000	1.2
***************
*** 42,46 ****
      except ImportError:
          continue
!     
      def test_whichdb_name(self,name=name,mod=mod):
          """Check whether whichdb correctly guesses module name
--- 42,46 ----
      except ImportError:
          continue
! 
      def test_whichdb_name(self,name=name,mod=mod):
          """Check whether whichdb correctly guesses module name
***************
*** 61,63 ****
  if __name__ == "__main__":
      test_main()
- 
--- 61,62 ----