-í
è¶<c       s¶    d  Z  0 2 d k Z 3 d k Z 4 d k Z 5 d k Z 6 d k Z 7 d k Z 9 d k Z ; d d „ Z A e	 e	 d d d d d d d e	 d „
 Z
 û d d d d	 d
 d g Z d d d d d d g Z e	 e e d „ Z e	 d „ Z id „  Z “d „  Z ›d „  Z ¡d d d „ Z ¹d f  d „  ƒ  YZ Õh  d d <d d <d  d! <d" d# <d$ d% <d& d' <Z ‡d( f  d) „  ƒ  YZ œe d* j o e
 ƒ  n d S(+   s$  Regression test.

This will find all modules whose name is "test_*" in the test
directory, and run them.  Various command line options provide
additional facilities.

Command line options:

-v: verbose   -- run tests in verbose mode with output to stdout
-q: quiet     -- don't print anything except if a test fails
-g: generate  -- write the output file for a test instead of comparing it
-x: exclude   -- arguments are tests to *exclude*
-s: single    -- run only a single test (see below)
-r: random    -- randomize test execution order
-l: findleaks -- if GC is available detect tests that leak memory
-u: use       -- specify which special resource intensive tests to run
-h: help      -- print this text and exit

If non-option arguments are present, they are names for tests to run,
unless -x is given, in which case they are names for tests not to run.
If no test names are given, all tests are run.

-v is incompatible with -g and does not compare test output files.

-s means to run only a single test and exit.  This is useful when doing memory
analysis on the Python interpreter (which tend to consume to many resources to
run the full regression test non-stop).  The file /tmp/pynexttest is read to
find the next test to run.  If this file is missing, the first test_*.py file
in testdir or on the command line is used.  (actually tempfile.gettempdir() is
used instead of /tmp).

-u is used to specify which special resource intensive tests to run, such as
those requiring large file support or network connectivity.  The argument is a
comma-separated list of words indicating the resources to test.  Currently
only the following are defined:

    curses -    Tests that use curses and will modify the terminal's
                state and output modes.

    largefile - It is okay to run some test that may create huge files.  These
                tests can take a long time and may consume >2GB of disk space
                temporarily.

    network -   It is okay to run tests that use external network resource,
                e.g. testing SSL support for sockets.
Ns    c    s5   ; < t  GH= | o = | GHn > t i |  ƒ d  S(   N(   s   __doc__s   msgs   syss   exits   code(   s   codes   msg(    (    s#   /usr/lib/python2.2/test/regrtest.pys   usage; s   
 i    c
 (   sE	  A Y [ t  i t i ƒ \ yG ] t i t i d d ^ d d d d d d d	 d
 d g	 ƒ \ }& } Wn+ a t i j
 o } b t
 d | ƒ n Xe |	 t j o f g  }	 n g xî|& Dg ]ã\ }" } h |" d d f j o i t
 d ƒ n±j |" d d f j o k | d 7} nŠl |" d d f j o m d } n d } n^o |" d d f j o p d } n;q |" d d f j o r d } ns |" d d f j o t d } nõ u |" d d f j o v d } nÒ w |" d d f j o x d } n¯ y |" d d f j o˜ z g  i }# | i d  ƒ Dz ] }' |# |' i ƒ  ƒ q ~# }% { xB |% D{ ]7 }$ | |$ d! d" d# f j o } t
 d d$ | ƒ n qLW~ |	 i |% ƒ n q¸ W | o | o € t
 d d% ƒ n ‚ g  } ƒ g  }
 „ g  } † | oJ ‡ y ˆ d& k! } Wn' ‰ t" j
 o Š d' GH‹ d } n X‘ g  } n “ | o’ ” d( k$ l% } • t& i' i( | ƒ  d) ƒ } – yD — t* | d* ƒ } ˜ | i, ƒ  i- ƒ  } ™ | g }  š | i0 ƒ  Wn › t1 j
 o
 œ n Xn  xU t2 t3 | ƒ ƒ D ]> }  Ÿ | |  d+ t& i5 d, j o   | |  d+  | |  <n qèW¡ t6 } ¢ t8 } £ | oU ¤ x5 | D¤ ]* } ¥ | | j o ¦ | i; | ƒ n qUW§ | | d *¨ g  } n © |  p | p t< | | | ƒ }  ª | o « |  d  }  n ¬ | o ­ t> i? |  ƒ n ® | t  _ ¯ |	 t  _ ° t i@ iA ƒ  } ± xT|  D± ]I} ² | o ³ | GHn ´ tD | | | | | ƒ } µ | d j o ¶ | i | ƒ n5 · | d j o ¸ |
 i | ƒ n º | i | ƒ » | o[ ¼ | iF ƒ  ½ | iG o= ¾ d- Gt3 | iG ƒ G¿ d. GHÂ | i | iG ƒ Ã | iG 2n n Å xN t i@ iA ƒ  DÅ ]: } Æ | | j o | iI d/ ƒ o Ç t  iJ | ƒ n q;Wq0WÊ | iK ƒ  Ë |
 iK ƒ  Ì | iK ƒ  Î | o | on Ï |
 o | o t3 | ƒ d j o Ð d0 Gn Ñ tL t3 | ƒ d1 ƒ Gd2 GHÒ | o Ó d3 GHÔ d4 GHn n Õ |
 o, Ö tL t3 |
 ƒ d1 ƒ Gd5 GH× tM |
 ƒ n Ø | o | o× Ù tL t3 | ƒ d1 ƒ Gd6 GHÚ tM | ƒ Ü tN ƒ  } Ý t iP } Þ | iR ƒ  ok ß tS | ƒ | iT ƒ  } à | o4 á tL t3 | ƒ d7 ƒ Gd8 G| d9 GHã tM | ƒ n å d: G| d; GHn ç d< GHè d= G| d; GHn ê | oÕ ë t< | | | ƒ }! ì x¶ t2 t3 |! ƒ ƒ Dì ] }  í |  d |! |  j oq î |  t3 |! ƒ d j o ï t& iW | ƒ n< ñ t* | d> ƒ } ò | iX |! |  d d? ƒ ó | i0 ƒ  ô Pn q{Wö t& iW | ƒ n ø t iY t3 |
 ƒ d j ƒ d& S(@   sI  Execute a test suite.

    This also parses command-line options and modifies its behavior
    accordingly.

    tests -- a list of strings containing test names (optional)
    testdir -- the directory in which to look for tests (optional)

    Users other than the Python test suite will certainly want to
    specify testdir; if it's omitted, the directory containing the
    Python test suite is searched for.

    If the tests argument is omitted, the tests listed on the
    command-line will be used.  If that's empty, too, then all *.py
    files beginning with test_ will be used.

    The other default arguments (verbose, quiet, generate, exclude, single,
    randomize, findleaks, and use_resources) allow programmers calling main()
    directly to set the values that would normally be set by flags on the
    command line.

    i   s
   hvgqxsrlu:s   helps   verboses   quiets   generates   excludes   singles   randoms	   findleakss   use=i   s   -hs   --helpi    s   -vs	   --verboses   -qs   --quiets   -gs
   --generates   -xs	   --excludes   -ss   --singles   -rs   --randomizes   -ls   --findleakss   -us   --uses   ,s   cursess	   largefiles   networks   Invalid -u/--use option: %ss   -g and -v don't go together!Ns%   No GC available, disabling findleaks.(   s
   gettempdirs
   pynexttests   riýÿÿÿs   pys   Warning: test createds   uncollectable object(s).s   test.s   Alls   tests   OK.s8   CAUTION:  stdout isn't compared in verbose mode:  a tests0   that passes in verbose mode may fail without it.s   failed:s   skipped:s   skips   unexpected ons   :s   Those skips are all expected ons   .s6   Ask someone to teach regrtest.py about which tests ares   expected to get skipped ons   ws   
(Z   s   test_supports   record_original_stdouts   syss   stdouts   getopts   argvs   optss   argss   errors   msgs   usages   use_resourcess   Nones   os   as   verboses   quiets   generates   excludes   singles	   randomizes	   findleakss   appends   _[1]s   splits   xs   lowers   us   rs   extends   goods   bads   skippeds   gcs   ImportErrors   found_garbages   tempfiles
   gettempdirs   oss   paths   joins   filenames   opens   fps   reads   strips   nexts   testss   closes   IOErrors   ranges   lens   is   extseps   STDTESTSs   stdtestss   NOTTESTSs   nottestss   args   removes	   findtestss   testdirs   randoms   shuffles   moduless   keyss   save_moduless   tests   runtests   oks   collects   garbages   modules
   startswiths   unloads   sorts   counts	   printlists   _ExpectedSkipss   es   platforms   plats   isvalids   _Sets   getexpecteds   surprises   alltestss   unlinks   writes   exit((   s   testss   testdirs   verboses   quiets   generates   excludes   singles	   randomizes	   findleakss   use_resourcess   bads   modules   skippeds   gcs   args   filenames   save_moduless   nottestss   stdtestss   nexts   msgs   found_garbages   fps   goods   surprises   argss   plats
   gettempdirs   tests   es   as   oks   is   alltestss   os   _[1]s   rs   us   optss   x(    (    s#   /usr/lib/python2.2/test/regrtest.pys   mainA s  1
 	 "
 				

 	



 	#


 	
 	 &


#
 	s   test_grammars   test_opcodess   test_operationss   test_builtins   test_exceptionss
   test_typess   test_supports   test_b1s   test_b2s   test_future1s   test_future2s   test_future3c    sÝ   |  o t ƒ  }  n t i |  ƒ } g  } x | D]t } | d  d j o | d t i d j oB | d  } | | j o
 | | j o | i | ƒ n n qF W| i ƒ  | | Sd S(   s-   Return a list of all applicable test modules.i   s   test_iýÿÿÿs   pyN(   s   testdirs   findtestdirs   oss   listdirs   namess   testss   names   extseps   modnames   stdtestss   nottestss   appends   sort(   s   testdirs   stdtestss   nottestss   namess   modnames   testss   name(    (    s#   /usr/lib/python2.2/test/regrtest.pys	   findtestss    	
 	,c    s  "#t  i |  ƒ $| o $t ƒ  } n %t i i | d ƒ } &t i i | |  ƒ }	 '| o (t } n *t i ƒ  } +y ,t i }
 -zw .| o /| t _ 0|  GHn 1t |  t ƒ  t ƒ  g  ƒ } 6t | d t ƒ } 7| t j	 o 8| ƒ  n Wd 9:|
 t _ XWn
;t t  i f j
 o3 } <| o =d G|  Gd G| GHn >d Sn
?t j
 o @‚  nïAt  i j
 o$ } Bd G|  Gd G| GHCd SnºDEt i ƒ  d	  \ } } Fd G|  Gd
 Gt  | ƒ d G| GHG| o Ht! i" d t i ƒ n Id SnJXK| o Ld Sn M| i# ƒ  } N| oƒ O| |  d j o5 Pt i i& |	 ƒ o Td G|	 Gd GHn Xd Sn Yt' |	 d ƒ } Z| i) | ƒ [| i* ƒ  \d Sn ]t i i& |	 ƒ o2 ^t' |	 d ƒ } _| i+ ƒ  } `| i* ƒ  n b|  d } c| | j o dd Sn ed G|  Gd GHft- | | ƒ gd Sd S(   sK  Run a single test.
    test -- the name of the test
    generate -- if true, generate output, instead of running the test
    and comparing it to a previously created output file
    verbose -- if true, print more messages
    quiet -- if true, don't print 'skipped' messages (probably redundant)
    testdir -- test directory
    s   outputs	   test_mainNs   tests
   skipped --iÿÿÿÿs	   failed --i    i   s
   crashed --s   :s   filei   s   
