Changeset 1267 in tailor for vcpx/tests/__init__.py


Ignore:
Timestamp:
08/31/06 02:53:57 (7 years ago)
Author:
lele@…
Hash name:
20060831005357-97f81-0103181ad2d4d9cbb181153ac47a880af3f163cf
Message:

New --debug option for tests, to show external commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/tests/__init__.py

    r1230 r1267  
    88import sys 
    99from unittest import TestProgram, TestSuite 
     10 
     11DEBUG = False 
    1012 
    1113from shwrap import * 
     
    2931  -h, --help       Show this message 
    3032  -v, --verbose    Verbose output 
     33  -d, --debug      Debug output 
    3134  -q, --quiet      Minimal output 
    3235  -l, --list       List available tests without running them 
     
    4649        import getopt 
    4750        try: 
    48             options, args = getopt.getopt(argv[1:], 'hHvql', 
    49                                           ['help','verbose','quiet','list']) 
     51            options, args = getopt.getopt(argv[1:], 'hHvdql', 
     52                                          ['help','verbose','debug','quiet','list']) 
    5053            listonly = False 
    5154            for opt, value in options: 
     
    5659                if opt in ('-v','--verbose'): 
    5760                    self.verbosity = 2 
     61                if opt in ('-d','--debug'): 
     62                    global DEBUG 
     63                    DEBUG = True 
    5864                if opt in ('-l','--list'): 
    5965                    listonly = True 
Note: See TracChangeset for help on using the changeset viewer.