[Python-checkins] python/dist/src/Lib/test pyclbr_input.py, 1.1, 1.2 test_decorators.py, 1.2, 1.3 test_pyclbr.py, 1.22, 1.23 test_threadsignals.py, 1.4, 1.5

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Wed Aug 4 04:36:21 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30068/Lib/test

Modified Files:
	pyclbr_input.py test_decorators.py test_pyclbr.py 
	test_threadsignals.py 
Log Message:
Whitespace normalization.


Index: pyclbr_input.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/pyclbr_input.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pyclbr_input.py	2 Aug 2004 06:09:54 -0000	1.1
--- pyclbr_input.py	4 Aug 2004 02:36:18 -0000	1.2
***************
*** 11,19 ****
  class B (object):
      def bm(self): pass
!     
  class C (B):
      foo = Other().foo
      om = Other.om
!     
      d = 10
  
--- 11,19 ----
  class B (object):
      def bm(self): pass
! 
  class C (B):
      foo = Other().foo
      om = Other.om
! 
      d = 10
  
***************
*** 24,30 ****
      #
      #f = f
!     
      def m(self): pass
!     
      @staticmethod
      def sm(self): pass
--- 24,30 ----
      #
      #f = f
! 
      def m(self): pass
! 
      @staticmethod
      def sm(self): pass

Index: test_decorators.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_decorators.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_decorators.py	2 Aug 2004 11:34:10 -0000	1.2
--- test_decorators.py	4 Aug 2004 02:36:18 -0000	1.3
***************
*** 23,28 ****
          Exception.__init__(self, "dbcheck %r failed (func=%s args=%s kwds=%s)" %
                             (exprstr, func, args, kwds))
!     
!     
  def dbcheck(exprstr, globals=None, locals=None):
      "Decorator to implement debugging assertions"
--- 23,28 ----
          Exception.__init__(self, "dbcheck %r failed (func=%s args=%s kwds=%s)" %
                             (exprstr, func, args, kwds))
! 
! 
  def dbcheck(exprstr, globals=None, locals=None):
      "Decorator to implement debugging assertions"
***************
*** 67,71 ****
              return func(*args)
      return call
!             
  # -----------------------------------------------
  
--- 67,71 ----
              return func(*args)
      return call
! 
  # -----------------------------------------------
  
***************
*** 81,85 ****
      def test_staticmethod_function(self):
          @staticmethod
!         def notamethod(x): 
              return x
          self.assertRaises(TypeError, notamethod, 1)
--- 81,85 ----
      def test_staticmethod_function(self):
          @staticmethod
!         def notamethod(x):
              return x
          self.assertRaises(TypeError, notamethod, 1)
***************
*** 95,99 ****
          # A few tests of argument passing, as we use restricted form
          # of expressions for decorators.
!         
          def noteargs(*args, **kwds):
              def decorate(func):
--- 95,99 ----
          # A few tests of argument passing, as we use restricted form
          # of expressions for decorators.
! 
          def noteargs(*args, **kwds):
              def decorate(func):
***************
*** 130,134 ****
          #      see the comment in countcalls.
          counts = {}
!         @countcalls(counts) @memoize 
          def double(x):
              return x * 2
--- 130,134 ----
          #      see the comment in countcalls.
          counts = {}
!         @countcalls(counts) @memoize
          def double(x):
              return x * 2
***************
*** 158,162 ****
              # Sanity check: is expr is a valid expression by itself?
              compile(expr, "testexpr", "exec")
!             
              codestr = "@%s\ndef f(): pass" % expr
              self.assertRaises(SyntaxError, compile, codestr, "test", "exec")
--- 158,162 ----
              # Sanity check: is expr is a valid expression by itself?
              compile(expr, "testexpr", "exec")
! 
              codestr = "@%s\ndef f(): pass" % expr
              self.assertRaises(SyntaxError, compile, codestr, "test", "exec")
***************
*** 167,171 ****
              raise NotImplementedError
          context = dict(nullval=None, unimp=unimp)