s   output files)   is no longer needed; consider removing its   ws   rs   produced unexpected output:(.   s   test_supports   unloads   tests   testdirs   findtestdirs   oss   paths   joins	   outputdirs
   outputfiles   verboses   Nones   cfps   StringIOs   syss   stdouts   save_stdouts
   __import__s   globalss   localss
   the_modules   getattrs   indirect_tests   ImportErrors   TestSkippeds   msgs   quiets   KeyboardInterrupts
   TestFaileds   exc_infos   types   values   strs	   tracebacks	   print_excs   getvalues   outputs   generates   existss   opens   fps   writes   closes   reads   expecteds
   reportdiff(   s   tests   generates   verboses   quiets   testdirs
   the_modules   fps   types   msgs
   outputfiles   save_stdouts   values	   outputdirs   cfps   indirect_tests   outputs   expected(    (    s#   /usr/lib/python2.2/test/regrtest.pys   runtestst    


"

c    s  ijd  k  } kd d GHl|  i d ƒ } m| i d ƒ } n| i d | d | ƒ }
 o|
 i ƒ  } qd „  } yxŠ| Dy]\ } } } } }	 z| d j o {nT}| d j oF ~d	 G| | | ƒ Gd
 GHx# | | | !D] } €d G| Gqè Wnþ ‚| d j oj ƒd G| | | ƒ Gd Gd G| | |	 ƒ Gd GH…x2 | i | | | !| | |	 !ƒ D…] } †| GqfWn„ ˆ| d j oX ‰d	 G| | |	 ƒ Gd Gd Gt | ƒ d GH‹x# | | |	 !D‹] } Œd G| GqÊWn d G| | | | |	 f GHq W‘d d GHd  S(   Ns   *iF   i   s   as   bc    sJ   qs|  d 7}  t|  | j o ud t |  ƒ Sn wd |  | f Sd  S(   Ni   s   line s   lines %d-%d(   s   x0s   x1s   str(   s   x0s   x1(    (    s#   /usr/lib/python2.2/test/regrtest.pys   pairqs   s   equals   deletes   ***s   of expected output missing:s   -s   replaces   *** mismatch betweens   of expecteds
   output ands   of actual output:s   inserts   of actual output doesn't appears   in expected output after lines   :s   +s$   get_opcodes() returned bad tuple?!?!(   s   difflibs   expecteds
   splitliness   as   outputs   bs   SequenceMatchers   sms   get_opcodess   tupless   pairs   ops   a0s   a1s   b0s   b1s   lines   ndiffs   str(   s   expecteds   outputs   as   bs   difflibs   a1s   a0s   tupless   b0s   b1s   sms   pairs   lines   op(    (    s#   /usr/lib/python2.2/test/regrtest.pys
   reportdiffis8   
  	.$ 	+ 	c     sZ   “”t  d j o •t i d }  n
 —t }  ˜t i i |  ƒ p t i } ™| Sd  S(   Ns   __main__i    (
   s   __name__s   syss   argvs   files   __file__s   oss   paths   dirnames   curdirs   testdir(   s   files   testdir(    (    s#   /usr/lib/python2.2/test/regrtest.pys   findtestdir“s
   	c    s=   ›œ|  d j o d |  | f Sn Ÿd |  | f Sd  S(   Ni   s   %d %ss   %d %ss(   s   ns   word(   s   ns   word(    (    s#   /usr/lib/python2.2/test/regrtest.pys   count›s   iF   i   c    sç   ¡§©d | } ªx¨ t t |  ƒ Dª]” } «t | ƒ t | ƒ } ¬| d d j o ­d } n ¯d } °| d 7} ±| | j o ²| GH³d | | } n µ| | | 7} q& W¶t | ƒ | j o ·| GHn d S(   sÐ   Print the elements of a sequence to stdout.

    Optional arg width (default 70) is the maximum line length.
    Optional arg indent (default 4) is the number of blanks with which to
    begin each line.
    s    iÿÿÿÿs    i   N(
   s   indents   lines   maps   strs   xs   ones   lens   ws   pads   width(   s   xs   widths   indents   ws   lines   pads   one(    (    s#   /usr/lib/python2.2/test/regrtest.pys	   printlist¡s    		s   _Setc      sM   ¹t  Z ºg  d „ Z ¿d „  Z Âd „  Z Ëd „  Z Îd d „ Z RS(   Nc    s;   º»h  } |  _  ¼x | D¼] } ½d | | <q Wd  S(   Ni   (   s   datas   selfs   seqs   x(   s   selfs   seqs   xs   data(    (    s#   /usr/lib/python2.2/test/regrtest.pys   __init__ºs   
 	c    s   ¿Àt  |  i ƒ Sd  S(   N(   s   lens   selfs   data(   s   self(    (    s#   /usr/lib/python2.2/test/regrtest.pys   __len__¿s   c    sn   ÂÃÄt  ƒ  } Å|  i i ƒ  } | _ Æx2 | i DÆ]$ } Ç| | j o È| | =n q8 WÉ| Sd S(   s0   Return set of all elements in self not in other.N(   s   _Sets   results   selfs   datas   copys   others   x(   s   selfs   others   results   xs   data(    (    s#   /usr/lib/python2.2/test/regrtest.pys   __sub__Âs    	c    s   ËÌt  |  i ƒ Sd  S(   N(   s   iters   selfs   data(   s   self(    (    s#   /usr/lib/python2.2/test/regrtest.pys   __iter__Ës   i   c    s>   ÎÏÐ|  i i ƒ  } Ñ| o Ò| i ƒ  n Ó| Sd S(   s   Return _Set elements as a list.N(   s   selfs   datas   keyss   sorteds   sort(   s   selfs   sorteds   data(    (    s#   /usr/lib/python2.2/test/regrtest.pys   tolistÎs
   
(   s   __name__s
   __module__s   __init__s   __len__s   __sub__s   __iter__s   tolist(    (    (    s#   /usr/lib/python2.2/test/regrtest.pys   _Set¹s
   		s  
        test_al
        test_cd
        test_cl
        test_commands
        test_crypt
        test_curses
        test_dbm
        test_dl
        test_fcntl
        test_fork1
        test_gdbm
        test_gl
        test_grp
        test_imgfile
        test_largefile
        test_linuxaudiodev
        test_mhlib
        test_nis
        test_openpty
        test_poll
        test_pty
        test_pwd
        test_signal
        test_socket_ssl
        test_socketserver
        test_sunaudiodev
        test_timing
        s   win32sM  
        test_al
        test_cd
        test_cl
        test_curses
        test_dl
        test_gl
        test_imgfile
        test_largefile
        test_nis
        test_ntpath
        test_socket_ssl
        test_socketserver
        test_sunaudiodev
        test_unicode_file
        test_winreg
        test_winsound
        s   linux2s«  
        test_al
        test_bsddb
        test_cd
        test_cl
        test_commands
        test_crypt
        test_curses
        test_dbm
        test_dl
        test_fcntl
        test_fork1
        test_gl
        test_grp
        test_imgfile
        test_largefile
        test_linuxaudiodev
        test_locale
        test_mmap
        test_nis
        test_ntpath
        test_openpty
        test_poll
        test_popen2
        test_pty
        test_pwd
        test_signal
        test_socket_ssl
        test_socketserver
        test_sunaudiodev
        test_sundry
        test_timing
        test_unicode_file
        test_winreg
        test_winsound
        s   macs³  
        test_al
        test_bsddb
        test_cd
        test_cl
        test_dl
        test_gl
        test_imgfile
        test_largefile
        test_linuxaudiodev
        test_minidom
        test_nis
        test_ntpath
        test_openpty
        test_pyexpat
        test_sax
        test_socketserver
        test_sunaudiodev
        test_sundry
        test_unicode_file
        test_winreg
        test_winsound
        s	   unixware5s$  
        test_al
        test_asynchat
        test_bsddb
        test_cd
        test_cl
        test_commands
        test_crypt
        test_dbm
        test_dl
        test_fcntl
        test_fork1
        test_gdbm
        test_gl
        test_grp
        test_imgfile
        test_largefile
        test_linuxaudiodev
        test_locale
        test_mmap
        test_nis
        test_ntpath
        test_openpty
        test_poll
        test_popen2
        test_pty
        test_pwd
        test_socket_ssl
        test_socketserver
        test_strop
        test_sunaudiodev
        test_sundry
        test_thread
        test_threaded_import
        test_threadedtempfile
        test_threading
        test_timing
        test_unicode_file
        test_winreg
        test_winsound
        s   riscoss¡  
        test_al
        test_cd
        test_cl
        test_curses
        test_dl
        test_gdbm
        test_gl
        test_imgfile
        test_largefile
        test_linuxaudiodev
        test_minidom
        test_nis
        test_ntpath
        test_poll
        test_socket_ssl
        test_socketserver
        test_sunaudiodev
        test_unicode_file
        test_winreg
        test_winsound
        s   darwins   _ExpectedSkipsc      s/   ‡t  Z ˆd „  Z d „  Z “d „  Z RS(   Nc    sa   ˆ‰d |  _ Št i t i ƒ o8 ‹t t i } Œt | i ƒ  ƒ |  _	 d |  _ n d  S(   Ni    i   (
   s   selfs   valids   _expectationss   has_keys   syss   platforms   ss   _Sets   splits   expected(   s   selfs   s(    (    s#   /usr/lib/python2.2/test/regrtest.pys   __init__ˆs
   c    s   ‘|  i Sd S(   s@   Return true iff _ExpectedSkips knows about the current platform.N(   s   selfs   valid(   s   self(    (    s#   /usr/lib/python2.2/test/regrtest.pys   isvalids   c    s2   “—™t  o |  i ƒ  p t ‚ š|  i Sd S(   sn   Return set of test names we expect to skip on current platform.

        self.isvalid() must be true.
        N(   s	   __debug__s   selfs   isvalids   AssertionErrors   expected(   s   self(    (    s#   /usr/lib/python2.2/test/regrtest.pys   getexpected“s   (   s   __name__s
   __module__s   __init__s   isvalids   getexpected(    (    (    s#   /usr/lib/python2.2/test/regrtest.pys   _ExpectedSkips‡s   	s   __main__(   s   __doc__s   syss   oss   getopts	   tracebacks   randoms   StringIOs   test_supports   usages   Nones   mains   STDTESTSs   NOTTESTSs	   findtestss   runtests
   reportdiffs   findtestdirs   counts	   printlists   _Sets   _expectationss   _ExpectedSkipss   __name__(   s   test_supports   findtestdirs   _expectationss   randoms   runtests   _Sets   counts   syss   NOTTESTSs   StringIOs   STDTESTSs	   tracebacks	   printlists
   reportdiffs   _ExpectedSkipss	   findtestss   usages   getopts   mains   os(    (    s#   /usr/lib/python2.2/test/regrtest.pys   ?0 s,   *º		O*?²