home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pyth_os2.zip / python-1.0.2 / Lib / test / test_opcodes.py < prev    next >
Text File  |  1993-12-29  |  390b  |  24 lines

  1. # Python test set -- part 2, opcodes
  2.  
  3. from test_support import *
  4.  
  5.  
  6. print '2. Opcodes'
  7. print 'XXX Not yet fully implemented'
  8.  
  9. print '2.1 try inside for loop'
  10. n = 0
  11. for i in range(10):
  12.     n = n+i
  13.     try: 1/0
  14.     except NameError: pass
  15.     except ZeroDivisionError: pass
  16.     except TypeError: pass
  17.     try: pass
  18.     except: pass
  19.     try: pass
  20.     finally: pass
  21.     n = n+i
  22. if n <> 90:
  23.     raise TestFailed, 'try inside for'
  24.