!         
          for expr, exc in [ ("undef", NameError),
                             ("nullval", TypeError),
--- 167,171 ----
              raise NotImplementedError
          context = dict(nullval=None, unimp=unimp)
! 
          for expr, exc in [ ("undef", NameError),
                             ("nullval", TypeError),

Index: test_pyclbr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pyclbr.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** test_pyclbr.py	2 Aug 2004 06:09:54 -0000	1.22
--- test_pyclbr.py	4 Aug 2004 02:36:18 -0000	1.23
***************
*** 152,156 ****
          #
          self.checkModule('test.pyclbr_input')
!         
      def test_others(self):
          cm = self.checkModule
--- 152,156 ----
          #
          self.checkModule('test.pyclbr_input')
! 
      def test_others(self):
          cm = self.checkModule

Index: test_threadsignals.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_threadsignals.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_threadsignals.py	4 Aug 2004 02:30:45 -0000	1.4
--- test_threadsignals.py	4 Aug 2004 02:36:18 -0000	1.5
***************
*** 11,15 ****
      raise TestSkipped, "Can't test signal on %s" % sys.platform
  
! signal_blackboard = { signal.SIGUSR1 : {'tripped': 0, 'tripped_by': 0 }, 
                        signal.SIGUSR2 : {'tripped': 0, 'tripped_by': 0 },
                        signal.SIGALRM : {'tripped': 0, 'tripped_by': 0 } }
--- 11,15 ----
      raise TestSkipped, "Can't test signal on %s" % sys.platform
  
! signal_blackboard = { signal.SIGUSR1 : {'tripped': 0, 'tripped_by': 0 },
                        signal.SIGUSR2 : {'tripped': 0, 'tripped_by': 0 },
                        signal.SIGALRM : {'tripped': 0, 'tripped_by': 0 } }
***************
*** 29,33 ****
  # from who.
  def handle_signals(sig,frame):
!     signal_blackboard[sig]['tripped'] += 1 
      signal_blackboard[sig]['tripped_by'] = thread.get_ident()
  
--- 29,33 ----
  # from who.
  def handle_signals(sig,frame):
!     signal_blackboard[sig]['tripped'] += 1
      signal_blackboard[sig]['tripped_by'] = thread.get_ident()
  
***************
*** 56,73 ****
          if signal_blackboard[signal.SIGUSR2]['tripped'] == 0 \
             or signal_blackboard[signal.SIGUSR2]['tripped'] == 0:
!              signal.alarm(1)
!              signal.pause()
!              signal.alarm(0)
  
          self.assertEqual( signal_blackboard[signal.SIGUSR1]['tripped'], 1)
!         self.assertEqual( signal_blackboard[signal.SIGUSR1]['tripped_by'], 
                             thread.get_ident())
          self.assertEqual( signal_blackboard[signal.SIGUSR2]['tripped'], 1)
!         self.assertEqual( signal_blackboard[signal.SIGUSR2]['tripped_by'], 
                             thread.get_ident())
  
      def spawnSignallingThread(self):
          thread.start_new_thread(send_signals, ())
!         
  
  def test_main():
--- 56,73 ----
          if signal_blackboard[signal.SIGUSR2]['tripped'] == 0 \
             or signal_blackboard[signal.SIGUSR2]['tripped'] == 0:
!             signal.alarm(1)
!             signal.pause()
!             signal.alarm(0)
  
          self.assertEqual( signal_blackboard[signal.SIGUSR1]['tripped'], 1)
!         self.assertEqual( signal_blackboard[signal.SIGUSR1]['tripped_by'],
                             thread.get_ident())
          self.assertEqual( signal_blackboard[signal.SIGUSR2]['tripped'], 1)
!         self.assertEqual( signal_blackboard[signal.SIGUSR2]['tripped_by'],
                             thread.get_ident())
  
      def spawnSignallingThread(self):
          thread.start_new_thread(send_signals, ())
! 
  
  def test_main():



More information about the Python-checkins mailing list