[Subversion] / Contextual / test_context.py  

Diff of /Contextual/test_context.py

Parent Directory | Revision Log

version 2220, Wed Jul 19 18:56:35 2006 UTC version 2279, Sat Feb 24 05:37:44 2007 UTC
Line 1 
Line 1 
   import sys
   suites = []
   
   if sys.version>='2.4':
       suites.append('README.txt')
       if sys.version>='2.5':
           suites.append('Contextual.txt')
       #XXX suites.append('context.txt')
   
   suites.append('context_tests.txt')
   
   try:
       sorted = sorted
   except NameError:
       def sorted(seq,key=None):
           if key:
               d = [(key(v),v) for v in seq]
           else:
               d = list(seq)
           d.sort()
           if key:
               return [v[1] for v in d]
           return d
   
 def additional_tests():  def additional_tests():
     import doctest      import doctest
       import __future__
       globs = dict(sorted=sorted)
       if hasattr(__future__,'with_statement'):
           globs['with_statement'] = __future__.with_statement
     return doctest.DocFileSuite(      return doctest.DocFileSuite(
         'README.txt', 'Contextual.txt', 'context_tests.txt',          #'README.txt', 'Contextual.txt', 'context.txt', 'context_tests.txt',
         optionflags=doctest.ELLIPSIS,          optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
           globs=globs, *suites
     )      )
   


Generate output suitable for use with a patch program
Legend:
Removed from v.2220  
changed lines
  Added in v.2279

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help